SearXNG

io.github.danchev由 GitHub 帳號 danchev 發布v0.1.2更新於 Nov 10, 2026

Privacy-friendly web search through a configurable SearXNG instance.

概覽

AI 產生的概覽

讓助理透過 SearXNG 元搜尋引擎實例進行重視隱私的網頁搜尋,並可依引擎、類別、語言、時間範圍與結果數量篩選。

可以做什麼
提供單一 web_search 工具,向設定的 SearXNG 元搜尋實例發出查詢並回傳結果。此工具需要 query 參數,選用參數包括 categories、engines、language、max_results(1-100)與 time_range。實例無法連線、被限流或回應格式錯誤時會回傳錯誤結果,而不是空清單。每個行程最多同時處理八個搜尋請求。
適用情境
適合助理需要一般網頁搜尋、又不想依賴商業搜尋 API 的情境,也適合需要控制查詢引擎、類別與語言的情況。如果你已經自行運作或信任某個 SearXNG 實例,或希望搜尋請求不經過託管搜尋服務,可以考慮使用。
執行需求
以 stdio 方式在本機執行,可用 uvx(Python)或 Docker 啟動,也可透過 Streamable HTTP 提供服務。需要能連線到 SearXNG 實例的網路;預設實例為 --instance-url 變更。未宣告帳號、API 金鑰或環境變數。選用參數包括 --timeout、--log-level、--transport、--host、--port 以及可重複的 --header。
安裝前請注意
查詢內容、所選引擎、類別、語言、時間範圍與安全搜尋設定會傳送到設定的 SearXNG 實例,該實例是獨立第三方,有其自身隱私政策;傳送敏感查詢前請先檢視其政策或自行架設。HTTP 傳輸不做身分驗證,預設綁定 127.0.0.1;綁定到 0.0.0.0 會停用 DNS 重綁定保護,只應在可信任網路或具驗證機制的反向代理後方使用。自訂 --header 可能攜帶憑證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 SearXNG,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[PyPI Version] [License] [PyPI Downloads]

SearXNG MCP Server

A Model Context Protocol (MCP) server that equips AI agents with privacy-friendly web search capabilities using the SearXNG metasearch engine.

Features

This server provides the following main features:

  • Web search via multiple search engines
  • Supports various search categories (general, images, news, etc.)
  • Customizable search engine selection
  • Language filtering
  • Time range filtering
  • Control over the number of search results

Available Tools

  • web_search - Perform web search using SearXNG
    • Required parameters:
      • query (string): The search query
    • Optional parameters:
      • categories (array): Search categories, e.g. ['general', 'images', 'news']
      • engines (array): Search engines, e.g. ['google', 'bing', 'duckduckgo']
      • language (string): Language code for search, default is "en"
      • max_results (integer): Maximum number of results, default is 10 (1-100)
      • time_range (string): Time range filter ('day', 'week', 'month', 'year')

If a search cannot be completed (the instance is unreachable, rate-limits the request, or returns a malformed response), the tool returns an error result describing the failure rather than an empty result list.

Search Limits

Each server process admits up to eight concurrent searches. Further calls return an error immediately and can be retried later. --timeout bounds the complete network operation, including streaming the response; cancellation closes the active request. Responses are limited to 2 MiB before JSON parsing.

The configured instance must serve /search directly: redirects are rejected. The client requests Accept-Encoding: identity and rejects compressed responses to prevent unbounded decompression. Result fields are also truncated to their existing limits. Missing or non-list results and upstream error objects are reported as failures, while a valid empty list remains a successful search.

Application logs omit search queries and upstream exception text. The CLI keeps HTTP dependency logging at WARNING even when --log-level=DEBUG is selected.

Privacy Policy

This software does not operate a hosted search service and does not send search queries to its maintainer. It runs on the user's device or infrastructure and sends each query, selected engines, categories, language, time range, and safe search setting directly to the configured SearXNG instance. Search results are returned to the connected MCP client.

The software does not persist queries or results, use analytics or advertising trackers, create user profiles, or share data with the maintainer. Operational logs record result counts and errors but omit query text and upstream exception details. In-memory request and result data is discarded after the request.

The selected SearXNG instance and the search engines it contacts are independent third parties. Their collection, use, sharing, and retention practices are governed by their own privacy policies. Before sending sensitive queries, users should review the selected instance's privacy notice or operate an instance they trust. The default CLI instance is https://searx.party; its policy is at https://searx.party/info/en/privacy.

Privacy questions and requests can be filed at https://github.com/danchev/searXNG/issues.

Command Line Options

OptionDefaultDescription
--instance-urlhttps://searx.partySearXNG instance base URL. Must be absolute and cannot contain credentials, a query string, or a fragment.
--timeout30Total search network timeout, in seconds.
--log-levelWARNINGLogging verbosity: DEBUG, INFO, WARNING, ERROR, CRITICAL. Logs are written to stderr.
--transportstdioTransport to serve on: stdio or http.
--host127.0.0.1Host to bind when --transport=http.
--port8000Port to bind when --transport=http.
--headerNoneCustom HTTP headers to send with search requests (e.g., X-Forwarded-For: 1.2.3.4). Can be specified multiple times.

Docker / Kubernetes

You can run the server easily using the official container image published to the GitHub Container Registry:

bash
docker run -p 8000:8000 ghcr.io/danchev/searxng:latest \    --transport http \    --host 0.0.0.0 \    --instance-url=https://searx.party \    --header "Authorization: Bearer my-secret-token"

Transports

By default the server speaks stdio, which is what local MCP clients (Claude Desktop, IDE integrations, uvx) launch it with.

For remote access, --transport http serves the Streamable HTTP transport at /mcp:

bash
searxng --transport http --host 127.0.0.1 --port 8000# endpoint: http://127.0.0.1:8000/mcp

The legacy SSE transport is intentionally not implemented. It was superseded by Streamable HTTP in the 2025-03-26 MCP protocol revision and should not be used for new deployments.

Security: the server performs no authentication, so it binds to 127.0.0.1 by default. Only pass --host 0.0.0.0 on a trusted network, or put an authenticating reverse proxy in front of it.

Binding to a non-loopback host also disables the MCP SDK's DNS-rebinding protection, which it can only enable automatically for 127.0.0.1, localhost, and ::1. On a loopback bind a forged Host header is rejected with 421 Misdirected Request; on a public bind any Host is accepted. The server logs a warning at startup when this applies.

Usage Example

Configure as an MCP Service

To set up SearXNG as an MCP server, add one of the following to your MCP configuration file:

UVX setup:

json
"mcpServers": {  "searxng": {    "command": "uvx",    "args": ["searxng", "--instance-url=https://searx.party"]  }}

Docker setup (Local stdio):

json
"mcpServers": {  "searxng": {    "command": "docker",    "args": [      "run",      "-i",      "--rm",      "ghcr.io/danchev/searxng:latest",      "--instance-url=https://searx.party"    ]  }}

This launches the server over stdio, which is the right choice for a local client.

Remote setup (Streamable HTTP):

Start the server as a long-running process:

bash
searxng --transport http --host 0.0.0.0 --port 8000 \        --instance-url=https://searx.party

Then point the client at its /mcp endpoint:

json
"mcpServers": {  "searxng": {    "url": "http://your-host:8000/mcp"  }}

Note the --host 0.0.0.0 needed to accept connections from other machines, and the security caveat above: the server is unauthenticated, so restrict it to a trusted network or front it with an authenticating reverse proxy.

Example Invocation

json
{  "name": "web_search",  "arguments": {    "query": "climate change research",    "categories": ["general"],    "engines": ["google"],    "language": "en",    "max_results": 15,    "time_range": "month"  }}

Debugging

You can use the MCP inspector to debug the server:

bash
npx @modelcontextprotocol/inspector uvx searxng

License

AGPLv3+ License - see LICENSE for details.

來源:README.md,提交 136bce7

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分