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.
Safe staging for this asset
This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.
npx -y tokrepo@latest install 80630bbc-db0f-4254-bed5-8e5b639e5a34 --target codexStages files first; activation requires review of the staged README and plan.
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
Discussion
Related Assets
Google Workspace MCP — Gmail Drive Calendar for AI
Official Google CLI with built-in MCP server for all Workspace APIs. One command gives AI agents access to Gmail, Drive, Calendar, Docs, Sheets, and 10+ Google services.
Notte — Browser Automation MCP for AI Agents
MCP server that turns web browsers into AI agent tools. Notte provides structured browser actions like click, type, navigate, and extract for LLM-driven automation.
Puppeteer MCP — Headless Chrome Server for AI Agents
MCP server wrapping Google Puppeteer for headless Chrome automation. Navigate pages, screenshot, generate PDFs, scrape SPAs, and test web apps through AI agent commands. 2,000+ stars.
pentest-ai — Offensive Security MCP for Claude Code
pentest-ai is a Python CLI and MCP server that lets Claude Code run verified probes, chain attack paths, and export reports for authorized testing.