MCP servers / Context7

Context7 MCP server: setup for Claude Code, Claude Desktop and Cursor

Context7 gives your AI current documentation and code examples for libraries and frameworks, so it stops guessing at APIs from memory. It has two tools: one finds the right library, the other pulls the relevant docs.

The server also tells the AI when to use it. Its built-in instructions say to reach for it whenever you ask about a library, framework, SDK, API or CLI tool, and to prefer it over a web search for library docs.

Runs with
npx (Node.js)
Package
@upstash/context7-mcp on npm
Needs
Node.js (for npx). No account needed to start.
Tools
2 (2 read-only)
Source
upstash/context7
Last checked
2026-09-20 (server reported version 4.1.1)

Config for Context7

Generated by the same code as the free builder, so it matches what you get there. Pick your client, then copy.

Works without a key. A free API key from context7.com raises the rate limits.

Claude Code

Save as .mcp.json in your project root. Claude Code asks you to approve it the first time.

Claude Code config
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ]
    }
  }
}

Or add it from a terminal instead (single quotes work in bash, zsh and PowerShell; more on this command):

Terminal command
claude mcp add context7 -- npx -y @upstash/context7-mcp

Claude Desktop

Merge into claude_desktop_config.json (Settings → Developer → Edit Config), then fully quit and restart Claude Desktop.

Claude Desktop config
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ]
    }
  }
}

Cursor

Save as .cursor/mcp.json in your project, or ~/.cursor/mcp.json for all projects.

Cursor config
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ]
    }
  }
}

What it can do

These are all 2 tools the server reported when we started it and asked on 2026-09-20. The labels come from the hints each tool declares about itself.

Watch out for

Try asking

Related servers

Building a full setup? Combine this with other servers in the config builder. Trouble connecting? See fixing connection errors.

Open the config builder Get early access to Pro