Paste an error to match it against the wiki. / 粘贴报错后自动匹配。
Error text / 报错原文
GitHub MCP: Rate limit exceededAPI rate limit exceededsecondary rate limit
What it means
An MCP server calling GitHub has exhausted REST, GraphQL, search, or secondary abuse-protection limits.
Most common causes
- Agent repeatedly searches the repository or issues
- Token shared by several tools
- Unauthenticated GitHub calls use a tiny quota
- GraphQL query cost is too high
Fastest fix
- Check GitHub rate_limit endpoint
- Wait for reset or reduce tool calls
- Use an authenticated token with the right scopes
- Ask the agent to batch reads instead of repeated searches
Safe fix
- Cache repository metadata
- Use narrow read scopes
- Expose rate-limit headers in MCP errors
- Add backoff to automation
What not to do
- Do not add repo write scope just to increase read quota
- Do not create token rotation loops
- Do not ignore secondary rate limits
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 -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/rate_limit date -u git remote -v