Back to MCP ServersOfficial documentation
Context7
Up-to-date, version-specific documentation for thousands of libraries, injected straight into your agent's context. Kills hallucinated APIs.
Category: Development · Works with: Claude Code, Grok Build, Claude Desktop, Cursor, VS Code, Codex CLI, Gemini CLI
What it does
When the agent writes code against a library, Context7 fetches the current docs and real code examples for the exact version — instead of the model guessing from stale training data.
Install
npx -y @upstash/context7-mcp
Setup Instructions
claude Code
claude mcp add context7 -- npx -y @upstash/context7-mcp
grok Build
Add in Grok Build's MCP settings: npx -y @upstash/context7-mcp Then add "use context7" to prompts involving library APIs so Grok pulls current docs instead of relying on training data.
cursor
Add via Cursor MCP settings with command "npx -y @upstash/context7-mcp". Then add "use context7" to prompts that involve library APIs.
Compatible Agents
Claude CodeGrok BuildClaude DesktopCursorVS CodeCodex CLIGemini CLI
Related MCP Servers
@modelcontextprotocol/server-filesystem
Reference filesystem access for agents. Read, write, list, move, and search files within explicitly allowed directories.
GitHub MCP Server
GitHub's official MCP server. Manage issues, PRs, branches, workflows, and code scanning — or just let the agent read your repos.
mcp-server-git
Reference Git server. Status, diff, log, branch, commit, and search — structured Git operations for repos the agent works in.