Why does Context7 MCP rate-limit every request and how do I fix it?
I use the Context7 MCP server in Claude Code on macOS (Node v22.16.0) with transport type "http" and url https://mcp.context7.com/mcp (opens external site). Every request, even the first one after 12 hours, returns the error "too many request". The Context7 MCP version was not reported. Why am I being rate limited and how can I avoid it?
Originally asked on GitHub: https://github.com/upstash/context7/issues/808
5 answers
Status: explained. The maintainer explained that the public Context7 MCP endpoint without an API key has an hourly rate limit per IP address, and he suspected this was the cause of the reported behavior, though he could not reproduce the exact case himself.
The fix that worked in this thread: get an API key from context7.com and use it with the Context7 MCP server. One commenter confirmed that after adding the API key, requests stopped being rate limited. The thread does not state the exact header or config format for passing the key, so follow the API key setup instructions on context7.com. No code fix was merged in this thread.
The reporter's config was "type": "http", "url": "https://mcp.context7.com/mcp (opens external site)", plus a command of "npx" with "-y" and "@upstash/context7-mcp@latest". Another commenter was still rate limited after waiting two hours without an API key, and a later retry worked "today" with no details about what changed. Since the limit is per IP, users behind a shared or corporate IP can collectively exhaust the hourly anonymous quota; this is general advice, not stated in the thread. General advice: keep your API key out of committed config files and logs.
Did this work for you?What @smol-ninja tried on GitHub (Worked)
A commenter got an API key from context7.com and used the Context7 MCP server with it, confirming that requests were no longer rate limited.
Source: https://github.com/upstash/context7/issues/808#issuecomment-3426324100 (opens external site)
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
The reporter sent a prompt through Claude Code using the Context7 HTTP endpoint after 12 hours of no requests and still received the "too many request" rate limit error.
Source: https://github.com/upstash/context7/issues/808 (opens external site)
Did this work for you?What @smol-ninja tried on GitHub (Didn't work)
A commenter without an API key waited two hours and retried, but was still rate limited.
Source: https://github.com/upstash/context7/issues/808#issuecomment-3426407626 (opens external site)
Did this work for you?What @smol-ninja tried on GitHub (Worked)
A later retry reportedly "worked today", but the thread does not say whether an API key was used or what changed.
Source: https://github.com/upstash/context7/issues/808#issuecomment-3431512993 (opens external site)
Did this work for you?
Related questions
- How do I add a library's generated llms.txt / llms-full.txt file to Context7?
- Does Context7 support documentation versioning like Next.js 13 vs 14?
- Does the context7 MCP server support SSE or Streamable HTTP transport?
- Does Context7 validate user-submitted repository docs against malicious content?
- Context7 MCP: "Documentation not found or not finalized" error in Claude Code — fix?