What Is Context7 MCP Server?
Context7 MCP Server fetches current library documentation and code examples directly into Claude’s context window at query time, eliminating the need to manually paste docs or work around stale training data. It is maintained by Upstash and published under the @upstash/context7-mcp npm package.
Quick Facts
| Field | Value |
|---|---|
| Package | @upstash/context7-mcp |
| Install | npx @upstash/context7-mcp |
| Compatible with | Claude Code, Claude Desktop |
| Status | active |
| GitHub | https://github.com/upstash/context7 |
What You Can Do With It
- Library documentation lookup: Pull current docs for a library directly into your conversation without leaving your editor.
- API reference retrieval: Fetch endpoint signatures, parameters, and return types for SDKs that change frequently.
- Code examples: Surface working code snippets from official sources rather than relying on Claude’s training cutoff.
- Up-to-date SDK info: Query the latest SDK versions and changelogs to avoid using deprecated methods.
How to Set It Up
Claude Code — run this once in your terminal to add the server to your project:
claude mcp add context7 -- npx @upstash/context7-mcp
**Claude Desktop** — add the following block to your `claude_desktop_config.json` (typically located at `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
```json
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["@upstash/context7-mcp"]
}
}
}
Save the file and restart Claude Desktop. No API key is required to run the server itself — it connects to the Context7 documentation index maintained by Upstash.
To verify the server is running in Claude Code:
claude mcp list
You should see context7 listed as an active server.
Works Best With
Context7 MCP Server is documented as compatible with Claude Code and Claude Desktop. Both clients support the full MCP tool-call flow required for the server to inject documentation into context. Claude Code is the natural fit for active development sessions where you’re iterating on code and need on-demand reference material. Claude Desktop suits exploratory use where you’re asking Claude to explain or demonstrate an API without a project open.
Known Limitations
- Coverage depends on the Context7 index: If a library is not indexed by Upstash’s Context7 service, the server will not be able to retrieve its docs. Niche or very new libraries may return no results.
- Network dependency: Every documentation fetch makes an outbound request. Offline or restricted network environments will break functionality.
- No write or caching controls exposed: There is no documented option to cache responses locally or set a custom documentation source — you get what the Context7 index provides.
- Rate limits: Upstash may enforce rate limits on the underlying documentation API. The specific limits are not published in the current repository documentation; watch for HTTP 429 errors if you are making frequent automated calls.
- Node.js required: Running via
npxrequires a compatible Node.js version installed locally. Check the repository for the minimum supported version if you encounter runtime errors.
Community Resources
- GitHub Repository — primary source for issues, pull requests, and release notes
- GitHub Issues — report bugs or check known problems before filing a new issue
- Upstash Discord — community support channel maintained by Upstash where Context7 questions are fielded



