Tools

Context7: stop AI from coding against outdated APIs

TL;DR

Context7 (Upstash, MIT) fetches up-to-date, version-specific docs and code examples into your agent's context. Install with npx ctx7 setup (choose CLI + Skill or MCP mode), or point an MCP client at https://mcp.context7.com/mcp with an API key. Especially useful for fast-moving frameworks.

What it fixes

  • Examples using deprecated APIs.
  • Hallucinated functions that don't exist.
  • Generic answers for old versions.

Install

npx ctx7 setup            # Node 22.13+, OAuth + API key
npx ctx7 setup --claude   # target Claude Code only

Usage

Create a Next.js middleware that checks a JWT cookie
and redirects unauthenticated users to /login. use context7
ModeWhen to choose
CLI + SkillNo extra MCP server; the agent calls ctx7 when needed
MCPAgent calls doc tools natively, shared across clients