Installation
Run the setup command to configure Context7 for Cursor:Setting Up Rules
Withctx7 setup, a skill is installed that triggers Context7 automatically. If you prefer to use a rule instead, add one in Cursor.
- Cursor Settings
- .cursorrules File
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
