Skip to main content
Glama
neutron42-jp

tor-mcp

by neutron42-jp

本项目由 LLM 制作

Tor Web MCP

面向 LM Studio 的本地 MCP 服务器,提供两个工具:

  • tor_search(query, max_results=8) — 搜索 Ahmia 索引的洋葱服务。

  • tor_fetch(url, max_chars=30000) — 通过本地 Tor SOCKS5 代理获取 v3 .onion URL。

安装

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

如果您的 Tor SOCKS 监听地址不是 127.0.0.1:9050,请设置 TOR_SOCKS_URL。Tor Browser 通常使用不同的端口,请验证您的配置。

Related MCP server: searxng-mcp-bridge

测试

mcp dev server.py

LM Studio

使用绝对路径配置本地 stdio MCP 服务器:

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

错误语义

该抓取器有意返回 LLM 可读的错误类别。特别是,当搜索结果不再可达时,会变成:

[SEARCH_RESULT_STALE]

这意味着该 URL 曾被索引,但当前不可达;这并不证明该地址无效。模型随后可以尝试另一个搜索结果。

其他类别包括 INVALID_ONION_URL、TOR_SEARCH_TIMEOUT、TOR_SEARCH_HTTP_ERROR、TOR_SEARCH_NETWORK_ERROR、NO_RESULTS、TOR_FETCH_NETWORK_ERROR、TOR_REDIRECT 和 TOR_REDIRECT_BLOCKED。

安全边界

  • tor_fetch 仅接受 HTTP/HTTPS v3 .onion URL。

  • 不自动重定向到 .onion 之外。

  • 响应大小和网络超时均有上限。

  • 不暴露通用的任意代理工具。

  • 洋葱服务返回的内容仍必须视为不可信的 Web 内容。

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
    D
    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
    D
    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