Context7 documentation MCP server

Upstash's hosted documentation server that returns current, version-specific library docs and code examples to coding agents. Works without authentication at lower rate limits; a free API key raises them.

Remote (HTTP)No auth

Set up Context7

Configuration examples, not tested connections. Replace placeholders and review the upstream documentation before use.

Claude Code

Run in your terminal.

claude mcp add --transport http context7 https://mcp.context7.com/mcp

Cursor

Merge into ~/.cursor/mcp.json

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

Codex

Run in your terminal.

codex mcp add context7 --url https://mcp.context7.com/mcp

Gemini CLI

Merge into ~/.gemini/settings.json

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

OpenCode

Merge into ~/.config/opencode/opencode.jsonc

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "context7": {
      "type": "remote",
      "url": "https://mcp.context7.com/mcp",
      "enabled": true
    }
  }
}

VS Code

Merge into .vscode/mcp.json

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

Using more than one server?Add to a config with other servers

Step-by-step setup guides: Claude Code and Codex CLI, Cursor and VS Code. In Claude Desktop, add the URL as a custom connector. This is a remote server; see remote vs local servers and authentication and security basics.

Overview

Context7 is a documentation service from Upstash, maintained in the upstash/context7 repository. Release 4.3.0 shipped on 9 October 2026. It addresses a common problem with coding agents: they often write code against an older version of a library. Context7 fetches current documentation and examples for the library you are actually using.

The hosted server at https://mcp.context7.com/mcp exposes two tools. resolve-library-id turns a name such as "next.js" into a Context7 library ID, and query-docs retrieves documentation and code examples for that ID, optionally focused on a topic. If you already know the ID, for example /supabase/supabase, you can name it in your prompt and skip the lookup. You can also ask for a specific version.

We confirmed on 11 October 2026 that the endpoint answers without credentials, so the example adds it with no authentication. Upstash recommends a free API key from the Context7 dashboard for higher rate limits. You send it as an Authorization: Bearer header, and upstream lists the exact syntax for each client. Upstash also offers npx ctx7 setup, which signs you in, creates a key and configures supported agents, either as an MCP server or as a CLI-plus-skills setup.

Example tools

  • resolve-library-id
  • query-docs

Tool names are upstream examples. The server's live tool list can differ.

Browse Developer Tools servers

Sources

This page was written from the upstream documentation below and last reviewed on 11 October 2026. Listing is not a security or compatibility endorsement. Report a correction through the contact page.