Retrieves up-to-date, version-specific library documentation and code examples for coding agents, reducing outdated or hallucinated API usage.
Setup
Choose your client, copy the config, then fill in any required environment variables.
Local
claude mcp add context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY~/.codex/config.toml
[mcp_servers.context7]
command = "npx"
args = ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
# codex mcp add context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY~/.cursor/mcp.json
{
"mcpServers": {
"context7": {
"command": "npx",
"args": [
"-y",
"@upstash/context7-mcp",
"--api-key",
"YOUR_API_KEY"
]
}
}
}.vscode/mcp.json
{
"servers": {
"context7": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@upstash/context7-mcp",
"--api-key",
"YOUR_API_KEY"
]
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"context7": {
"command": "npx",
"args": [
"-y",
"@upstash/context7-mcp",
"--api-key",
"YOUR_API_KEY"
]
}
}
}claude_desktop_config.json
{
"mcpServers": {
"context7": {
"command": "npx",
"args": [
"-y",
"@upstash/context7-mcp",
"--api-key",
"YOUR_API_KEY"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"context7": {
"command": "npx",
"args": [
"-y",
"@upstash/context7-mcp",
"--api-key",
"YOUR_API_KEY"
]
}
}
}Remote
claude mcp add --transport http context7 https://mcp.context7.com/mcp~/.codex/config.toml
[mcp_servers.context7]
url = "https://mcp.context7.com/mcp"
# codex mcp add context7 --url https://mcp.context7.com/mcp~/.cursor/mcp.json
{
"mcpServers": {
"context7": {
"url": "https://mcp.context7.com/mcp"
}
}
}.vscode/mcp.json
{
"servers": {
"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp"
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"context7": {
"httpUrl": "https://mcp.context7.com/mcp"
}
}
}claude_desktop_config.json · Customize › Connectors › Add custom connector
{
"mcpServers": {
"context7": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.context7.com/mcp"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"context7": {
"url": "https://mcp.context7.com/mcp"
}
}
}Try this task
Find official usage for the library and version I am using. Give a minimal example with documentation sources and version scope.
- What to provide
- Library name, version, current code and the problem.
- What to review
- Confirm the version and trace dependencies and parameters to the documentation.