What is this?
Context7 fetches up-to-date, version-specific documentation and code examples for the libraries you use and injects them directly into your AI coding agent's prompt, instead of relying on the model's stale training data.
Is this a CLI, an MCP server, or both?
It works in two modes: the ctx7 CLI installs a skill that fetches docs via commands without needing MCP, or you can register Context7 as an MCP server so your agent calls documentation tools natively.
How do I set it up for my coding agent?
Run the setup command with a flag for your agent, e.g. targeting Cursor, Claude Code, or OpenCode; it authenticates via OAuth, generates an API key, and installs the right skill or MCP config automatically.
Do I need Node.js or an API key first?
You need Node.js 18 or newer to run the ctx7 CLI; an API key is recommended (free, from context7.com/dashboard) for higher rate limits but isn't strictly required.
Can I trust every library's documentation in Context7?
Not fully — the documentation entries are community-contributed, so accuracy and security aren't guaranteed, and the API backend, parsing, and crawling engine that actually power the service are private and not part of this repo.
Which coding agents are supported out of the box?
The setup CLI has flags for Cursor, Claude Code, and OpenCode (--cursor, --claude, --opencode), and manual MCP setup instructions are provided for over 30 other clients.
What tools does the MCP server expose?
resolve-library-id turns a library name into a Context7-compatible ID, and query-docs retrieves the actual documentation for that ID given your question or task.
What packages does this project publish?
It ships @upstash/context7-mcp (MCP server), ctx7 (CLI), @upstash/context7-sdk (TypeScript SDK), @upstash/context7-tools-ai-sdk (Vercel AI SDK tools), and @upstash/context7-pi (pi.dev extension).
Can I pin a specific library version?
Yes — just mention the version in your prompt or use a library ID like /vercel/next.js, and Context7 matches and fetches that exact version's docs.
What are similar projects?
wigolo, claude-context, overmind, nocobase, headroom, openwiki, oar, agent-skills
Which topics is it in?
documentation-tool, vibe-coding, opencode, knowledge-base, model-context-protocol, cursor, documentation, sdk, rest-api, coding-agent, mcp-server, npm