fix(mcp): add API key auth support for Context7 server

Add x-api-key header to Context7 MCP config using CONTEXT7_API_KEY env
var with empty default so it remains optional. Without auth, all requests
hit the anonymous rate limit ("Monthly quota exceeded"). Also update
README to document the API key setup and the Known Issues workaround.

Closes #153

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt Van Horn
2026-03-08 12:43:21 -07:00
parent 69f2a96e66
commit c649cfc17f
3 changed files with 89 additions and 6 deletions

View File

@@ -2,7 +2,10 @@
"mcpServers": {
"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp"
"url": "https://mcp.context7.com/mcp",
"headers": {
"x-api-key": "${CONTEXT7_API_KEY:-}"
}
}
}
}