Skip to main content
Glama

AtlasForge-WebProxy

Self-hosted web search/fetch proxy plus stdio MCP server for AI agents. It provides Brave-backed search, page fetch with retries and browser-like user-agent fallback, old.reddit hardening, response caching, paper PDF fetch, image search/download, and SSRF guards.

Quickstart

./install.sh
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/atlasforge-webproxy"
$EDITOR "${XDG_CONFIG_HOME:-$HOME/.config}/atlasforge-webproxy/config.env"
chmod 600 "${XDG_CONFIG_HOME:-$HOME/.config}/atlasforge-webproxy/config.env"

Set BRAVE_API_KEY in that file. Get a key at https://brave.com/search/api/. Without a key, the proxy falls back to DDG/DDGS where available.

Run directly:

.venv/bin/python -m atlasforge_webproxy.service --host 127.0.0.1 --port 8765
curl http://127.0.0.1:8765/health

Wire MCP into a client:

{
  "mcpServers": {
    "atlasforge-web-proxy": {
      "command": "/path/to/AtlasForge-WebProxy/.venv/bin/python",
      "args": ["-m", "atlasforge_webproxy.mcp_server"],
      "env": {}
    }
  }
}

Related MCP server: mcp-brave-search

Config

Priority: environment variables, then ${XDG_CONFIG_HOME:-~/.config}/atlasforge-webproxy/config.env, then defaults. For migration, ~/.config/atlasforge/web-proxy.env is read only when the new file does not exist, and a deprecation warning is logged.

Setting

Default

Purpose

BRAVE_API_KEY

empty

Brave Search API key.

ATLASFORGE_WEB_PROXY_HOST

127.0.0.1

Flask bind host.

ATLASFORGE_WEB_PROXY_PORT

8765

Flask bind port.

ATLASFORGE_WEB_PROXY_URL

host/port above

MCP/client target URL.

ATLASFORGE_WEB_PROXY_CACHE_DIR

XDG cache

Search/fetch/image cache.

ATLASFORGE_WEB_PROXY_PAPER_DIR

XDG cache

Paper PDF/text artifacts.

ATLASFORGE_WEB_PROXY_PROVIDER

auto

auto, brave, duckduckgo, or ddgs.

ATLASFORGE_WEB_PROXY_TIMEOUT_S

20

Service outbound timeout.

ATLASFORGE_WEB_PROXY_CLIENT_TIMEOUT_S

30

Python client timeout.

ATLASFORGE_WEB_PROXY_MCP_TIMEOUT_S

30

MCP-to-service timeout.

ATLASFORGE_WEB_PROXY_SEARCH_TTL_S

1800

Search cache TTL.

ATLASFORGE_WEB_PROXY_FETCH_TTL_S

86400

Page fetch cache TTL.

ATLASFORGE_WEB_PROXY_PAPER_TTL_S

604800

Paper fetch cache TTL.

ATLASFORGE_WEB_PROXY_RETRY_ATTEMPTS

3

Fetch retry attempts.

ATLASFORGE_WEB_PROXY_RETRY_BASE_S

0.5

Retry base delay.

ATLASFORGE_WEB_PROXY_RETRY_AFTER_MAX_S

60

Max Retry-After delay.

ATLASFORGE_WEB_PROXY_RETRY_JITTER

1

Enable retry jitter.

ATLASFORGE_WEB_PROXY_UA_RETRY_ON_403

1

Retry 403 with browser UA.

ATLASFORGE_WEB_PROXY_REDDIT_OLD_FALLBACK

1

Try old.reddit fallback.

WEB_PROXY_ALLOW_DNS_FAIL

0

Legacy DNS fail-open mode.

ATLASFORGE_WEB_PROXY_ENABLE_INVESTIGATION_CAPTURE

0

Optional AtlasForge JSON mirroring.

ATLASFORGE_WEB_PROXY_ENABLE_ATLASFORGE_TOOLS

0

Optional AtlasForge stage tools.

See config.env.example for the full list, including user-agent and size-limit knobs.

systemd

./install.sh creates .venv, installs the package, copies config.env.example if no config exists, installs ~/.config/systemd/user/atlasforge-webproxy.service, and runs systemctl --user daemon-reload.

It does not enable or start the service unless passed --start:

./install.sh --start
systemctl --user status atlasforge-webproxy.service

Tests

.venv/bin/python -m pip install -e ".[test]"
.venv/bin/python -m pytest

Use an unused non-8765 port for live smoke tests:

ATLASFORGE_WEB_PROXY_PORT=8799 .venv/bin/python -m atlasforge_webproxy.service --port 8799

Available Tools

5 tools
ImageSearchA

Search for images. Uses Brave API if configured, otherwise DuckDuckGo. Returns image URLs, source page URLs, thumbnails, dimensions. Optionally downloads top N images locally for vision tool access. The safesearch parameter controls content filtering: 'off' disables all filtering, 'moderate' is the default DDG behavior, 'on' is strict SFW.

Inputs: query (required), count, safesearch, fetch_top_n.

PaperFetchA

Download an open-access paper PDF directly and extract full paper text when possible. Use this for arXiv/PDF paper sources before quoting a paper. Returns local artifact paths, SHA-256, page extraction metadata, and extracted text. This is separate from webpage WebFetch.

Inputs: url (required), max_chars.

WebFetchA

Fetch content from a URL. Returns raw extracted content: title, headings, full text, and links. No summarization — returns the actual page content. Reddit URLs auto-route to JSON API. Image URLs auto-detect and save locally. Cached for 24h per URL.

Inputs: url (required), prompt (required).

WebResearchA

Combined search + fetch: searches the web, then fetches the top N result pages. Returns search results plus extracted content from each page. Single call for research queries.

Inputs: query (required), count, max_chars, fetch_top_n.

WebSearchA

Search the web for information. Returns unfiltered search results with title, URL, and snippet for each result. No domain blocks, no content filtering. Uses Brave API if configured, otherwise DuckDuckGo.

Inputs: query (required), allowed_domains, blocked_domains.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a distinct purpose: image search, paper download, generic URL fetch, web search, and combined search+fetch. Clear boundaries prevent confusion.

    Naming Consistency5/5

    All names follow a consistent pattern: noun (Image, Paper, Web) + action verb (Search, Fetch, Research). No mixing of styles.

    Tool Count5/5

    5 tools is well-scoped for a web proxy. Each tool covers a specific need without redundancy or overwhelming number.

    Completeness4/5

    Core operations (search, fetch, image search, paper download, combined research) are present. Minor gap: no dedicated video search or social media extraction, but reasonable for general web access.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to perform web searches using the Brave Search engine, providing an independent alternative to Google/Bing.
      285 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to perform web searches, fetch and extract page content, and crawl sites with caching, rate limiting, and robots.txt compliance, all without needing API keys.
      16
      649 PyPI
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to perform web searches and page fetching/crawling through self-hosted SearXNG and Crawl4AI, without depending on commercial search or scraping APIs.
      MIT