Server facts
Context7 MCP Server
Project
- Author
- upstash
- Repository
- github.com/upstash/context7-mcp
- Website
- context7.com
- License
- MIT
- Category
- Developer Tools
Tech
- Runtime / language
- node
- Transports
- stdio
- Remote available
- No
- Authentication
- Not specified
Activity
- GitHub stars
- 63,157
- Last commit
- Data as of
Tags
- Code Examples
- Coding Agents
- Documentation
- Library Lookup
- Version Specific
Overview
Context7 supplies coding assistants with library documentation and examples retrieved for the task at hand. It is intended to address the mismatch between a model's training knowledge and a project's current APIs or package versions. Users can request documentation through an ordinary prompt, identify a library directly with its Context7 ID, or mention a desired version. The MCP interface separates library resolution from documentation retrieval: one tool finds the correct identifier, and another queries relevant material for that library. This gives assistants a documented retrieval route instead of relying exclusively on recalled API usage.
The platform also offers a CLI and skills mode that does not require MCP. Its setup command runs through npx, requires Node.js 18 or later, authenticates with OAuth, creates an API key, and installs the selected integration. Manual MCP configuration uses a hosted endpoint and an API-key header; a free key is recommended for higher limits. The README provides client guidance and instructions for automatically invoking documentation retrieval on library-related tasks. It also sets important boundaries: listed documentation is community-contributed and is not guaranteed complete, accurate, or secure. Only the MCP server source is in this repository; the API backend, parser, and crawler are private. Those distinctions matter for anyone expecting a fully self-contained documentation platform.
Install & configure
Requirements
- Node.js 18 or later for the setup CLI
- A compatible coding agent or MCP client
npx ctx7 setupThis is a setup command, not a persistent server launch. Choose MCP mode during setup. Manual HTTP configuration passes a key in the CONTEXT7_API_KEY header, not an environment variable. A free API key is recommended for higher limits.
Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.
A supported configuration example is not available for this client and transport. Check the client documentation for its connection flow; do not substitute an undocumented JSON format.
Read the Claude Desktop setup guideConfig file · Project: .cursor/mcp.json
User: ~/.cursor/mcp.json
The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"context7-mcp": {
"url": "https://mcp.context7.com/mcp"
}
}
}Config file · Workspace: .vscode/mcp.json
For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.
{
"servers": {
"context7-mcp": {
"type": "http",
"url": "https://mcp.context7.com/mcp"
}
}
}Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"context7-mcp": {
"serverUrl": "https://mcp.context7.com/mcp"
}
}
}Config file · Project scope: .mcp.json at the repository root
The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"context7-mcp": {
"type": "http",
"url": "https://mcp.context7.com/mcp"
}
}
}Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Tools
Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.
| Tool | What it does |
|---|---|
| resolve-library-id | Match a library name and task to a Context7 library identifier. |
| query-docs | Retrieve task-relevant documentation for an exact Context7 library ID. |
Names, permissions, and defaults can change. Check the current upstream documentation before granting access.
Use cases
- Retrieve library-specific API documentation while generating code.
- Find examples for a particular framework or package version.
- Resolve an ambiguous library name to a Context7 identifier.
- Configure an agent to fetch documentation automatically for library questions.
Strengths
- Supports version-aware documentation and code examples.
- Offers both MCP tools and a CLI-and-skills mode.
- Allows direct library IDs to skip library matching.
Limitations
- Community-contributed documentation is not guaranteed accurate, complete, or secure.
- The backend, parsing engine, and crawler are not included in the repository.
- Higher rate limits are tied to using an API key.
Frequently asked questions
Independent listing, not an affiliation or security review. Grant the least access needed and verify the upstream instructions before running code.