cursor mcpindependent directory
Context7 logo

Servers / Context7

Install Context7 MCP in Cursor

Upstash · Remote HTTP · Optional API key

Direct answer

Add Context7 to Cursor as a remote MCP server at https://mcp.context7.com/mcp. Put that URL in ~/.cursor/mcp.json under mcpServers.context7.url, or in .cursor/mcp.json for one project. Restart Cursor, then confirm context7 is on in Settings, Tools & MCP. An API key is optional for higher limits.

ProviderUpstash
Classificationofficial
TransportRemote HTTP
AuthOptional API key

Cursor mcp.json

Paste this into ~/.cursor/mcp.json (global) or.cursor/mcp.json (this repo). Merge it with servers you already have. Primer: how Cursor loads MCP.

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

MCP endpoint: https://mcp.context7.com/mcp. Source: context7.com MCP docs.

What it is

Context7 is Upstash's hosted documentation MCP. Cursor already sees your repo. It does not see today's Next.js, Stripe, or Tailwind docs unless you fetch them. Context7 is that fetch: library IDs, ranked pages, token-capped excerpts the agent can cite while it writes.

The problem it solves

Without it, Cursor will invent APIs that used to exist, or that never did. That shows up as imports that do not compile and config keys the library dropped last month.

Install steps

  1. Open the MCP config. In Cursor, go to Settings, then Tools & MCP, then New MCP Server. That opens mcp.json. Use ~/.cursor/mcp.json for every workspace, or .cursor/mcp.json in a repo for just that project.
  2. Paste the Context7 server. Add a context7 entry whose url is https://mcp.context7.com/mcp. Save the file.
  3. Restart and check the tools. Reload Cursor. Context7 should show as connected under Tools & MCP, with its doc tools listed. If you have a Context7 API key, add it as a header the same way the official docs show.

A prompt that uses it

Look up the current Next.js App Router docs with Context7 and rewrite this route handler against the live API, not against what you remember.

If it will not connect

If the row stays red, confirm the URL is exactly https://mcp.context7.com/mcp with no trailing path change. Then check you are not behind a proxy that blocks Streamable HTTP. A missing optional API key should still connect; it only changes rate limits.

FAQ

What is the Context7 MCP URL for Cursor?

https://mcp.context7.com/mcp. Put it on the context7 server as url in mcp.json.

Do I need a Context7 API key?

No for a first install. A key raises limits. Get one from the Context7 dashboard if the free quota is not enough.

Should I use npx @upstash/context7-mcp instead?

Only if you cannot reach the hosted endpoint. The remote URL is the install this directory documents.

Does Context7 write to my repo?

No. It returns documentation. Cursor still edits files with its own tools.