Skip to main content

Choose Your Language

mcp-use is available in both TypeScript and Python with consistent APIs across both languages.

TypeScript Installation

Prerequisites

Node.js Version: Node.js 20.19.0 or higher (22+ recommended)
Check your Node.js version:
If you need to upgrade, visit nodejs.org or use a version manager like nvm.

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:

Development Tools

For the best development experience, also install:

Project Scaffolding

The fastest way to start a new project:
This creates a fully configured project with:
  • TypeScript configuration
  • Example server with tools and widgets
  • Hot reload setup
  • Auto-opening inspector
  • Build and deployment scripts

Verify Installation

Create a test file test.ts:
Run it:
You should see:

IDE Setup

Visual Studio Code

Recommended extensions: TypeScript:
  • ESLint
  • Prettier
  • TypeScript and JavaScript Language Features
Python:
  • Python (Microsoft)
  • Pylance
  • Ruff

TypeScript Configuration

Create tsconfig.json:

Troubleshooting

Make sure you’re importing from the correct subpaths:
Make sure your virtual environment is activated and mcp-use is installed:
mcp-use requires Node.js 20.19.0 or higher. Use nvm to switch versions:
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