http_get
Fetch web content via HTTP GET, returning status, headers, and body with automatic JSON parsing and SSRF protection.
Instructions
Perform an HTTP GET. Returns status, headers, and body. Automatically parses JSON when the server responds with application/json. Follows redirects (each hop re-validated against SSRF rules). Refuses URLs that resolve to private/loopback/link-local addresses unless the operator enabled FETCH_MCP_ALLOW_PRIVATE_HOSTS and the call sets allow_private_hosts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Target URL (http:// or https://) | |
| headers | No | Extra request headers as a key/value object | |
| retries | No | Retries on 408/425/429/500/502/503/504 with exponential backoff (default 0) | |
| max_bytes | No | Max response body size in bytes before the body is truncated (default 5MiB, ceiling 100MiB) | |
| basic_auth | No | HTTP Basic auth credentials | |
| timeout_ms | No | Timeout in ms for each attempt, covering DNS, every redirect hop and the body (default 10000, max 120000). Retries get a fresh budget; a whole call is capped at 5 minutes. | |
| user_agent | No | User-Agent override (default identifies as @yawlabs/fetch-mcp) | |
| decode_text | No | Force text decoding (true) or binary base64 (false). Defaults to auto — text for text/*, json, xml, etc; binary otherwise. | |
| bearer_token | No | Bearer token sent as Authorization: Bearer <token> | |
| max_redirects | No | Max redirect hops to follow (default 5) | |
| allow_private_hosts | No | Allow loopback / private / link-local targets for this call (default false). Refused unless the server operator launched fetch-mcp with FETCH_MCP_ALLOW_PRIVATE_HOSTS=1 -- SSRF protection stays on by default either way. |