Context7 MCP
MCP server that injects up-to-date, version-specific library documentation and code snippets into an LLM's context.
Context7 MCP
Context7 pulls current, version-specific documentation and working code examples for thousands of libraries directly into your LLM's context. It targets a common failure mode of coding assistants — stale training data producing hallucinated or outdated APIs — by fetching real docs on demand as an MCP server.
Add "use context7" to a prompt and the model retrieves relevant, pinned documentation before it writes code.
Key features
- Up-to-date, version-pinned docs and snippets for popular frameworks and libraries
resolve-library-idandget-library-docsMCP tools- Reduces API hallucinations by grounding generation in real documentation
- Works with Claude Code / Desktop, Cursor, VS Code, Windsurf, Zed, and other MCP clients
- Simple
npxinstall, no local index to maintain
Usage note: add the Context7 server to your MCP client config, then reference it in prompts (or let the client auto-invoke it) when generating or debugging library code.
Curated mirror of the open-source Context7 MCP (MIT). Get it from the source.