Choose Your Language
mcp-use is available in both TypeScript and Python with consistent APIs across both languages.- TypeScript
- Python
TypeScript Installation
Prerequisites
Node.js Version: Node.js 20.19.0 or higher (22+ recommended)
Package Managers
Core Dependencies
mcp-use requires Zod for schema validation:Optional Dependencies
Depending on your use case, you may want to install additional packages:For Building Agents
For Building Agents
For React Widgets
For React Widgets
For Observability
For Observability
For AI SDK Integration
For AI SDK Integration
For Code Mode (E2B)
For Code Mode (E2B)
Development Tools
For the best development experience, also install:Project Scaffolding
The fastest way to start a new project:- TypeScript configuration
- Example server with tools and widgets
- Hot reload setup
- Auto-opening inspector
- Build and deployment scripts
Verify Installation
Create a test filetest.ts:IDE Setup
Visual Studio Code
Recommended extensions: TypeScript:- ESLint
- Prettier
- TypeScript and JavaScript Language Features
- Python (Microsoft)
- Pylance
- Ruff
TypeScript Configuration
Createtsconfig.json:
Troubleshooting
TypeScript: Module not found
TypeScript: Module not found
Make sure youβre importing from the correct subpaths:
Python: Import errors
Python: Import errors
Make sure your virtual environment is activated and mcp-use is installed:
Node version issues
Node version issues
mcp-use requires Node.js 20.19.0 or higher. Use nvm to switch versions:
Python version issues
Python version issues
mcp-use requires Python 3.11+. Check your version:Use pyenv to manage Python versions:
Next Steps
Quickstart
Build your first MCP server
Concepts
Learn about the MCP protocol