Context7 MCP
Use Context7 for current technical documentation instead of relying on model memory when the answer depends on a library, framework, SDK, API, CLI, cloud service, platform setup, configuration option, version migration, or code example whose behavior may have changed.
This is an on-demand documentation router. Do not load docs for general programming concepts, repo-specific business logic, ordinary code review, or refactors where local source truth is enough.
When To Use
Use this skill when the user:
- Asks setup or configuration questions, such as "How do I configure Next.js middleware?"
- Requests code that depends on a library API, such as a Prisma query or Supabase auth flow.
- Needs API, CLI, SDK, framework, or cloud-provider reference behavior.
- Mentions a version-specific framework or package, such as React 19, Next.js 16, Tailwind 4, Prisma 6, or Wrangler.
- Hits an error that may be caused by changed platform behavior, deprecated options, migration rules, or current docs.
- Asks for current best practice for a specific package, service, or platform.
Skip this skill when:
- The question is pure business logic, architecture, refactoring, testing strategy, or general programming.
- The needed truth is in local source files, generated types, schemas, tests, logs, database rows, or runtime output.
- The only available query would require sending secrets, private customer data, proprietary source blobs, or long private snippets.
- The package behavior is already pinned and verified by local docs/tests, and external docs would not change the answer.
Privacy Boundary
Never send the following to Context7:
- API keys, tokens, passwords, cookies, headers, private URLs, account IDs, or credential names.
- Customer data, patient data, payment data, private emails, or direct personal identifiers.
- Proprietary source files, long private snippets, private prompts, or internal documents.
.env contents, config secrets, auth headers, or database connection strings.
Sanitize the question. Send only the package/platform name, version when relevant, public error shape, and the narrow technical question.
Workflow
- Identify the library, SDK, API, CLI, framework, or cloud service.
- Detect the version from local source when it is cheap and relevant:
- JavaScript/TypeScript:
package.json, lockfiles, framework config.
- Python:
pyproject.toml, requirements.txt, lockfiles.
- Go:
go.mod.
- Rust:
Cargo.toml.
- Ruby:
Gemfile.
- Platform CLIs: config files, lockfiles, package manager metadata, or local
--version output when safe.
- Resolve the Context7 library ID unless the user already supplied a valid
/org/project or /org/project/version ID.
- Select the best match by exact name, official/high-reputation source, version match, snippet coverage, and relevance to the task.
- Query docs with a narrow task-specific question.
- Use no more than three Context7 documentation queries for one user question before falling back to the best available source.
- If Context7 is unavailable, ambiguous, or low quality, use official docs, source repositories, standards, or runtime evidence instead.
- In the answer or implementation notes, distinguish:
verified from current docs
verified from local source/runtime
inferred
not verified
Tool Contract
Use the Context7 MCP tools in this order:
resolve_library_id
libraryName: official package/platform name when known.
query: the sanitized user question and relevant version/context.
query_docs
libraryId: selected Context7-compatible ID.
query: a narrow question that avoids secrets and private code.
When multiple good matches exist, prefer the official or primary project. If the version the user asks about appears in the result list, use the version-specific ID.
Closeout
When this skill materially affects the answer or implementation, include a compact note:
Docs: Context7 <libraryId> used for <question>; version <version or unknown>; fallback <none or source>.
Do not over-quote documentation. Summarize the relevant rule and cite the source/tool result when the answer depends on it.
1---2name: context7-mcp3description: Use when the task depends on current documentation for a library, framework, SDK, API, CLI tool, cloud service, setup/configuration, version migration, or platform-specific behavior. Prefer Context7 when available; fall back to official docs or source repos when Context7 is unavailable or weak.4---56# Context7 MCP78Use Context7 for current technical documentation instead of relying on model memory when the answer depends on a library, framework, SDK, API, CLI, cloud service, platform setup, configuration option, version migration, or code example whose behavior may have changed.910This is an on-demand documentation router. Do not load docs for general programming concepts, repo-specific business logic, ordinary code review, or refactors where local source truth is enough.1112## When To Use1314Use this skill when the user:1516- Asks setup or configuration questions, such as "How do I configure Next.js middleware?"17- Requests code that depends on a library API, such as a Prisma query or Supabase auth flow.18- Needs API, CLI, SDK, framework, or cloud-provider reference behavior.19- Mentions a version-specific framework or package, such as React 19, Next.js 16, Tailwind 4, Prisma 6, or Wrangler.20- Hits an error that may be caused by changed platform behavior, deprecated options, migration rules, or current docs.21- Asks for current best practice for a specific package, service, or platform.2223Skip this skill when:2425- The question is pure business logic, architecture, refactoring, testing strategy, or general programming.26- The needed truth is in local source files, generated types, schemas, tests, logs, database rows, or runtime output.27- The only available query would require sending secrets, private customer data, proprietary source blobs, or long private snippets.28- The package behavior is already pinned and verified by local docs/tests, and external docs would not change the answer.2930## Privacy Boundary3132Never send the following to Context7:3334- API keys, tokens, passwords, cookies, headers, private URLs, account IDs, or credential names.35- Customer data, patient data, payment data, private emails, or direct personal identifiers.36- Proprietary source files, long private snippets, private prompts, or internal documents.37- `.env` contents, config secrets, auth headers, or database connection strings.3839Sanitize the question. Send only the package/platform name, version when relevant, public error shape, and the narrow technical question.4041## Workflow42431. Identify the library, SDK, API, CLI, framework, or cloud service.442. Detect the version from local source when it is cheap and relevant:45 - JavaScript/TypeScript: `package.json`, lockfiles, framework config.46 - Python: `pyproject.toml`, `requirements.txt`, lockfiles.47 - Go: `go.mod`.48 - Rust: `Cargo.toml`.49 - Ruby: `Gemfile`.50 - Platform CLIs: config files, lockfiles, package manager metadata, or local `--version` output when safe.513. Resolve the Context7 library ID unless the user already supplied a valid `/org/project` or `/org/project/version` ID.524. Select the best match by exact name, official/high-reputation source, version match, snippet coverage, and relevance to the task.535. Query docs with a narrow task-specific question.546. Use no more than three Context7 documentation queries for one user question before falling back to the best available source.557. If Context7 is unavailable, ambiguous, or low quality, use official docs, source repositories, standards, or runtime evidence instead.568. In the answer or implementation notes, distinguish:57 - `verified from current docs`58 - `verified from local source/runtime`59 - `inferred`60 - `not verified`6162## Tool Contract6364Use the Context7 MCP tools in this order:65661. `resolve_library_id`67 - `libraryName`: official package/platform name when known.68 - `query`: the sanitized user question and relevant version/context.692. `query_docs`70 - `libraryId`: selected Context7-compatible ID.71 - `query`: a narrow question that avoids secrets and private code.7273When multiple good matches exist, prefer the official or primary project. If the version the user asks about appears in the result list, use the version-specific ID.7475## Closeout7677When this skill materially affects the answer or implementation, include a compact note:7879```text80Docs: Context7 <libraryId> used for <question>; version <version or unknown>; fallback <none or source>.81```8283Do not over-quote documentation. Summarize the relevant rule and cite the source/tool result when the answer depends on it.