Installation
- Remote Server (Recommended)
- Local Server
No dependencies required. Connects to Context7’s hosted server.
- With API Key (Recommended)
- With OAuth
- Without API Key
Run this command in your terminal:
Verifying the Connection
Run/mcp in Claude Code to see all servers and manage authentication:


claude mcp list in your terminal:
Using Context7
Add “use context7” to your prompts to fetch current documentation:The Context7 Plugin
The full Context7 plugin for Claude Code includes more than just the MCP server: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 queriesInstalling the Plugin
The plugin is available from the Context7 marketplace. Run these commands in Claude Code:Skills
Documentation Lookup Skill
This skill triggers automatically when you ask about libraries, frameworks, or need code examples. You don’t need to type “use context7” — the skill recognizes when documentation would help.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
docs-researcher Agent
When you’re in the middle of a long task and don’t want documentation tool calls cluttering your context, spawn thedocs-researcher agent. It runs in a separate context and returns just the answer.
- When to Use
- Examples
- You need docs but want to keep your main context clean
- You’re working on something complex and context is getting long
- You want a focused answer without side effects
resolve-library-id and query-docs) but runs on a lighter model (Sonnet) to keep things fast.
When to Use Agents vs Inline Tools
| 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
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
