What it does
Context7 fetches up-to-date, version-specific documentation and code examples from library sources and injects them directly into your LLM prompt. Instead of relying on training-data documentation or generating hallucinated APIs, it retrieves current docs for the exact library and version you're using. Works via CLI + Skills integration or as an MCP server. Specify a library ID or version in your prompt, and Context7 resolves it and returns relevant code samples and documentation snippets.
Who it's for
Backend and fullstack engineers using Claude Code, Cursor, or other LLM agents to generate code that must match current library APIs. Ideal for anyone working with frequently-updated libraries or unfamiliar versions, and anyone tired of dealing with outdated code examples or hallucinated function names in LLM output.
Common use cases
- Look up correct API signatures and setup patterns for frameworks like Next.js, Supabase, or Cloudflare Workers
- Get version-specific code examples that match your project's dependencies
- Query library-specific configuration without leaving your IDE or agent
- Prevent hallucinated APIs by grounding requests in current source documentation
Setup pitfalls
- Detected 6 secrets in code — audit before using in shared or production environments
- Requires API key from
context7.com/dashboardfor higher rate limits (free tier available) - Manual MCP setup requires passing
CONTEXT7_API_KEYvia environment variable or header - Needs Node.js 18+ for CLI tool; MCP server compatible with any MCP client
- Makes network calls to Context7 servers — ensure firewall rules allow HTTPS to
mcp.context7.com