Context7
FreemiumUp-to-date library documentation served to agents over MCP, so they stop coding against stale training data.
What it is
Context7, made by Upstash, is "up-to-date documentation for LLMs and AI code editors". It indexes the documentation of thousands of libraries, frameworks and services, keeps the index current, and serves the relevant slice through an MCP server. When an agent is about to write code against Next.js, Hono, Stripe or the Cloudflare Workers API, it first resolves the library id, then queries the docs for the specific question, and writes code from what the docs say today rather than from what the model remembers from training. Anyone can add a library to the index, and there is a ranking of the most requested ones.
There is a free tier for individual use and paid plans listed on the site's plans page; the free tier is enough for one developer's daily use.
Where it fits in the AI OS
Personal & corporate AI OS, the "knows the current docs" layer, and in the Build direction the single largest reducer of hallucinated APIs. The corporate version of the same idea is pointing the same mechanism at your own internal docs.
Insider notes
membersHow Serge's stack uses it
Context7's MCP server is configured for the project's Claude Code sessions with the instruction to use it for any library, framework, SDK, API or cloud-service question rather than answering from memory. Which specific libraries it is consulted for most is not documented.
[SERGE: fill in]
Setup in 5 minutes
- In Claude Code:
claude mcp add context7 -- npx -y @upstash/context7-mcp(see the site's Install page for the current command and for Cursor, VS Code and Windsurf variants). - Get a free API key from the site and set it if the install page asks for one.
- Add one line to
CLAUDE.md: "Use Context7 for library and API documentation before writing code against it." - Ask: "How do I define a D1 binding in wrangler.toml, per the current docs?" and watch it resolve
cloudflare/workersfirst. - Add your own library's docs through the site if it is missing.
Alternatives
- Fetching docs pages with a web tool — works, slower, noisier.
llms.txtfiles — many projects publish one; no search across libraries.- Cursor's built-in docs indexing — editor-specific.
- Your own RAG over vendored docs — for internal documentation.