Context7 — Up-to-Date Docs MCP for AI Editors
MCP server that provides AI code editors with up-to-date library documentation. Eliminates hallucinations from outdated training data. Supports 1000+ libraries. 51K+ stars.
What it is
Context7 is an MCP server that provides AI code editors with up-to-date library documentation. When your AI assistant generates code, Context7 ensures it references current API signatures, not outdated information from training data. It supports over 1000 libraries and integrates with Claude Code, Cursor, and Windsurf.
It targets developers who encounter AI-generated code using deprecated APIs or outdated patterns because the model's training data is stale.
How it saves time or tokens
Without Context7, you spend tokens correcting AI-generated code that uses deprecated APIs. Context7 injects current documentation into the agent's context, so the first response uses correct, up-to-date APIs. This eliminates correction rounds.
How to use
- Add Context7 to your MCP configuration:
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "@context7/mcp@latest"]
}
}
}
- Restart your AI editor.
- Context7 automatically provides relevant documentation when the agent generates code using supported libraries.
Example
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "@context7/mcp@latest"]
}
}
}
Once configured, ask your AI to write code using any supported library. Context7 fetches current docs and the AI generates code with the latest API signatures.
Related on TokRepo
- AI Tools for Coding — AI-powered development tools
- AI Tools for Documentation — Documentation and knowledge tools
Key considerations
When evaluating Context7 for your workflow, consider the following factors. First, assess whether your team has the technical prerequisites to adopt this tool effectively. Second, evaluate the maintenance burden against the productivity gains. Third, check community activity and documentation quality to ensure long-term viability. Integration with your existing toolchain matters more than feature count alone. Start with a small pilot project before rolling out across the organization. Monitor resource usage during the initial adoption phase to identify bottlenecks early. Document your configuration decisions so team members can onboard independently.
Common pitfalls
- Context7 fetches documentation on demand; slow internet connections may increase response latency.
- Not all libraries are covered; niche or private libraries may not have documentation indexed.
- The MCP server runs locally but fetches docs from Context7's servers; it does not work fully offline.
Frequently Asked Questions
Context7 supports over 1000 libraries and frameworks. The catalog is continuously updated. Popular frameworks like React, Next.js, FastAPI, and Django are included.
Context7 sends library queries (not your code) to its servers to fetch current documentation. Your actual source code stays local.
Any MCP-compatible editor works, including Claude Code, Cursor, Windsurf, and other editors that support the Model Context Protocol.
Context7 crawls and indexes library documentation regularly. The docs are typically current within days of official releases. The exact freshness depends on the library.
Context7 offers a free tier for individual developers. Check the Context7 website for current pricing on team and enterprise usage.
Citations (3)
- Context7 GitHub— MCP server for up-to-date library documentation
- Context7 Official Site— Supports 1000+ libraries for AI editors
- MCP Official Docs— Model Context Protocol integration
Related on TokRepo
Source & Thanks
Created by Upstash. Licensed under MIT. upstash/context7 — 51,000+ GitHub stars