
Context7 Mcp
Pull up-to-date library and framework docs into the agent session so setup and API code match current vendor APIs instead of stale training data.
Overview
context7-mcp is an agent skill most often used in Build (also Validate prototype, Ship testing) that fetches current library documentation via Context7 instead of relying on stale training data.
Install
npx skills add https://github.com/upstash/context7 --skill context7-mcpWhat is this skill?
- Two-step flow: resolve-library-id then query-docs for current API and examples
- Activates on setup questions, code generation with libraries, and named frameworks (React, Next.js, Prisma, Supabase, et
- Ranks matches by name fit and benchmark scores; supports version-specific library IDs when the user names a version
- Replaces guessing from model training data when configuring middleware, auth, or ORM queries
Adoption & trust: 2.1k installs on skills.sh; 57k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are implementing against React, Next.js, Prisma, or Supabase but the agent’s baked-in API details may be wrong or outdated.
Who is it for?
Solo builders generating integration code or configuration against fast-moving JS/TS frameworks and BaaS SDKs.
Skip if: Pure product strategy, SEO, or tasks that need no external library docs—skip when you already have pinned internal API specs.
When should I use this skill?
User asks about libraries, frameworks, API references, setup/configuration, code involving libraries, or mentions React, Vue, Next.js, Prisma, Supabase, etc.
What do I get? / Deliverables
The agent resolves the right Context7 library ID and returns documentation-grounded setup steps and code examples for your exact question.
- Resolved Context7 library ID for the requested stack
- Documentation-grounded answers and code examples for the user query
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Build is where you wire frameworks, ORMs, and auth SDKs; accurate docs at integration time prevents rework before Ship. Integrations is the primary shelf because the skill resolves library IDs and queries live documentation for third-party packages you are coding against.
Where it fits
Pick Supabase auth patterns using query-docs before committing to a spike repo.
Generate Prisma queries and middleware config with resolved Next.js or Express library IDs.
Confirm current SDK method signatures while fixing a failing integration test.
How it compares
Documentation fetch via MCP integration, not a local skill template or static SKILL.md cheat sheet.
Common Questions / FAQ
Who is context7-mcp for?
Developers using Claude Code, Cursor, or similar agents who need authoritative, up-to-date framework and API references while building SaaS, APIs, or agent tools.
When should I use context7-mcp?
In Build integrations when configuring libraries; in Validate prototype when scaffolding stack choices; in Ship testing when verifying auth or ORM APIs against current docs.
Is context7-mcp safe to install?
It calls Context7 documentation services over the network; check this page’s Security Audits panel and only query libraries you trust—do not embed secrets in queries.
SKILL.md
READMESKILL.md - Context7 Mcp
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 question - `query`: The user's full question (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`: The user's specific question ### 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**: Pass the user's full question as the query for better results - **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