Skip to main content

Reliable web fetching for AI agents — MCP server with retry, circuit breaker, caching, and anti-bot bypass

Project description

SteadyFetch

Reliable web fetching for AI agents. Stop losing hours to Cloudflare blocks, timeouts, and flaky scrapes.

SteadyFetch is an MCP server that gives your AI agents reliable web access with automatic retry, circuit breaker protection, caching, and anti-bot bypass — out of the box.

The Problem

Every AI agent that touches the web hits the same wall:

  • Cloudflare blocks your requests
  • Sites return CAPTCHAs
  • Pages timeout or load partially
  • Rate limits kill your batch jobs
  • You waste hours debugging flaky scrapes

The Solution

One MCP tool call. SteadyFetch handles the rest.

Agent calls fetch_url("https://example.com")
  → Checks cache (instant if hit)
  → Checks circuit breaker (fail-fast if domain is down)
  → Stealth browser fetch with anti-bot bypass
  → On failure: retry with exponential backoff
  → Fallback: plain HTTP fetch
  → Cache the result
  → Return clean markdown + raw HTML

Tools

Tool Description
fetch_url Full reliability fetch — returns markdown + HTML
fetch_markdown Returns only clean markdown, optimized for LLMs
check_domain Circuit breaker status for a domain
cache_stats Cache utilization metrics
clear_cache Flush the cache for fresh data

Quick Start

As MCP Server (remote)

Connect to the hosted server:

{
  "mcpServers": {
    "steadyfetch": {
      "url": "https://your-steadyfetch-instance.up.railway.app/mcp"
    }
  }
}

Self-hosted

pip install steadyfetch
steadyfetch

Or with Docker:

docker build -t steadyfetch .
docker run -p 8200:8200 steadyfetch

Configuration

All settings via environment variables:

Variable Default Description
PORT 8200 Server port
STEADYFETCH_MAX_RETRIES 3 Retry attempts per URL
STEADYFETCH_CIRCUIT_THRESHOLD 5 Failures before circuit opens
STEADYFETCH_CIRCUIT_COOLDOWN 120 Seconds before retrying a broken domain
STEADYFETCH_CACHE_TTL 3600 Cache lifetime in seconds
STEADYFETCH_TIMEOUT 30000 Page load timeout in ms

How It Works

Retry with backoff — Exponential backoff + jitter prevents retry storms. 3 browser attempts before falling back to HTTP.

Circuit breaker — Per-domain failure tracking. After 5 consecutive failures, the domain is circuit-broken for 2 minutes. Prevents wasting time on sites that are blocking you.

Caching — Disk-backed cache with configurable TTL. Repeat fetches are instant. 500MB default limit.

Anti-bot bypass — Stealth browser with magic mode, navigator patching, and human-like behavior simulation via Crawl4AI.

Graceful degradation — If the browser can't get through, falls back to plain HTTP. If HTTP fails, returns a clear error with domain health status. Never hangs, never silently fails.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

steadyfetch-0.1.1.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

steadyfetch-0.1.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file steadyfetch-0.1.1.tar.gz.

File metadata

  • Download URL: steadyfetch-0.1.1.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for steadyfetch-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c3a8a25255dcc35cc6fde2054536851b8b4ee181040f103172d9e25f93181e4e
MD5 7e8ef30dfa8ade0007cefa958a04dc5a
BLAKE2b-256 085150403c326e09aa7c455ffc9e3c559327328872b1d38fad5c63630a4536f3

See more details on using hashes here.

File details

Details for the file steadyfetch-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: steadyfetch-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for steadyfetch-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f627a239a14cd57e6414fb04f13151540ca80777c2fee898b3034d277fc2ce5
MD5 e1d5a2a9b6f9a7222f672f94305d63ac
BLAKE2b-256 22cd6c3dd5218a2bcf513edfebe68255ac88db080a2cee86685ac641ddcc3f93

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page