Fresh docs for LLMs still living on year-old training data
Context7 fetches live library documentation into your LLM's context so it stops hallucinating APIs and serving outdated examples.

What it does
Context7 is a documentation retrieval pipe that hooks into AI coding agents through MCP or a small CLI skill. When your prompt mentions a library, it fetches current, version-specific docs and code examples from its index and injects them directly into the model’s context. The idea is to crowd out the stale training data and generic guesses that LLMs usually fall back on.
The interesting bit
Instead of treating docs as a static reference, Context7 treats them as a live context layer. It offers both an MCP server for tool-native agents and a CLI-plus-skills fallback for editors that don’t speak MCP, suggesting the priority is getting the data into your workflow, not enforcing a protocol.
Key highlights
- Version-aware: mention “Next.js 14” and it targets that release’s documentation.
- Dual-mode integration: an MCP server for native tool calling, or a
ctx7CLI skill for broader agent support. - Direct library addressing via slash syntax (e.g.,
/vercel/next.js) to bypass fuzzy matching. - The index is community-contributed, and the README explicitly disclaims guarantees on accuracy, completeness, or security.
- This repo holds only the MCP server source; the crawling, parsing, and API backend are closed-source.
Caveats
- Documentation quality varies because the index is community-contributed, and the project explicitly disclaims guarantees on accuracy or security.
- The heavy lifting—crawling, parsing, and serving the index—lives outside this repository, so running the full stack offline or self-hosted is not supported by the code here.
Verdict
Useful if you want your Cursor or Claude Code agent to stop hallucinating APIs and start citing current signatures. Less useful if you need a fully offline, auditable documentation pipeline; the backend remains private.
Frequently asked
- What is upstash/context7?
- Context7 fetches live library documentation into your LLM's context so it stops hallucinating APIs and serving outdated examples.
- Is context7 open source?
- Yes — upstash/context7 is open source, released under the MIT license.
- What language is context7 written in?
- upstash/context7 is primarily written in TypeScript.
- How popular is context7?
- upstash/context7 has 59.6k stars on GitHub and is currently accelerating.
- Where can I find context7?
- upstash/context7 is on GitHub at https://github.com/upstash/context7.