context7-mcp — скилл для Claude Code: что делает и как установить
Скилл подгружает актуальную документацию библиотек и фреймворков перед ответом агента. Пригодится для настройки, API-справок и генерации кода.
npx skills add upstash/context7 --skill context7-mcp -a claude-codeЧто делает context7-mcp
Скилл активируется, когда вы спрашиваете о библиотеках и фреймворках, просите пример кода или называете React, Vue, Next.js, Prisma, Supabase и другие технологии. Он помогает агенту обращаться к актуальной документации Context7 вместо опоры на данные обучения.
Сначала вызывается resolve-library-id: он подбирает идентификатор библиотеки по названию и запросу. Затем query-docs получает сведения по одному понятию. Для разных тем нужны отдельные запросы, а при упоминании версии выбирается соответствующий идентификатор.
Скилл использует resolve-library-id и query-docs, поэтому перед работой стоит проверить доступ агента к этим вызовам. Установка поддерживается для Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI и OpenCode.
Какие задачи решает
- найти актуальную документацию библиотеки
- проверить настройку фреймворка
- получить справку по API
- сгенерировать код на основе документации
Примеры запросов агенту
- Настрой прокси в Next.js и проверь актуальную документацию через Context7.
- Напиши запрос Prisma для этой схемы, сначала найди нужную библиотеку и затем обратись к её документации.
- Какие методы авторизации есть в Supabase? Используй отдельный запрос документации для этой темы.
Как установить context7-mcp
1Через Skills CLI (Vercel)
npx skills add upstash/context7 --skill context7-mcp -a claude-code2Вручную: положить файлы
~/.claude/skills/context7-mcp/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/context7-mcp/
1Через Skills CLI (Vercel)
npx skills add upstash/context7 --skill context7-mcp -a codex2Вручную: положить файлы
.agents/skills/context7-mcp/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add upstash/context7 --skill context7-mcp -a cursor2Вручную: положить файлы
.cursor/skills/context7-mcp/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install upstash/context7 context7-mcp2Вручную: положить файлы
.github/skills/context7-mcp/SKILL.md1Через Skills CLI (Vercel)
npx skills add upstash/context7 --skill context7-mcp -a gemini-cli2Командой платформы
gemini skills install https://github.com/upstash/context7 --path skills/context7-mcpВручную: положить файлы
.devin/skills/context7-mcp/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add upstash/context7 --skill context7-mcp -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Из того же набора3
Весь набор →Похожие
Вопросы о context7-mcp
Как установить context7-mcp в Claude Code?
Выполните npx skills add upstash/context7 --skill context7-mcp -a claude-code, затем повторите npx skills add upstash/context7 --skill context7-mcp -a claude-code. Файл скилла находится в ~/.claude/skills/context7-mcp/SKILL.md.
Что делает context7-mcp?
Скилл направляет агента к актуальной документации библиотек и фреймворков через resolve-library-id и query-docs, когда нужны настройки, API-справка или код.
Как context7-mcp работает с версиями библиотек?
Если в запросе указана версия, скилл советует выбрать версионный идентификатор библиотеки, когда он есть среди результатов поиска.
Исходный текст
SKILL.md · MIT
---
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 a Next.js proxy?")
- 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 16", "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
© upstash · MIT · upstash/context7