Context7 MCP and Skills setup

Use Context7 when code depends on a library or framework whose APIs may have moved since the model’s training cutoff. Prefer it over guessing from memory for version-sensitive work.

Cursor

  1. Install the Context7 marketplace / MCP plugin for Cursor when available, or register the server in ~/.cursor/mcp.json per current Context7 docs.

  2. Complete any auth / API-key step Context7 requires (mcp_auth or account settings).

  3. Start a new agent chat so the MCP tool list refreshes.

  4. In agent rules, keep a thin always-on pointer (as in Dev-Centr agent-rules): prefer Context7 for stale APIs; fall back to the Outdated Code Protocol / local library docs when Context7 is unavailable.

Confirm the live install URL and mcp.json shape on context7.com — marketplace deeplinks change; do not invent endpoints.

When to call it

  • Generating or editing code against a specific library version

  • Migrating APIs (auth, routing, ORM, UI kit)

  • Reviewing whether an example from chat still matches current docs

Do not use Context7 for business logic unique to your repo, or for docs you already index locally under docs/_local-library-docs/ / AI-LOCAL-LIBRARY-DOCS.local.json5.

Skills

If Context7 ships Agent Skills with the plugin, leave them enabled—they teach the search → resolve-library → query-docs loop. Do not paste that curriculum into always-on User Rules. See Bootstrap Cursor skills.