Fetch up-to-date library documentation. Use when user asks about libraries, frameworks, or needs current API references/code examples.
Fetch current docs instead of relying on training data.
Context7 is configured via .mcp.json and provides MCP tools automatically:
Available MCP Tools:
mcp__context7__resolve-library-id - Search for library by namemcp__context7__query-docs - Fetch documentation for a libraryUsage:
Tool: mcp__context7__resolve-library-id
Parameters: { "libraryName": "react", "query": "hooks" }
Tool: mcp__context7__query-docs
Parameters: { "libraryId": "/websites/react_dev", "query": "useState hook" }
If MCP tools are unavailable, use the PowerShell scripts in scripts/:
# Search for library
.\scripts\search.ps1 -LibraryName "react" -Query "hooks"
# Fetch documentation
.\scripts\fetch-docs.ps1 -LibraryId "/websites/react_dev" -Query "useState hook"
For higher rate limits, add your Context7 API key to .env:
$env:CONTEXT7_API_KEY = "your-key-here"
Get your key at: https://context7.com/dashboard
Works without API key but with lower rate limits.