- Home
- MCP servers
- Context7
Context7
- typescript
0
GitHub Stars
typescript
Language
4 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Context7 MCP is a server that provides up-to-date, context-specific code documentation and library information directly to your prompts. It helps you retrieve current library docs and IDs without relying on stale data, enabling you to write accurate, working code faster.
How to use
You use Context7 MCP by connecting it to your MCP client and then asking for library docs or IDs. Start by adding Context7 as an MCP server in your client, provide your API key if you have one, and then request a library ID or docs. Context7 will resolve the library, fetch its documentation, and return it in your prompt context so you can proceed with implementation, integration, or learning steps.
How to install
# Prerequisites
node --version
# Ensure Node.js 18+ is installed
# Install a client that supports MCP (examples: Cursor, Windsurf, VS Code, etc.)
# Remote HTTP server connection example (copy this into your MCP client configuration):
# HTTP remote connection uses the MCP URL
{
"mcpServers": {
"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp",
"headers": {
"CONTEXT7_API_KEY": "YOUR_API_KEY"
}
}
}
}
Additional sections
Context7 MCP provides a set of tools to work with libraries and documentation. You can use these tools to locate a library’s Context7-compatible ID and fetch its documentation, then focus your prompts on specific topics or tokens.
Security and config notes
- Use a strong, unique API key if you enable authenticated access. - If you are behind a proxy, Context7 uses the HTTPS_PROXY/https_proxy environment variables. - Prefer HTTP transport over SSE where possible, as SSE support is deprecated in upcoming releases.
Troubleshooting
If you encounter module or resolution issues, try alternative runtimes or command invocations as described in your MCP client’s environment. Common remedies include using bunx instead of npx, using deno, or ensuring you run with Node.js v18+ for native fetch support.
Available tools
resolve-library-id
Resolves a general library name into a Context7-compatible library ID.
get-library-docs
Fetches documentation for a library using a Context7-compatible library ID.