You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fetch: no retry/backoff on transient 429/5xx or network errors #4449
Bug: fetch MCP server has no retry or backoff on transient 429/5xx errors
Problem
The fetch MCP server (src/fetch/) proxies HTTP requests on behalf of agents. When the target URL returns a transient error — 429 Too Many Requests, 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable, 504 Gateway Timeout — the server returns the error immediately to the agent with no retry.
Agents (Claude Code, Kilo Code, OpenCode) that call fetch for documentation lookups, API calls, or web scraping then receive an error result and either halt or waste a full LLM turn handling the error, when a 1-2 second retry would have succeeded.
Expected behavior
For idempotent fetches (GET, HEAD), the fetch server should retry transient errors with exponential backoff:
Retryable: 429, 500, 502, 503, 504, and network errors (ECONNRESET, ETIMEDOUT, ENOTFOUND with a short TTL)
Configurable via env: FETCH_MAX_RETRIES, FETCH_RETRY_DELAY_MS
Respect Retry-After header when present on 429 responses
POST/PUT/DELETE should NOT be retried by default (not idempotent); opt-in via config.
Why
Transient errors are the norm for public APIs and documentation sites under load. A retry layer in the MCP server is more efficient than having every agent implement its own retry logic, and it keeps agent prompts clean (agents describe what they need, not how to handle HTTP transience).
Thank you for the suggestion, and apologies for the long wait for a response.
These servers are reference implementations: they exist to show how each part of MCP is used, not to be general-purpose products, so new features are taken selectively (CONTRIBUTING.md). Automatic HTTP retry and backoff is general client hardening rather than an MCP protocol feature, and does not fit the fetch reference server's purpose. This is not a judgment on the idea or on you; a server in the MCP Registry may well offer it, and anyone is welcome to build on these servers to do so. This is happening as part of the backlog triage in #4875.
Activity
cliffhall commentedon Oct 19, 2026
Closing: out of scope for the reference servers.
Thank you for the suggestion, and apologies for the long wait for a response.
These servers are reference implementations: they exist to show how each part of MCP is used, not to be general-purpose products, so new features are taken selectively (
CONTRIBUTING.md). Automatic HTTP retry and backoff is general client hardening rather than an MCP protocol feature, and does not fit the fetch reference server's purpose. This is not a judgment on the idea or on you; a server in the MCP Registry may well offer it, and anyone is welcome to build on these servers to do so. This is happening as part of the backlog triage in #4875.