MCP / Rate limits

Rate limit exceeded - MCP tool call

The MCP server is reachable, but the upstream API or provider rejected calls because the current token or IP exceeded a rate limit.

MCP rate limit exceededMCP 429 Too Many RequestsGitHub MCP rate limit
Paste an error to match it against the wiki. / 粘贴报错后自动匹配。

Error text / 报错原文

  • Rate limit exceeded
  • 429 Too Many Requests
  • secondary rate limit

What it means

The MCP server is reachable, but the upstream API or provider rejected calls because the current token or IP exceeded a rate limit.

Most common causes

  • Agent loop called the same tool repeatedly
  • Shared token used by several sessions
  • Upstream provider applies stricter secondary limits
  • Missing cache causes repeated identical reads

Fastest fix

  • Stop the agent loop and wait for reset
  • Check provider rate-limit headers
  • Reduce repeated tool calls
  • Use a token with appropriate quota

Safe fix

  • Add caching and backoff to custom MCP servers
  • Expose read-only tools where possible
  • Use separate tokens for CI and local sessions
  • Monitor rate-limit headers

What not to do

  • Do not rotate tokens blindly
  • Do not retry 429 in a tight loop
  • Do not hide rate limits from the agent with generic errors

How to confirm the fix

Run the smallest reproducible command first, then retry the agent task only after authentication, quota, and tool discovery are stable.

curl -I https://api.github.com/rate_limit
date -u
env | grep TOKEN

Related errors

Related tools

Sources