Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/mcp-use/mcp-use/llms.txt

Use this file to discover all available pages before exploring further.

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

npm 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:
npm install langchain @langchain/core @langchain/openai
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:
npm install @e2b/code-interpreter

For React Integration

For React hooks and components:
npm install react react-dom

For Observability

For Langfuse integration:
npm install langfuse langfuse-langchain

Verify Installation

Create a simple test file to verify the installation:
test.ts
import { MCPClient } from 'mcp-use/client';
import { MCPServer } from 'mcp-use/server';

console.log('mcp-use installed successfully!');
Run it:
node --loader tsx test.ts

TypeScript Configuration

Ensure your tsconfig.json has the following settings:
tsconfig.json
{
  "compilerOptions": {
    "target": "ES2022",
    "module": "NodeNext",
    "moduleResolution": "NodeNext",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true
  }
}

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

Build docs developers (and LLMs) love