Skip to main content
Glama
neutron42-jp

tor-mcp

by neutron42-jp

THIS PROJECT IS MADE BY LLM

Tor Web MCP

Local MCP server for LM Studio with two tools:

  • tor_search(query, max_results=8) — searches Ahmia's indexed onion services.

  • tor_fetch(url, max_chars=30000) — fetches a v3 .onion URL through a local Tor SOCKS5 proxy.

Install

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Set TOR_SOCKS_URL if your Tor SOCKS listener is not 127.0.0.1:9050. Tor Browser commonly uses a different port, so verify your setup.

Related MCP server: searxng-mcp-bridge

Test

mcp dev server.py

LM Studio

Configure a local stdio MCP server using absolute paths:

{
  "mcpServers": {
    "tor-web": {
      "command": "/ABSOLUTE/PATH/tor-mcp/.venv/bin/python",
      "args": ["/ABSOLUTE/PATH/tor-mcp/server.py"]
    }
  }
}

Error semantics

The fetcher deliberately returns LLM-readable error categories. In particular, a search result that is no longer reachable becomes:

[SEARCH_RESULT_STALE]

This means the URL was indexed but is currently unreachable; it does not prove the address is invalid. The model can then try another search result.

Other categories include INVALID_ONION_URL, TOR_SEARCH_TIMEOUT, TOR_SEARCH_HTTP_ERROR, TOR_SEARCH_NETWORK_ERROR, NO_RESULTS, TOR_FETCH_NETWORK_ERROR, TOR_REDIRECT, and TOR_REDIRECT_BLOCKED.

Security boundaries

  • Only HTTP/HTTPS v3 .onion URLs are accepted by tor_fetch.

  • No automatic redirects outside .onion.

  • Response size and network timeouts are bounded.

  • No generic arbitrary proxy tool is exposed.

  • Content returned by onion services must still be treated as untrusted web content.

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Provides local LLMs with web search and page fetching capabilities via MCP, with a focus on OWASP security best practices.
    2
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    A minimal MCP server that exposes a private SearXNG instance as a search tool over streamable-HTTP, enabling web search from the llama.cpp WebUI or any compatible MCP client.
    4
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    Local MCP server providing web search, web scraping, YouTube metadata/subtitles/downloads, image generation (MFLUX on macOS), and Playwright CLI browser automation tools.
    15
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Routes HTTP requests through the Tor network, enabling anonymous web fetching, exit IP checks, circuit renewal, and site reachability checks from MCP-compatible agents like Claude Desktop and Cursor.
    1
    MIT