Context7

Lets an assistant pull current, version-specific library documentation and code examples into its context

Official · Upstash TypeScript Remote (hosted) · Streamable HTTPLocal · stdio Knowledge and memoryDeveloper tools

113 popularity score ★ 64k ↓ 828k/wk

Connect your client

Remote (hosted)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add --transport http context7 https://mcp.context7.com/mcp
Claude (desktop and web)Settings → Connectors → Add custom connector
https://mcp.context7.com/mcp
ChatGPTSettings → Apps → Advanced → Developer mode, then Create app
https://mcp.context7.com/mcp
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "context7": {
      "url": "https://mcp.context7.com/mcp"
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "context7": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp"
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.context7]
url = "https://mcp.context7.com/mcp"
Gemini CLITerminal
gemini mcp add --scope user --transport http context7 https://mcp.context7.com/mcp
Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add context7 -- npx -y @upstash/context7-mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "context7": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.context7]
command = "npx"
args = ["-y", "@upstash/context7-mcp"]
Gemini CLITerminal
gemini mcp add --scope user context7 npx -- -y @upstash/context7-mcp

Settings 1

CONTEXT7_API_KEY Optional: Optional Context7 API key for higher rate limits and private repositories (can also be passed with --api-key, or as an Authorization: Bearer header on the hosted endpoint).

What it does

Context7 is Upstash's MCP server for library documentation. Instead of relying on what a model learned in training, an assistant asks Context7 for the current docs and code examples of a library (for example Next.js, Supabase or MongoDB), optionally for a specific version, and gets them back as text to work from.

It has two tools: one resolves a library name into a Context7 library ID, the other fetches documentation for that ID matched to the user's question. You can name a library ID directly in a prompt (such as /supabase/supabase) to skip the lookup step. The documentation comes from Context7's own index, which is community-contributed; the README notes that its backend, parsing and crawling engines are private and not part of the repository.

You can connect to the hosted endpoint at https://mcp.context7.com/mcp over HTTP, or run the npm package @upstash/context7-mcp locally with npx (Node.js 20.18.1 or newer), which then calls the Context7 API. An API key from context7.com/dashboard is optional and gives higher rate limits and access to private repositories.

What it needs

To run it yourselfNode.js

Tools 2

resolve-library-id
Resolves a general library name into a Context7-compatible library ID, ranked by relevance to the user's question.
query-docs
Retrieves documentation and code examples for a library using a Context7-compatible library ID (e.g. /vercel/next.js) and a question.

Similar servers