docs/resources/troubleshooting.mdx
This guide helps you resolve common issues when setting up or using Context7 MCP.
node --version)@upstash/context7-mcp@latest)curl https://mcp.context7.com/pingDEBUG=*) before collecting support informationAdd @latest to ensure you're using the most recent version:
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp@latest", "--api-key", "YOUR_API_KEY"]
}
}
}
If you encounter ERR_MODULE_NOT_FOUND, try bunx or deno instead of npx:
{
"mcpServers": {
"context7": {
"command": "bunx",
"args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
}
}
}
{
"mcpServers": {
"context7": {
"command": "deno",
"args": ["run", "--allow-env=NO_DEPRECATION,TRACE_DEPRECATION", "--allow-net", "npm:@upstash/context7-mcp"]
}
}
}
For Error: Cannot find module 'uriTemplate.js', use the --experimental-vm-modules flag:
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "--node-options=--experimental-vm-modules", "@upstash/[email protected]"]
}
}
}
Use the --experimental-fetch flag:
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "--node-options=--experimental-fetch", "@upstash/context7-mcp"]
}
}
}
Ensure you're using Node.js v18 or higher (node --version).
On Windows, some users may encounter request timeout errors with the default configuration. Try using the full path to Node.js and the installed package:
{
"mcpServers": {
"context7": {
"command": "C:\\Program Files\\nodejs\\node.exe",
"args": [
"C:\\Users\\yourname\\AppData\\Roaming\\npm\\node_modules\\@upstash\\context7-mcp\\dist\\index.js",
"--transport",
"stdio",
"--api-key",
"YOUR_API_KEY"
]
}
}
}
Alternatively, use this configuration with cmd:
{
"mcpServers": {
"context7": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
}
}
}
On macOS, some users may encounter the same request timeout errors. Use the full path to Node.js and the installed package:
{
"mcpServers": {
"context7": {
"command": "/Users/yourname/.nvm/versions/node/v22.14.0/bin/node",
"args": [
"/Users/yourname/.nvm/versions/node/v22.14.0/lib/node_modules/@upstash/context7-mcp/dist/index.js",
"--transport",
"stdio",
"--api-key",
"YOUR_API_KEY"
]
}
}
}
If you encounter rate limit errors:
{
"mcpServers": {
"context7": {
"url": "https://mcp.context7.com/mcp",
"headers": {
"CONTEXT7_API_KEY": "YOUR_API_KEY"
}
}
}
}
If you see 401 Unauthorized errors:
ctx7skFor HTTP transport:
{
"headers": {
"CONTEXT7_API_KEY": "YOUR_API_KEY"
}
}
For stdio transport:
{
"args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
}
If you get 404 Not Found errors:
/owner/repo or /owner/repo/versionresolve-library-id tool~/.cursor/mcp.json) and project-specific (.cursor/mcp.json) configurationsclaude mcp listclaude mcp logs context7If you're behind a corporate proxy, configure Context7 to route through it.
With authentication:
```bash
export https_proxy=http://username:[email protected]:8080
```
With authentication:
```cmd
set https_proxy=http://username:[email protected]:8080
```
Add proxy directly to your MCP configuration:
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
"env": {
"https_proxy": "http://proxy.example.com:8080",
"HTTPS_PROXY": "http://proxy.example.com:8080"
}
}
}
}
Both lowercase and uppercase environment variables are supported.
<Tip> After updating proxy settings, run `curl https://mcp.context7.com/ping` to confirm outbound connectivity before restarting your IDE. </Tip>Add debug output to your configuration:
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
"env": {
"DEBUG": "*"
}
}
}
}
Test your setup independently:
npx -y @modelcontextprotocol/inspector npx @upstash/context7-mcp
This opens an interactive inspector to test Context7 tools.
Test that the remote server is reachable:
curl https://mcp.context7.com/ping
Expected response: {"status": "ok", "message": "pong"}
If these solutions don't resolve your issue:
node --version)