Data as of

Context7 for Cursor: Setup & Config

Context7 retrieves current library documentation and code examples for Cursor.

What you can do with Context7 in Cursor

Ground coding assistance in targeted library documentation, including version-specific examples.

  • Resolve an ambiguous library name to a Context7 identifier.
  • Configure an agent to fetch documentation automatically for library questions.

Before you start: Context7 in Cursor

  • Node.js 18 or later for the setup CLI
  • A compatible coding agent or MCP client

This is a setup command, not a persistent server launch. Choose MCP mode during setup. Manual HTTP configuration passes a key in the CONTEXT7_API_KEY header, not an environment variable. A free API key is recommended for higher limits.

Context7 Cursor configuration

  1. Choose Cursor configuration scope

    For Context7, open Project: .cursor/mcp.json User: ~/.cursor/mcp.json. Merge into mcpServers at project or user scope.

  2. Add Context7 to Cursor

    Use the context7-mcp entry below in mcpServers. Keep Context7's documented http connection fields and your other Cursor entries.

  3. Check Context7 in Cursor

    Context7: Enable in Cursor’s MCP settings; inspect tools.

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

JSON
{
  "mcpServers": {
    "context7-mcp": {
      "url": "https://mcp.context7.com/mcp"
    }
  }
}

Context7 tools available to Cursor

Context7's stored tool list documents 2 tools; compare it with Cursor's connected tool list, because the stored list is not a live check.

resolve-library-id

Find resolve-library-id under Context7 in Cursor's MCP settings; inspect its arguments when the agent requests a call.

query-docs

Find query-docs under Context7 in Cursor's MCP settings; inspect its arguments when the agent requests a call.

Retrieve task-relevant documentation for an exact Context7 library ID.

Context7: full stored tool descriptions

Troubleshooting Context7 in Cursor

  • Enable Context7 in Cursor's MCP settings and inspect its tools. For mcp.context7.com, check reachability, transport, and credential expiry if authentication fails.
  • Context7: check http connectivity to mcp.context7.com from Cursor; a stdio command is not a replacement for this endpoint.
  • Transport mismatch: Context7's catalog lists stdio; the displayed Cursor configuration uses http.
  • Known limitation: Community-contributed documentation is not guaranteed accurate, complete, or secure.
  • Known limitation: The backend, parsing engine, and crawler are not included in the repository.
  • Known limitation: Higher rate limits are tied to using an API key.
  • General Cursor troubleshooting lives in the /clients/cursor guide.

Context7 — details. Cursor guide

Frequently asked questions

Cursor's Context7 entry belongs under mcpServers in .cursor/mcp.json (project) or ~/.cursor/mcp.json (user). Confirm the active scope in MCP settings.