MCP ConfigsMar 31, 2026·2 min read

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.

TL;DR
Context7 is an MCP server that feeds AI code editors current documentation for 1000+ libraries to prevent outdated hallucinations.
§01

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.

§02

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.

§03

How to use

  1. Add Context7 to your MCP configuration:
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@context7/mcp@latest"]
    }
  }
}
  1. Restart your AI editor.
  2. Context7 automatically provides relevant documentation when the agent generates code using supported libraries.
§04

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.

§05

Related on TokRepo

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.

§06

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

How many libraries does Context7 support?+

Context7 supports over 1000 libraries and frameworks. The catalog is continuously updated. Popular frameworks like React, Next.js, FastAPI, and Django are included.

Does Context7 send my code to external servers?+

Context7 sends library queries (not your code) to its servers to fetch current documentation. Your actual source code stays local.

Which AI editors work with Context7?+

Any MCP-compatible editor works, including Claude Code, Cursor, Windsurf, and other editors that support the Model Context Protocol.

How current is the documentation?+

Context7 crawls and indexes library documentation regularly. The docs are typically current within days of official releases. The exact freshness depends on the library.

Is Context7 free?+

Context7 offers a free tier for individual developers. Check the Context7 website for current pricing on team and enterprise usage.

Citations (3)
🙏

Source & Thanks

Created by Upstash. Licensed under MIT. upstash/context7 — 51,000+ GitHub stars

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.