About libraries, frameworks, API references
Context7 MCP

This skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue,…
---
name: context7-mcp
description: This skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc.
---
When the user asks about libraries, frameworks, or needs code examples, use Context7 to fetch current documentation instead of relying on training data.
## When to Use This Skill
Activate this skill when the user:
- Asks setup or configuration questions ("How do I configure Next.js middleware?")
- Requests code involving libraries ("Write a Prisma query for...")
- Needs API references ("What are the Supabase auth methods?")
- Mentions specific frameworks (React, Vue, Svelte, Express, Tailwind, etc.)
## How to Fetch Documentation
Overview
When the user asks about libraries, frameworks, or needs code examples, use Context7 to fetch current documentation instead of relying on training data.
Manual install (npx, ZIP)
npx skills add upstash/context7 --skill context7-mcp -g -a claude-codenpx degit upstash/context7/skills/context7-mcp#master ~/.claude/skills/context7-mcpConnects with Agent Alley MCP · agentalley.io/mcp
Files included
SKILL.md2.7 KB
Read SKILL.md here
Show the full text57 lines
When the user asks about libraries, frameworks, or needs code examples, use Context7 to fetch current documentation instead of relying on training data.
When to Use This Skill
Activate this skill when the user:
- Asks setup or configuration questions ("How do I configure Next.js middleware?")
- Requests code involving libraries ("Write a Prisma query for...")
- Needs API references ("What are the Supabase auth methods?")
- Mentions specific frameworks (React, Vue, Svelte, Express, Tailwind, etc.)
How to Fetch Documentation
Step 1: Resolve the Library ID
Call resolve-library-id with:
libraryName: The library name extracted from the user's questionquery: What to look up in the library's documentation (improves relevance ranking)
Step 2: Select the Best Match
From the resolution results, choose based on:
- Exact or closest name match to what the user asked for
- Higher benchmark scores indicate better documentation quality
- If the user mentioned a version (e.g., "React 19"), prefer version-specific IDs
Step 3: Fetch the Documentation
Call query-docs with:
libraryId: The selected Context7 library ID (e.g.,/vercel/next.js)query: What to look up in the library's documentation, scoped to a single concept
If the user's question spans multiple distinct concepts (e.g. routing and auth and caching), make a separate query-docs call per concept with the same library ID, unless the question is about how the concepts interact — combined queries dilute ranking and return shallow results for each topic.
Step 4: Use the Documentation
Incorporate the fetched documentation into your response:
- Answer the user's question using current, accurate information
- Include relevant code examples from the docs
- Cite the library version when relevant
Guidelines
- Be specific: Describe what to look up in the library's documentation, but keep each query to a single concept
- One topic per query: Split multi-topic questions into separate
query-docscalls — resolve the library ID once, then query per concept, unless the question is about how the concepts interact - Version awareness: When users mention versions ("Next.js 15", "React 19"), use version-specific library IDs if available from the resolution step
- Prefer official sources: When multiple matches exist, prefer official/primary packages over community forks
| 1 | |
| 2 | name context7-mcp |
| 3 | description This skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc. |
| 4 | |
| 5 | |
| 6 | When the user asks about libraries, frameworks, or needs code examples, use Context7 to fetch current documentation instead of relying on training data. |
| 7 | |
| 8 | ## When to Use This Skill |
| 9 | |
| 10 | Activate this skill when the user: |
| 11 | |
| 12 | Asks setup or configuration questions ("How do I configure Next.js middleware?") |
| 13 | Requests code involving libraries ("Write a Prisma query for...") |
| 14 | Needs API references ("What are the Supabase auth methods?") |
| 15 | Mentions specific frameworks (React, Vue, Svelte, Express, Tailwind, etc.) |
| 16 | |
| 17 | ## How to Fetch Documentation |
| 18 | |
| 19 | ### Step 1: Resolve the Library ID |
| 20 | |
| 21 | Call `resolve-library-id` with: |
| 22 | |
| 23 | `libraryName`: The library name extracted from the user's question |
| 24 | `query`: What to look up in the library's documentation (improves relevance ranking) |
| 25 | |
| 26 | ### Step 2: Select the Best Match |
| 27 | |
| 28 | From the resolution results, choose based on: |
| 29 | |
| 30 | Exact or closest name match to what the user asked for |
| 31 | Higher benchmark scores indicate better documentation quality |
| 32 | If the user mentioned a version (e.g., "React 19"), prefer version-specific IDs |
| 33 | |
| 34 | ### Step 3: Fetch the Documentation |
| 35 | |
| 36 | Call `query-docs` with: |
| 37 | |
| 38 | `libraryId`: The selected Context7 library ID (e.g., `/vercel/next.js`) |
| 39 | `query`: What to look up in the library's documentation, scoped to a single concept |
| 40 | |
| 41 | If the user's question spans multiple distinct concepts (e.g. routing and auth and caching), make a separate `query-docs` call per concept with the same library ID, unless the question is about how the concepts interact — combined queries dilute ranking and return shallow results for each topic. |
| 42 | |
| 43 | ### Step 4: Use the Documentation |
| 44 | |
| 45 | Incorporate the fetched documentation into your response: |
| 46 | |
| 47 | Answer the user's question using current, accurate information |
| 48 | Include relevant code examples from the docs |
| 49 | Cite the library version when relevant |
| 50 | |
| 51 | ## Guidelines |
| 52 | |
| 53 | **Be specific**: Describe what to look up in the library's documentation, but keep each query to a single concept |
| 54 | **One topic per query**: Split multi-topic questions into separate `query-docs` calls — resolve the library ID once, then query per concept, unless the question is about how the concepts interact |
| 55 | **Version awareness**: When users mention versions ("Next.js 15", "React 19"), use version-specific library IDs if available from the resolution step |
| 56 | **Prefer official sources**: When multiple matches exist, prefer official/primary packages over community forks |
| 57 |
Details
- Updated
- Sep 21, 2026
- License
- MIT
- Stars on the repo
- ★ 62,297
- Checked
- Source
- upstash/context7 ↗
- Creator
- upstash · 6 listings
Similar skills
See all →
SkillTests in real browsers via Chrome DevTools MCPBrowser testing with devtools
MCPThis MCP server attempts to exercise all the featuresEverything MCP Server
MCPA Model Context Protocol server that provides web contentFetch MCP Server
MCPNode.js server implementing Model Context ProtocolFilesystem MCP Server
SkillUses Chrome DevTools via MCP for efficient debugging
MCPLets your AI drive a real Chrome with DevTools: performanceChrome devtools MCPMore from upstash
MCPPulls up-to-date, version-specific library docsContext7
SkillFetch up-to-date documentation and code examples for anyContext7 Documentation Lookup
SkillUse the ctx7 CLI to fetch library documentation
MCPLightweight agent for fetching library documentationDocs researcher
SkillRetrieves up-to-date documentation, API referencesDocumentation Lookup