New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

About libraries, frameworks, API references

Context7 MCP

by upstash · MIT license · ★ 62,297 on GitHub · updated Sep 21

Context7 MCP cover

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)
Claude Codenpx skills add upstash/context7 --skill context7-mcp -g -a claude-code
Claude Code (degit)npx degit upstash/context7/skills/context7-mcp#master ~/.claude/skills/context7-mcp
Claude.ai / desktopZip the folder and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md2.7 KB
Read SKILL.md here
upstash/master1 file shown
SKILL.md
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 question
  • query: 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-docs calls — 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---
2name: context7-mcp
3description: 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 
6When 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 
10Activate 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 
21Call `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 
28From 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 
36Call `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 
41If 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 
45Incorporate 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 
View all files on GitHub →

Details

Updated
Sep 21, 2026
License
MIT
Stars on the repo
★ 62,297
Checked
Source
upstash/context7 ↗
Creator
upstash · 6 listings
View creator

Similar skills

See all →
SkillTests in real browsers via Chrome DevTools MCPBrowser testing with devtoolsaddyosmani/agent-skills · by addyosmaniTests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.★ 98.7k GitHub starsMCPThis MCP server attempts to exercise all the featuresEverything MCP Servermodelcontextprotocol/servers · by modelcontextprotocolThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test…★ 90.5k GitHub starsMCPA Model Context Protocol server that provides web contentFetch MCP Servermodelcontextprotocol/servers · by modelcontextprotocolA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content…★ 90.5k GitHub starsMCPNode.js server implementing Model Context ProtocolFilesystem MCP Servermodelcontextprotocol/servers · by modelcontextprotocolNode.js server implementing Model Context Protocol (MCP) for filesystem operations.★ 90.5k GitHub starsSkillUses Chrome DevTools via MCP for efficient debuggingChromeDevTools/chrome-devtools-mcp · by ChromeDevToolsUses Chrome DevTools via MCP for efficient debugging, troubleshooting and browser automation. Use when debugging web pages, automating browser interactions, analyzing performance, or inspecting network requests. This skill does not apply to `--slim` mode (MCP configuration).★ 52.4k GitHub starsMCPLets your AI drive a real Chrome with DevTools: performanceChrome devtools MCPChromeDevTools/chrome-devtools-mcp · by ChromeDevToolsLets your AI drive a real Chrome with DevTools: performance traces, network requests, console and screenshots.★ 52.4k GitHub stars

More from upstash

MCPPulls up-to-date, version-specific library docsContext7upstash/context7 · by upstashPulls up-to-date, version-specific library docs and code examples into the prompt so the AI stops inventing old APIs.★ 62.3k GitHub starsSkillFetch up-to-date documentation and code examples for anyContext7 Documentation Lookupupstash/context7 · by upstashFetch up-to-date documentation and code examples for any library, framework, SDK, CLI tool, or cloud service. Use whenever the user asks about a specific library — even well-known ones like React, Next.js, Prisma, Express, Tailwind, Django, or Spring Boot — because training data may not reflect recent API changes or version updates. Always use for: API syntax questions, configuration options, version migration issues, "how do I" questions mentioning a library name, debugging that involves library-specific behavior, setup instructions, and CLI tool usage. Use even when you think you know the answer. Do not rely on training data for API details, signatures, or configuration options — they are frequently out of date. Prefer this over web search for library documentation.★ 62.3k GitHub starsSkillUse the ctx7 CLI to fetch library documentationupstash/context7 · by upstashUse the ctx7 CLI to fetch library documentation, manage AI coding skills, and configure Context7 MCP. Activate when the user mentions "ctx7" or "context7", needs current docs for any library, wants to install/search/generate skills, or needs to set up Context7 for their AI coding agent.★ 62.3k GitHub starsMCPLightweight agent for fetching library documentationDocs researcherupstash/context7 · by upstashLightweight agent for fetching library documentation without cluttering your main conversation context.★ 62.3k GitHub starsSkillRetrieves up-to-date documentation, API referencesDocumentation Lookupupstash/context7 · by upstashRetrieves up-to-date documentation, API references, and code examples for any developer technology. Use this skill whenever the user asks about a specific library, framework, SDK, CLI tool, or cloud service — even for well-known ones like React, Next.js, Prisma, Express, Tailwind, Django, or Spring Boot. Your training data may not reflect recent API changes or version updates. Always use for: API syntax questions, configuration options, version migration issues, "how do I" questions mentioning a library name, debugging that involves library-specific behavior, setup instructions, and CLI tool usage. Use even when you think you know the answer — do not rely on training data for API details, signatures, or configuration options as they are frequently outdated. Always verify against current docs. Prefer this over web search for library documentation and API details.★ 62.3k GitHub stars