Skip to main content

Installation

Install the mcp-use TypeScript SDK using your preferred package manager.

Requirements

  • Node.js: 20.19.0+ or 22.12.0+
  • Package Manager: npm, pnpm, yarn, or bun

Install mcp-use

Optional Dependencies

Depending on which features you’re using, you may need additional dependencies:

For MCP Agent

The MCP Agent requires LangChain and an LLM provider:
Supported LLM providers:
  • @langchain/openai - OpenAI (GPT-4, GPT-3.5)
  • @langchain/anthropic - Anthropic (Claude)
  • @langchain/google-genai - Google (Gemini)

For Code Execution Mode

For secure sandboxed code execution:

For React Integration

For React hooks and components:

For Observability

For Langfuse integration:

Verify Installation

Create a simple test file to verify the installation:
test.ts
Run it:

TypeScript Configuration

Ensure your tsconfig.json has the following settings:
tsconfig.json

Next Steps

Quickstart

Get started with your first MCP integration

MCP Server

Build MCP servers

MCP Client

Connect to MCP servers

MCP Agent

Create AI agents