Installation
- Remote Server (Recommended)
- Local Server
No dependencies required. Connects to Context7’s hosted server.
One-Click InstallRecommended
Click the button to add Context7 to Cursor automatically:
or
Manual Installation
1
Open Cursor Settings
Go to 
Cursor → Settings... → Cursor Settings → MCP.You can also press Cmd+Shift+P (or Ctrl+Shift+P on Windows/Linux) and type “Cursor Settings”.
2
Add Context7 Server
Click “Add a Custom MCP Server” or edit
~/.cursor/mcp.json directly:Project-Level Configuration
You can also configure Context7 for a specific project by creating.cursor/mcp.json in your project folder. This is useful when:
- Different projects need different API keys
- You want to share the config with your team via version control
- A project requires specific Context7 settings
Setting Up Rules
To make Context7 trigger automatically (without typing “use context7” every time), add a rule in Cursor.- Cursor Settings
- .cursorrules File
1
Open Settings
Go to 
Cursor → Settings... → Cursor Settings → Rules and Commands. You can also press Cmd+Shift+P (or Ctrl+Shift+P on Windows/Linux) and type “Cursor Settings”.
2
Add the Rule
Using Context7
Add “use context7” to your prompts to fetch current documentation:Tips
Project vs Global Config
Project vs Global Config
Use global config (
~/.cursor/mcp.json) when:- You want Context7 available in all projects
- You’re using a personal API key
.cursor/mcp.json) when:- The project has specific Context7 requirements
- You want to share the setup with teammates
- Different projects need different API keys
Combining with Cursor Composer
Combining with Cursor Composer
Context7 works well with Cursor’s Composer feature. When you’re building something that involves external libraries:
- Start with a prompt that mentions the libraries you need
- Context7 fetches the relevant docs
- Composer uses those docs to generate accurate code
Getting Better Results
Getting Better Results
- Be specific about what you’re trying to do, not just which library
- Mention versions when they matter
- If the first result isn’t right, ask for a different part of the docs