
Onion Search
io.github.farbodghasemlu由 GitHub 帳號 farbodghasemlu 發布v1.0.1更新於 Oct 24, 2026
Local, read-only onion search and text retrieval over Tor with content filtering.
概覽
一個本機、唯讀的 MCP 伺服器,透過 Tor 搜尋洋蔥服務並擷取頁面文字,預設啟用內容過濾。
- 可以做什麼
- 在八個已設定的引擎上搜尋洋蔥服務,回傳排序結果、引擎一致性與各引擎失敗資訊。將頁面擷取為 Markdown 文字,含標題、連結與回應中繼資料,或檢查可達性、HTTP 狀態與延遲。列出頁面中的洋蔥連結及可選的明網連結,但不自動跟隨。檢查 Tor 健康狀態:SOCKS 握手、引導百分比與版本。讀取兩個記憶體資源,分別列出已啟用引擎與本程序最近 100 筆查詢。
- 適用情境
- 適合需要讓 AI 助理透過 Tor 查詢與閱讀洋蔥網站、且只要文字檢索與過濾的研究情境。適合能執行 Docker 或帶 Tor 的本機 Python 環境,並願意承擔此類搜尋的法律與隱私責任的使用者。
- 執行需求
- 以本機 stdio 程序執行,通常透過帶 Tor 邊車的 Docker Compose、內建容器,或安裝 Tor 與 libseccomp2 的本機 Python 環境。Tor 需提供 SOCKS 與控制埠,可能需要 TOR_CONTROL_PASSWORD 或 TOR_COOKIE_FILE。選用設定包括 TOR_BRIDGES、ENGINES、CONTENT_FILTER 以及快取與逾時變數。Tor 首次引導可能需數分鐘。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Onion Search,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
darkweb-mcp (onion-search-mcp)
A local Python stdio MCP server for searching onion services and reading pages through Tor. It provides five tools, eight search adapters, memory caches, and two MCP resources.
[!IMPORTANT] Privacy: Use a local model for sensitive searches. Cloud models may receive your queries and fetched content through the MCP client. Check the client's logging, telemetry, and cloud fallback settings.
[!WARNING] User responsibility: You are responsible for your actions and compliance with applicable laws. The authors and contributors disclaim liability for use or misuse of this software to the extent permitted by law.
Run
The two-container setup gives the MCP process an internal Docker network. Only the Tor container has an external route.
Wait for docker compose ps to show Tor as healthy before starting the server. The server uses stdin and stdout for MCP messages. Keep stdout attached to the client.
For a single container with Tor included:
The bundled container has an external route because Tor needs one. Use Compose for network isolation between the server and Tor. Initial Tor bootstrap can take several minutes.
For a local Python installation on Linux, install Tor and libseccomp2, then:
To use an existing Tor process, configure SocksPort 9050 IsolateSOCKSAuth, ControlPort 9051, and control authentication, then run uv run onion-search-mcp. Set TOR_CONTROL_PASSWORD or TOR_COOKIE_FILE if needed.
Content filtering switch
Filtering is enabled by default. Turn it off or on for the process with either environment configuration or CLI options:
Each content tool also accepts content_filter. Pass false to disable filtering for that call, true to enable it, or omit it to use the process setting.
The switch controls domain blocklists and keyword rules. Tor routing, URL validation, text-only retrieval, parser limits, and untrusted-content wrapping always apply. Search engines may apply their own filtering. Cache entries are separated by filter setting.
MCP client configuration
Start the Tor sidecar with docker compose up -d tor, then configure a stdio client:
For the bundled image, use docker run -i --rm onion-search-mcp:local as the command and arguments. For Python, use uv --directory /absolute/path/to/onion run --frozen onion-search-mcp. Tool approval is configured in the client.
Tools
Configuration
Privacy and limits
All HTTP requests use remote DNS through SOCKS, with credentials derived from a random process session and each destination. Tor must use IsolateSOCKSAuth. A SOCKS credential separates streams but does not guarantee a new physical circuit for every request. NEWNYM is requested at shutdown; Tor may rate limit that signal.
The HTTP client stores no cookies and sends no Referer. It performs GET requests only. It does not execute JavaScript, submit forms, follow links automatically, render images, or decode media. Responses are streamed with byte limits and read and total deadlines. Redirect targets are validated before a request is made.
HTML parsing runs in a separate Linux process with a 384 MiB address-space limit, 8 seconds of CPU, a 10-second deadline, and seccomp rules that deny network syscalls. Scripts, styles, comments, embedded objects, and hidden elements are removed. Untrusted text is wrapped with a fresh delimiter. These measures do not prove that a page contains no prompt injection or that a link is legitimate.
Query history and caches stay in memory and are cleared on shutdown. No telemetry, query logging, disk cache, or runtime update checks are implemented. The MCP client and model runtime have their own storage and network behavior; see the privacy notice above.
Blocklists and literal keywords do not detect all abusive content. Links are research leads; engine agreement is a ranking signal.
Development
The unit suite uses saved parser fixtures and a local SOCKS simulator. The leak test stops the proxy and asserts that connections target only the local proxy, with no destination DNS or direct HTTP connection. CI runs integration on a private local Tor network. The test publishes a temporary onion service containing only fixtures. It never queries public search engines or reads third-party onion pages.
An existing test Tor instance can be supplied with TEST_TOR_SOCKS and TEST_TOR_CONTROL. Integration requires a usable Tor circuit and can fail when the network is unavailable. See testing.
Stable errors include TOR_UNAVAILABLE, INVALID_ONION, BLOCKED, TIMEOUT, ALL_ENGINES_FAILED, UNSUPPORTED_CONTENT, INVALID_QUERY, INVALID_ENGINE, INVALID_INPUT, CONFIG_ERROR, RESPONSE_TOO_LARGE, REDIRECT_LIMIT, PARSE_FAILED, and PARSE_TIMEOUT. Tool errors contain scrubbed code and message JSON. Partial searches include per-engine codes and return completed results.
License
MIT. See LICENSE.
來源:README.md,提交 eff821c
工具
0版本歷史
1- v1.0.1最新Oct 15, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分