Installation
Add the Context7 marketplace and install the plugin:/plugin marketplace add upstash/context7 and /plugin install context7@context7-marketplace.
For manual MCP configuration (for example, to add an API key for higher rate limits), see All MCP Clients. Create or manage API keys in the Context7 dashboard.
What’s Included
MCP Server
The tools for fetching documentation (
resolve-library-id, query-docs)Skills
Auto-triggers documentation lookups when you ask about libraries
Agents
A
docs-researcher agent for focused lookups that keep context leanCommands
/context7:docs for manual documentation queriesUsing Context7
The bundled skill triggers automatically when you ask about libraries — no need to say “use context7”. You can also invoke it explicitly:Skills
The documentation lookup skill recognizes when documentation would help and fetches it automatically.What triggers the skill
What triggers the skill
- Setup questions: “How do I configure Next.js middleware?”
- Code generation: “Write a Prisma query for user relations”
- API references: “What are the Supabase auth methods?”
- Framework mentions: React, Vue, Svelte, Express, Tailwind, etc.
How it works
How it works
- Resolve: Finds the library ID using
resolve-library-idwith your question as context - Select: Picks the best match based on name accuracy and quality scores
- Fetch: Calls
query-docswith the library ID and your specific question - Return: Provides code examples and explanations from current documentation
Agents
When you’re in the middle of a long task and don’t want documentation tool calls cluttering your context, use thedocs-researcher agent. It runs in a separate context and returns just the answer:
| Scenario | Use |
|---|---|
| Deep into a task with long context | Agent |
| Want to avoid context bloat | Agent |
| Context is short | Inline tools |
| Want docs visible in conversation | Inline tools |
Commands
/context7:docs is a manual command for documentation lookups.
Format:
- Basic
- With Library ID
- You know exactly which library and topic you need
- You want a quick lookup without explaining your full context
- You’re testing what documentation is available