Context7 MCP for Library APIs

VerifiedSafe

This skill uses the Context7 MCP tool to retrieve official library documentation and API references. It helps when you need function signatures, usage examples, or explanations for a specific package, avoiding guesswork.

Sby Skills Guide Bot
DevelopmentIntermediate
506/2/2026
Claude CodeCursorWindsurf
#context7#mcp#documentation#api-reference#libraries

Recommended for

Our review

Retrieves official library documentation and API references using Context7 MCP.

Strengths

  • Direct access to official docs without leaving the IDE.
  • Automatic library ID resolution for accurate results.
  • Supports multiple modes (code info) for different needs.

Limitations

  • Requires an active MCP configuration with Context7.
  • May not find obscure or deprecated libraries.
  • Relies on Context7 data availability.
When to use it

Use this skill when you need API signatures, usage examples, or official documentation for a specific library or package.

When not to use it

Do not use it for general programming questions unrelated to a specific library, or for concepts you are already familiar with.

Security analysis

Safe
Quality score85/100

The skill only instructs an AI to use a documentation-fetching MCP tool; it does not execute system commands, access sensitive data, or perform any destructive actions. No risks identified.

No concerns found

Examples

Get hook signature of an npm package
查下某个 npm 包的 hook 签名,用 context7 搜
Official Next.js App Router usage
给我 next.js app router 的官方用法,先用 context7 mcp
MongoDB driver insert example
mongodb driver 的插入示例,走 context7 的文档

name: context7-mcp description: Retrieve official library documentation and API references. Use when the user asks for "docs", "API signature", "usage examples", or "how to use" a specific package.

Use Context7 MCP for library APIs

Instructions

  1. When asked about a library/package API, first resolve it: call resolve-library-id with the package name.
  2. If a valid ID is returned, fetch docs with get-library-docs (mode code for API/reference; info for conceptual) and a topic if relevant (e.g., hooks, routing).
  3. Cite snippets from retrieved docs; avoid guessing. Prefer latest page unless user specifies version.
  4. If multiple matches, pick the closest and mention ambiguity briefly before proceeding.
  5. If no match, ask for clarification or alternate names instead of inventing APIs.
  6. Do not rely on memory for API shapes when Context7 docs are available; re-fetch as needed for accuracy.

Example prompts

  • "查下某个 npm 包的 hook 签名,用 context7 搜"
  • "给我 next.js app router 的官方用法,先用 context7 mcp"
  • "mongodb driver 的插入示例,走 context7 的文档"
Related skills