MCP Server Studio

Context7 MCP server

Up-to-date docs for AI agents

Registry name: io.github.upstash/context7

Publisher
upstash
Runs
Local or hosted
Package
npm
Version
4.9.2
Category
AI & agents
Updated
2026-12-01

Source code on GitHub

Set up Context7 (run locally)

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/[email protected]"
      ],
      "env": {
        "CONTEXT7_API_KEY": "<CONTEXT7_API_KEY>"
      }
    }
  }
}

Claude Code

Run in your terminal:

claude mcp add context7 -e CONTEXT7_API_KEY='<CONTEXT7_API_KEY>' -- npx -y @upstash/[email protected]

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/[email protected]"
      ],
      "env": {
        "CONTEXT7_API_KEY": "<CONTEXT7_API_KEY>"
      }
    }
  }
}

VS Code

Add to .vscode/mcp.json:

{
  "servers": {
    "context7": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@upstash/[email protected]"
      ],
      "env": {
        "CONTEXT7_API_KEY": "<CONTEXT7_API_KEY>"
      }
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/[email protected]"
      ],
      "env": {
        "CONTEXT7_API_KEY": "<CONTEXT7_API_KEY>"
      }
    }
  }
}

Set up Context7 (hosted url)

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.context7.com/mcp",
        "--header",
        "Authorization: <Authorization>"
      ]
    }
  }
}

Claude Code

Run in your terminal:

claude mcp add --transport http context7 https://mcp.context7.com/mcp --header 'Authorization: <Authorization>'

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "context7": {
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "Authorization": "<Authorization>"
      }
    }
  }
}

VS Code

Add to .vscode/mcp.json:

{
  "servers": {
    "context7": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "Authorization": "<Authorization>"
      }
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "context7": {
      "serverUrl": "https://mcp.context7.com/mcp",
      "headers": {
        "Authorization": "<Authorization>"
      }
    }
  }
}

Settings

NameRequiredWhat it is
CONTEXT7_API_KEYNoAPI key for authentication

More ai & agents MCP servers