Third-party toolUpdated 2026.11.16

Context7 Setup: Claude Code, Codex, Cursor and Fixes

Context7 installation and getting started: client setup or a local workflow, three practical examples, tested findings, common errors, costs and alternatives.

Aaron recommends Open official GitHub

Context7 supplies library documentation and examples to coding agents. Use it when an answer depends on a particular API version. Resolve the library first, request the relevant documentation, and compare the returned version or source tag with your project. A document response alone does not prove an exact version match.

Install and choose a working environment

Tool version 4.7.0. Documentation checked 2026-11-16. The upstream source snapshot and installed package are pinned separately; the snapshot is not claimed to be the package’s release commit.

node --version
npx -y @upstash/context7-mcp@4.7.0 --help

These settings use the officially documented stdio configuration format. They are documentation-based and were not tested inside the three client apps. Tool version: 4.7.0; client documentation checked 2026-11-16 (rolling docs, no fixed client release claimed).

Claude Code

claude mcp add --transport stdio context7 -- npx -y @upstash/context7-mcp@4.7.0
claude mcp get context7

Open /mcp in Claude Code and verify the server and discovered tools.

Claude Code official MCP configuration

Codex

codex mcp add context7 -- npx -y @upstash/context7-mcp@4.7.0
codex mcp list

Start a fresh session and check the server’s tools before running the examples.

Codex official MCP configuration

Cursor

Merge this entry into the project’s .cursor/mcp.json; preserve other entries. Enable it in Cursor’s MCP settings and inspect the tool list.

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp@4.7.0"
      ]
    }
  }
}

Cursor official MCP configuration

On Windows, if npx fails to launch, use command cmd with args beginning /c, npx, then the same arguments. For example, the CLI launch portion becomes -- cmd /c npx -y <the pinned package above>. Do not change package versions while troubleshooting.

Three practical uses

1. Check an installed API

Read package.json and the lockfile. Use Context7 to look up the matching Next.js middleware/proxy API. Show the installed version, source version and a minimal example without editing files.

Expected: a response that follows the stated scope and exposes the requested source or tool result. Verify those references before acting.

2. Find a specific SDK recipe

Use Context7 to find Supabase JavaScript email/password sign-in. Include the source link, version assumptions and error handling. Say when the requested version is unavailable.

Expected: a response that follows the stated scope and exposes the requested source or tool result. Verify those references before acting.

3. Review a migration before editing

Compare the official migration guidance for the installed and target library versions. Use Context7, cite three changes affecting existing calls, and do not perform the upgrade.

Expected: a response that follows the stated scope and exposes the requested source or tool result. Verify those references before acting.

What our tests established

Earlier work captured public documentation responses and replayed them through MCP 4.7.0 offline. Exact-version and fallback responses differed in source tags and version notes; failure results exposed isError. Live index completeness, paid plans and client integrations were not tested.

Tests were run by Codex on synthetic data; no claim of the owner personally testing or reviewing this guide. Examples added above are documentation-based unless included in that recorded scope.

Common errors and fixes

Wrong library matched

Inspect the repository and documentation URL in the resolution result; specify the exact library ID when known.

Requested version is unavailable

Check the version note and source tag. A fallback is not an exact version hit; use the versioned upstream docs when necessary.

Rate limit, authorization or connectivity error

Back off and check the current service policy. Configure your own key if required; installing the package does not create an offline documentation index.

Limits, costs and license

The MCP code is MIT licensed. Hosted service limits and pricing are separate and can change; this guide promises no anonymous quota or fixed price. Queries reach an external service, so avoid confidential code.

When to choose an alternative

  • For reading documentation already in your project:Filesystem MCP。

  • For preparing repository context:Repomix。

FAQ

How do I connect Context7 to Claude Code?

Use the local stdio configuration below; follow the official client guide if the service requests authorization.

Does the local server work offline?

No. The local MCP process still queries the documentation service.

Does a result always match the requested GitHub version?

No. Inspect the source tag and version note; mark an unverified match explicitly.

Official sources

When adding documentation lookup to a development workflow, read FastMCP's server example. If the tool connection fails, check it through MCP Inspector's diagnostic workflow. If a Skill calls the lookup, first inspect the Skill with SkillSpector.

Subscribe to AI tool picks and practical advice

Get worthwhile tool picks, test findings and important updates in your inbox.

Get a monthly-updated list of AI tools and Skills right away. We email when there are worthwhile tool picks, test findings or important updates. Unsubscribe anytime. Privacy

Almost done: check your inboxClick the button in the confirmation email and you will get the download link for the tool list. If you do not see it, check your spam or Promotions folder.

Or follow us on: