Skip to main content
Context7 supports all MCP clients. Below are configuration examples for popular clients. If your client isn’t listed, check its documentation for MCP server installation.
Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP serverPasting the following configuration into your Cursor ~/.cursor/mcp.json file is the recommended approach. You may also install in a specific project by creating .cursor/mcp.json in your project folder. See Cursor MCP docs for more info.Since Cursor 1.0, you can click the install button below for instant one-click installation.

Remote Server Connection

Install MCP Server
{
  "mcpServers": {
    "context7": {
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "CONTEXT7_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Local Server Connection

Install MCP Server
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
Run this command. See Claude Code MCP docs for more info.

Remote Server Connection

claude mcp add --transport http context7 https://mcp.context7.com/mcp --header "CONTEXT7_API_KEY: YOUR_API_KEY"

Local Server Connection

claude mcp add context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
Install in VS Code (npx) Install in VS Code Insiders (npx)Add this to your VS Code MCP config file. See VS Code MCP docs for more info.

Remote Server Connection

"mcp": {
  "servers": {
    "context7": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "CONTEXT7_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Local Server Connection

"mcp": {
  "servers": {
    "context7": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
Add this to your Windsurf MCP config file. See Windsurf MCP docs for more info.

Remote Server Connection

{
  "mcpServers": {
    "context7": {
      "serverUrl": "https://mcp.context7.com/mcp",
      "headers": {
        "CONTEXT7_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Local Server Connection

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
You can easily install Context7 through the Cline MCP Server Marketplace by following these instructions:
  1. Open Cline.
  2. Click the hamburger menu icon to enter the MCP Servers section.
  3. Use the search bar within the Marketplace tab to find Context7.
  4. Click the Install button.
Or you can directly edit MCP servers configuration:
  1. Open Cline.
  2. Click the hamburger menu icon to enter the MCP Servers section.
  3. Choose Remote Servers tab.
  4. Click the Edit Configuration button.
  5. Add context7 to mcpServers:
{
  "mcpServers": {
    "context7": {
      "url": "https://mcp.context7.com/mcp",
      "type": "streamableHttp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
Add this to your Opencode configuration file. See Opencode MCP docs for more info.

Remote Server Connection

"mcp": {
  "context7": {
    "type": "remote",
    "url": "https://mcp.context7.com/mcp",
    "headers": {
      "CONTEXT7_API_KEY": "YOUR_API_KEY"
    },
    "enabled": true
  }
}

Local Server Connection

{
  "mcp": {
    "context7": {
      "type": "local",
      "command": ["npx", "-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
      "enabled": true
    }
  }
}
Run this command in your terminal. See Amp MCP docs for more info.

Without API Key (Basic Usage)

amp mcp add context7 https://mcp.context7.com/mcp

With API Key (Higher Rate Limits & Private Repos)

amp mcp add context7 --header "CONTEXT7_API_KEY=YOUR_API_KEY" https://mcp.context7.com/mcp
It can be installed via Zed Extensions or you can add this to your Zed settings.json. See Zed Context Server docs for more info.
{
  "context_servers": {
    "Context7": {
      "source": "custom",
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
To install Context7 MCP Server for any client automatically via Smithery:
npx -y @smithery/cli@latest install @upstash/context7-mcp --client <CLIENT_NAME> --key <YOUR_SMITHERY_KEY>
You can find your Smithery key in the Smithery.ai webpage.
To configure Context7 MCP in Augment Code, you can use either the graphical interface or manual configuration.

Using the Augment Code UI

  1. Click the hamburger menu.
  2. Select Settings.
  3. Navigate to the Tools section.
  4. Click the + Add MCP button.
  5. Enter the following command:
    npx -y @upstash/context7-mcp@latest
    
  6. Name the MCP: Context7.
  7. Click the Add button.

Manual Configuration

  1. Press Cmd/Ctrl Shift P or go to the hamburger menu in the Augment panel
  2. Select Edit Settings
  3. Under Advanced, click Edit in settings.json
  4. Add the server configuration to the mcpServers array in the augment.advanced object
"augment.advanced": {
  "mcpServers": [
    {
      "name": "context7",
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  ]
}
You can configure the Context7 MCP server in Kilo Code using either the UI or by editing your project’s MCP configuration file.Kilo Code supports two configuration levels:
  • Global MCP Configuration — stored in mcp_settings.json
  • Project-level MCP Configuration — stored in .kilocode/mcp.json (recommended)

Configure via Kilo Code UI

  1. Open Kilo Code.
  2. Click the Settings icon in the top-right corner.
  3. Navigate to Settings → MCP Servers.
  4. Click Add Server.
  5. Choose HTTP Server (Streamable HTTP Transport).
  6. Enter the details:
    • URL: https://mcp.context7.com/mcp
    • Headers → Add Header
      • Key: Authorization
      • Value: Bearer YOUR_API_KEY
  7. Click Save.

Manual Configuration

Create .kilocode/mcp.json:
{
  "mcpServers": {
    "context7": {
      "type": "streamable-http",
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      },
      "alwaysAllow": [],
      "disabled": false
    }
  }
}
Add this to your Antigravity MCP config file. See Antigravity MCP docs for more info.

Remote Server Connection

{
  "mcpServers": {
    "context7": {
      "serverUrl": "https://mcp.context7.com/mcp",
      "headers": {
        "CONTEXT7_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Local Server Connection

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
Add this to your Roo Code MCP configuration file. See Roo Code MCP docs for more info.

Remote Server Connection

{
  "mcpServers": {
    "context7": {
      "type": "streamable-http",
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "CONTEXT7_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Local Server Connection

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
See Gemini CLI Configuration for details.
  1. Open the Gemini CLI settings file at ~/.gemini/settings.json
  2. Add the following to the mcpServers object:
{
  "mcpServers": {
    "context7": {
      "httpUrl": "https://mcp.context7.com/mcp",
      "headers": {
        "CONTEXT7_API_KEY": "YOUR_API_KEY",
        "Accept": "application/json, text/event-stream"
      }
    }
  }
}
Or, for a local server:
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
See Qwen Coder MCP Configuration for details.
  1. Open the Qwen Coder settings file at ~/.qwen/settings.json
  2. Add the following to the mcpServers object:
{
  "mcpServers": {
    "context7": {
      "httpUrl": "https://mcp.context7.com/mcp",
      "headers": {
        "CONTEXT7_API_KEY": "YOUR_API_KEY",
        "Accept": "application/json, text/event-stream"
      }
    }
  }
}
Or, for a local server:
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}

Remote Server Connection

Open Claude Desktop and navigate to Settings > Connectors > Add Custom Connector. Enter the name as Context7 and the remote MCP server URL as https://mcp.context7.com/mcp.

Local Server Connection

Open Claude Desktop developer settings and edit your claude_desktop_config.json file. See Claude Desktop MCP docs for more info.
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
See OpenAI Codex for more information.

Local Server Connection

[mcp_servers.context7]
args = ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
command = "npx"
startup_timeout_ms = 20_000

Remote Server Connection

[mcp_servers.context7]
url = "https://mcp.context7.com/mcp"
http_headers = { "CONTEXT7_API_KEY" = "YOUR_API_KEY" }
If you see startup timeout errors, try increasing startup_timeout_ms to 40_000.
See JetBrains AI Assistant Documentation for more details.
  1. In JetBrains IDEs, go to Settings -> Tools -> AI Assistant -> Model Context Protocol (MCP)
  2. Click + Add.
  3. Click on Command in the top-left corner and select the As JSON option
  4. Add this configuration:
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
  1. Click Apply to save changes.
See Kiro Model Context Protocol Documentation for details.
  1. Navigate Kiro > MCP Servers
  2. Add a new MCP server by clicking the + Add button.
  3. Paste the configuration:
{
  "mcpServers": {
    "Context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
      "env": {},
      "disabled": false,
      "autoApprove": []
    }
  }
}
  1. Click Save to apply.
Use the Add manually feature and fill in the JSON configuration. See Trae documentation for more details.

Remote Server Connection

{
  "mcpServers": {
    "context7": {
      "url": "https://mcp.context7.com/mcp"
    }
  }
}

Local Server Connection

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
Use these alternatives to run the local Context7 MCP server with other runtimes.

Bun

{
  "mcpServers": {
    "context7": {
      "command": "bunx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}

Deno

{
  "mcpServers": {
    "context7": {
      "command": "deno",
      "args": [
        "run",
        "--allow-env=NO_DEPRECATION,TRACE_DEPRECATION",
        "--allow-net",
        "npm:@upstash/context7-mcp"
      ]
    }
  }
}
  1. Create a Dockerfile:
FROM node:18-alpine
WORKDIR /app
RUN npm install -g @upstash/context7-mcp
CMD ["context7-mcp"]
  1. Build the image:
docker build -t context7-mcp .
  1. Configure your MCP client:
{
  "mcpServers": {
    "context7": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "context7-mcp"],
      "transportType": "stdio"
    }
  }
}
The configuration on Windows is slightly different. Use cmd to run npx:
{
  "mcpServers": {
    "context7": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
      "disabled": false,
      "autoApprove": []
    }
  }
}
Add this to your Amazon Q Developer CLI configuration file. See Amazon Q Developer CLI docs for more details.
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
See Warp Model Context Protocol Documentation for details.
  1. Navigate Settings > AI > Manage MCP servers.
  2. Add a new MCP server by clicking the + Add button.
  3. Paste the configuration:
{
  "Context7": {
    "command": "npx",
    "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
    "env": {},
    "working_directory": null,
    "start_on_launch": true
  }
}
  1. Click Save.
Add the following configuration to Repository->Settings->Copilot->Coding agent->MCP configuration:
{
  "mcpServers": {
    "context7": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "CONTEXT7_API_KEY": "YOUR_API_KEY"
      },
      "tools": ["query-docs", "resolve-library-id"]
    }
  }
}
See the official GitHub documentation for more info.
Open ~/.copilot/mcp-config.json and add:
{
  "mcpServers": {
    "context7": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "CONTEXT7_API_KEY": "YOUR_API_KEY"
      },
      "tools": ["query-docs", "resolve-library-id"]
    }
  }
}
Or, for a local server:
{
  "mcpServers": {
    "context7": {
      "type": "local",
      "command": "npx",
      "tools": ["query-docs", "resolve-library-id"],
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
See LM Studio MCP Support for more information.

One-click install:

Add MCP Server context7 to LM Studio

Manual set-up:

  1. Navigate to Program (right side) > Install > Edit mcp.json.
  2. Paste the configuration:
{
  "mcpServers": {
    "Context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
  1. Click Save.
See Visual Studio MCP Servers documentation for details.
{
  "inputs": [],
  "servers": {
    "context7": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "CONTEXT7_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
Or, for a local server:
{
  "mcp": {
    "servers": {
      "context7": {
        "type": "stdio",
        "command": "npx",
        "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
      }
    }
  }
}
Add this to your Crush configuration file. See Crush MCP docs for more info.

Remote Server Connection

{
  "$schema": "https://charm.land/crush.json",
  "mcp": {
    "context7": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "CONTEXT7_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Local Server Connection

{
  "$schema": "https://charm.land/crush.json",
  "mcp": {
    "context7": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
Open the “Settings” page, navigate to “Plugins,” and enter:
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
See BoltAI’s Documentation for more info.
Edit your Rovo Dev CLI MCP config:
acli rovodev mcp

Remote Server Connection

{
  "mcpServers": {
    "context7": {
      "url": "https://mcp.context7.com/mcp"
    }
  }
}

Local Server Connection

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
  1. Go to the Zencoder menu (…)
  2. Select Agent tools
  3. Click on Add custom MCP
  4. Add the name and configuration:
{
  "command": "npx",
  "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
}
  1. Click Install.
See Qodo Gen docs for more details.
  1. Open Qodo Gen chat panel in VSCode or IntelliJ.
  2. Click Connect more tools.
  3. Click + Add new MCP.
  4. Add the configuration:

Local Server Connection

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}

Remote Server Connection

{
  "mcpServers": {
    "context7": {
      "url": "https://mcp.context7.com/mcp"
    }
  }
}
See Local and Remote MCPs for Perplexity for more information.
  1. Navigate Perplexity > Settings
  2. Select Connectors.
  3. Click Add Connector.
  4. Select Advanced.
  5. Enter Server Name: Context7
  6. Paste:
{
  "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
  "command": "npx",
  "env": {}
}
  1. Click Save.
Factory’s droid supports MCP servers through its CLI. See Factory MCP docs for more info.

Remote Server Connection

droid mcp add context7 https://mcp.context7.com/mcp --type http --header "CONTEXT7_API_KEY: YOUR_API_KEY"

Local Server Connection

droid mcp add context7 "npx -y @upstash/context7-mcp" --env CONTEXT7_API_KEY=YOUR_API_KEY
Emdash is an orchestration layer for running multiple coding agents in parallel.What Emdash provides:
  • Global toggle: Settings → MCP → “Enable Context7 MCP”
  • Per-workspace enable: The Context7 button in the ProviderBar
What you still need to do: Configure your coding agent (Codex, Claude Code, Cursor, etc.) to connect to Context7 MCP. Emdash does not modify your agent’s config.See the Emdash repository for more information.
Install the context7.mcpb file and add it to your client. See MCP bundles docs for more info.