Pod to App: Cursor
How to install Context7 in Cursor
By Sophie Filer · Updated 11 Nov 2026 · Steps checked against Context7's own docs on 11 Nov 2026
The short answer
Run npx ctx7 setup --cursor. It signs you in, creates an API key and installs a skill that makes Cursor fetch current library docs on its own. Then ask Cursor about a library and add "use context7" when you want to be sure.
npx ctx7 setup --cursor- Install
- npx ctx7 setup --cursor
- Sign-in
- OAuth, or an API key
- Works in
- Editor and Cloud Agents
- Price
- Free tier
Install it step by step
- Step 1: Check
node --versionis 22.13 or newer; the setup tool needs it. - Step 2: Run
npx ctx7 setup --cursorand sign in when the browser opens. - Step 3: Choose MCP mode to add the Context7 server to Cursor, or CLI mode to install a skill that calls the
ctx7command instead. - Step 4: Restart Cursor. In MCP mode, context7 shows under Cursor's MCP settings with two tools:
resolve-library-idandquery-docs. - Step 5: Ask in Agent chat: "use context7 to show me how to set up a proxy in Next.js 16".
There is also an Add to Cursor button in the Context7 README that installs it from the Cursor marketplace. npx ctx7 remove undoes the CLI setup.
Make Cursor use it without asking
The setup skill triggers Context7 for library questions. If you added the server by hand, or want to be explicit, add a rule. Go to Cursor, Settings, Cursor Settings, Rules and Commands, and add:
Always use Context7 MCP when I ask about library documentation,
API references, or need code examples from external packages.Or keep it with the project: put a similar instruction in a .cursorrules file in the repo root, so everyone on the team gets the same behaviour.
Name the library to save a step
Normally Cursor first looks up the library, then fetches docs. If you know the Context7 ID, give it and it goes straight to the docs:
use context7 with /supabase/supabase for authentication docs
use context7 with /vercel/next.js for app router setupCursor Cloud Agents need their own setup
Cloud Agents do not read your local Cursor MCP config. If Context7 works in the editor but not in a Cloud Agent, add it in the Cloud Agent itself: open + (Add context and tools), MCP Servers, Add MCP, then Custom MCP, and enter:
{
"mcpServers": {
"context7-api-key": {
"url": "https://mcp.context7.com/mcp",
"headers": {
"Context7-API-Key": "YOUR_CONTEXT7_API_KEY"
}
}
}
}Troubleshooting
| What you see | What to do |
|---|---|
| Setup fails straight away | Node.js is older than 22.13. Update it, or add the server by hand with the URL https://mcp.context7.com/mcp and a Authorization: Bearer header. |
| context7 is green but never used | Add the rule above, or say "use context7" in the prompt. |
| Works locally, not in a Cloud Agent | Cloud Agents need the server added in their own MCP menu, with the API key header. |
| Rate limit errors | Get a free API key from the Context7 dashboard and use it. |
MCP Shelf take
Is Context7 worth adding to Cursor?
Context7 is one of the first servers we would add to Cursor. It costs almost nothing in context (two tools) and fixes a daily annoyance: the agent writing code for an old version of a library. The difference shows most with fast-moving tools like Next.js, Tailwind or Supabase. Let ctx7 setup install the skill so you do not have to remember to ask, and if you use Cloud Agents, set those up separately or you will wonder why the same prompt behaves differently there.
Sophie Filer
Questions
Do I need an API key for Context7 in Cursor?
Not for the editor if you use OAuth through ctx7 setup. Cursor Cloud Agents need an API key in a header, which you create in the Context7 dashboard.
Should I pick MCP or CLI mode for Cursor?
Both fetch the same docs. MCP mode adds a server that shows in Cursor's MCP settings; CLI mode installs a skill that runs the ctx7 command. Pick MCP if you want it alongside your other servers.
Where do I put the Context7 rule in Cursor?
In Cursor Settings under Rules and Commands for yourself, or in a .cursorrules file in the project root to share it with your team.
Sources: the steps on this page are written in our own words from Context7's own install docs, the README, the README. If they disagree with this page, the project's docs win; please tell us from the server page.
