OpenParable
Skip to content
← Back to skills

MCP Context7 Docs

Research
mcp-context7-docs

MCP Context7 Docs is an Agent Skill for research published in the Dicklesworthstone/pi_agent_rust repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Query up-to-date documentation and code examples for any programming library or framework. Use when looking up API docs, finding code examples, or checking library usage. Triggers on "how to use [library]", "docs for [package]", "show me examples of [framework]", "Context7 lookup".

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/Dicklesworthstone/pi_agent_rust/blob/HEAD/tests/ext_conformance/artifacts/npm/vaayne-agent-kit/skills/mcp-context7-docs/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/mcp-context7-docs, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Context7 Documentation

MCP service at https://mcp.context7.com/mcp (http) with 2 tools.

Requirements

  • mh CLI must be installed. If not available, install with:
    curl -fsSL https://raw.githubusercontent.com/vaayne/mcphub/main/scripts/install.sh | sh
    

Usage

List tools: mh -u https://mcp.context7.com/mcp -t http list Get tool details: mh -u https://mcp.context7.com/mcp -t http inspect <tool-name> Invoke tool: mh -u https://mcp.context7.com/mcp -t http invoke <tool-name> '{"param": "value"}'

Notes

  • Run inspect before invoking unfamiliar tools to get full parameter schema
  • Timeout: 30s default, use --timeout <seconds> to adjust
  • Important: Always call resolveLibraryId first to get the Context7-compatible library ID before calling queryDocs, unless user provides ID in /org/project format

Tools

ToolDescription
queryDocsRetrieves and queries up-to-date documentation and code examples from Context7 for any programming library or framework. Requires a Context7-compatible library ID obtained from resolveLibraryId.
resolveLibraryIdResolves a package/product name to a Context7-compatible library ID. Must be called before queryDocs to get a valid library ID.

Workflow

  1. Resolve library ID: First, resolve the library name to a Context7 ID

    mh -u https://mcp.context7.com/mcp -t http invoke resolveLibraryId '{"libraryName": "react"}'
    
  2. Query documentation: Use the resolved ID to fetch docs

    mh -u https://mcp.context7.com/mcp -t http invoke queryDocs '{"context7CompatibleLibraryID": "/facebook/react", "topic": "hooks"}'