MCP server · Docs and web search
Context7 MCP server
Pulls current, version-specific library documentation and code examples into an assistant’s context on request.
- Maintainer
- Upstash (official)
- Licence
- MIT
- Runs
- Remote (URL)
- Sign-in
- Optional token
- Registry version
- 4.4.1 (updated 2026-10-13)
- Last activity
- 2026-10-13
Overview
What it does
Context7 is an Upstash service that indexes documentation for a large number of libraries and serves it to assistants. The MCP server has two tools: resolve-library-id turns a library name into a Context7 ID such as /vercel/next.js, and query-docs returns the relevant documentation and code snippets for a question. The hosted endpoint is the documented manual setup; a local npm package and a ctx7 command-line tool with skills are also offered.
Use it when an assistant keeps suggesting outdated or invented APIs. Mention a version in your prompt to get docs for that version, or give the library ID to skip the matching step. It works without a key at lower rate limits; a free API key from the Context7 dashboard raises them, and OAuth is supported at a separate /mcp/oauth URL. The repository holds only the MCP server; the API backend and crawler are private, and library entries are contributed by the community.
Tools
What the assistant can do
- Resolve a library name to a Context7 library ID
- Query documentation and code examples for a library ID
- Rank code examples by programming language
- Match the library version mentioned in a prompt
Install
Install Context7 MCP server in your app
You need:
- An MCP client that supports remote HTTP servers
- A free Context7 API key for higher rate limits (optional)
Run in your project. --scope local keeps the servers private to you in this project; use user for every project.
claude mcp add --scope local --transport http context7 https://mcp.context7.com/mcp
Project root. Commit it to share the servers with your team; each person sets the variables in their own shell.
{
"mcpServers": {
"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp"
}
}
}
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json (Settings → Developer → Edit Config). Restart Claude after saving.
{
"mcpServers": {}
}
- context7 is a remote server: add it as a custom connector (Customize → Connectors → + Add → Add custom connector; on Team and Enterprise plans an owner adds it under Organization settings → Connectors), with the URL https://mcp.context7.com/mcp.
In your project, or ~/.cursor/mcp.json for every project.
{
"mcpServers": {
"context7": {
"url": "https://mcp.context7.com/mcp"
}
}
}
In your workspace. VS Code asks for each secret the first time a server starts and stores it securely.
{
"servers": {
"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp"
}
}
}
macOS/Linux: ~/.config/devin/mcp_config.json · Windows: %APPDATA%\devin\mcp_config.json. Read by the default Devin Local agent and by the legacy Cascade agent.
{
"mcpServers": {
"context7": {
"url": "https://mcp.context7.com/mcp"
}
}
}
Want it alongside other servers? Open Context7 in the MCP config generator and add the rest; it writes one file per app. The snippets follow the setup in the server’s README, checked on 2026-10-14.
Before you install
- Your queries and library names are sent to Upstash’s hosted service.
- Library docs are community-contributed and Upstash does not guarantee their accuracy or safety, so treat returned snippets as untrusted input.
- It is read-only: it has no access to your files or accounts.
- A remote server sees whatever the assistant sends it. Sign in with the narrowest access the service offers. See how to choose a safe server.
Why it’s listed
Why we list it
The most popular way to give coding assistants current library docs, with very frequent releases and a key-less start.
Related
More MCP servers
- Microsoft Learn MCP ServerLets an assistant search and read official Microsoft documentation and code samples, free and with no sign-in.
- DeepWiki MCPLets an assistant read DeepWiki’s generated docs for public GitHub repositories and ask questions about them.
- Brave Search MCP ServerLets an assistant search the web, news, images, videos and local places through the Brave Search API.
- Exa MCP ServerLets an assistant search the web with Exa and read pages as clean Markdown, with optional multi-step research.
- Tavily MCP ServerLets an assistant search the web in real time, extract page content, and map or crawl a website through Tavily.
- Firecrawl MCP ServerLets an assistant scrape, search, map and crawl websites through Firecrawl and get clean Markdown or structured JSON back.
All MCP serversMCP config generatorGuide: MCP servers in Claude CodeGuide: what is MCP?