searxng-mcp

searxng-mcp

An MCP server for SearXNG that provides web search capabilities with concise model-visible output while preserving full result payloads in metadata. It supports search, parallel fetching, URL extraction, and research workflows through both local stdio and streamable HTTP transports.

Category
访问服务器

README

searxng-mcp

CI Release Pages

An MCP server for SearXNG that keeps the model-visible output short, preserves full result payloads in hidden metadata, and supports both local stdio clients and deployed streamable-http use.

What you get

  • search for concise web search with full raw payloads in _meta
  • search_many for parallel fan-out, dedupe, and merged ranking
  • search_and_fetch for search plus source extraction in one call
  • research for multi-query search with batch fetches and merged sources
  • fetch_url for readable page extraction with citations
  • fetch_many for parallel URL extraction with caching
  • health for backend, cache, and render status

The server is designed to be thin. SearXNG does the search work; searxng-mcp handles tool shaping, caching, extraction, and transport.

Quick Start

Install from a checkout

uv sync
uv run searxng-mcp

Install with uvx

searxng-mcp is distributed from this repository (no PyPI release). The shortest path is:

uvx --from git+https://github.com/88plug/searxng-mcp searxng-mcp

For rendered fetch support, request the render extra:

uvx --from "searxng-mcp[render] @ git+https://github.com/88plug/searxng-mcp" searxng-mcp

Run with Docker

docker build -t searxng-mcp .
docker run --rm -p 8811:8811 --add-host=host.docker.internal:host-gateway \
  -e SEARXNG_MCP_BASE_URL=http://host.docker.internal:8890 \
  searxng-mcp

Claude Desktop example

{
  "mcpServers": {
    "searxng-mcp": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/88plug/searxng-mcp", "searxng-mcp"],
      "env": {
        "SEARXNG_MCP_BASE_URL": "http://127.0.0.1:8890",
        "SEARXNG_MCP_TRANSPORT": "stdio"
      }
    }
  }
}

Deployment Modes

Local stdio

Use this for desktop clients and private workflows. It is the simplest and safest mode.

SEARXNG_MCP_TRANSPORT=stdio uv run searxng-mcp

Streamable HTTP

Use this for a private service, a team deployment, or a reverse-proxied internal endpoint.

SEARXNG_MCP_TRANSPORT=streamable-http uv run searxng-mcp --host 0.0.0.0 --port 8811

Hardened Docker and Compose

For a longer-running self-hosted service, use the hardened container variant and the provided Compose stack.

docker build -f Dockerfile.prod -t searxng-mcp:prod .
cp docker-compose.env.example .env
docker compose up --build -d

Security and Trust

This project is safe for local and trusted-network use. It is not a drop-in public Internet service.

  • fetch_url and fetch_many can fetch arbitrary URLs supplied by the client
  • rendered extraction may launch Chromium against untrusted pages
  • streamable-http should be put behind auth or a reverse proxy for any shared deployment
  • SEARXNG_MCP_FETCH_VERIFY_TLS=0 is only for private or self-signed backend setups

If you expose the HTTP transport, treat it like an internal service and add the controls you would expect for any SSRF-capable tool.

Why This Exists

  • compact model-visible output, with full details preserved in hidden metadata
  • faster research workflows through parallel search and fetch fan-out
  • optional rendered extraction for JS-heavy pages
  • self-hostable deployment for people who want their own SearXNG-backed MCP server

MCP Surface

  • searxng://config exposes current settings, transport mode, and render support
  • searxng://guide summarizes the available tools and when to use them
  • quick_lookup, deep_research, and research_workflow are optional compatibility prompts for clients that support prompt surfaces

Environment

Key variables:

  • SEARXNG_MCP_BASE_URL: SearXNG base URL, default http://127.0.0.1:8890
  • SEARXNG_MCP_FALLBACK_BASE_URLS: optional comma-separated fallback SearXNG instances
  • SEARXNG_MCP_TRANSPORT: stdio, streamable-http, or sse
  • SEARXNG_MCP_SEARCH_TIMEOUT: backend search timeout in seconds
  • SEARXNG_MCP_FETCH_TIMEOUT: fetch timeout in seconds
  • SEARXNG_MCP_SEARCH_CACHE_TTL: search cache TTL in seconds
  • SEARXNG_MCP_FETCH_CACHE_TTL: fetch cache TTL in seconds
  • SEARXNG_MCP_FETCH_VERIFY_TLS: set to 0 to skip TLS verification on fetches
  • SEARXNG_MCP_RENDER_TIMEOUT: browser navigation timeout for rendered fetches
  • SEARXNG_MCP_RENDER_WAIT_MS: extra wait after DOM content load for rendered fetches
  • SEARXNG_MCP_RENDER_CONCURRENCY: concurrent rendered fetch limit
  • SEARXNG_MCP_RENDER_HEADLESS: set to 0 to show the browser
  • SEARXNG_MCP_RENDER_BROWSER_PATH: explicit Chromium or Chrome binary path
  • SEARXNG_MCP_RENDER_SANDBOX: set to 1 to keep Chromium sandboxing enabled
  • SEARXNG_MCP_RENDER_BLOCK_RESOURCES: set to 0 to allow images, fonts, stylesheets, and media during render
  • SEARXNG_MCP_RENDER_AUTO_FALLBACK: set to 0 to disable automatic rendered fallback
  • SEARXNG_MCP_RENDER_AUTO_MIN_WORDS: lower this to make auto-render more aggressive
  • SEARXNG_MCP_RENDER_AUTO_MIN_CHARS: lower this to make auto-render more aggressive
  • SEARXNG_MCP_CACHE_DIR: cache directory path

Benchmarks

uv run searxng-mcp-bench --rounds 3

The benchmark reports:

  • raw SearXNG backend latency
  • token-visible search output size
  • merged multi-query search latency
  • multi-query research latency
  • fetch extraction latency
  • rendered fetch latency
  • batch fetch extraction latency
  • rendered batch fetch latency

Documentation

Build and Test

uv sync --all-groups
uv run pytest -q
uv run python -m compileall src
uv run mkdocs build --strict

Dependency Maintenance

Manual checks:

uv lock --upgrade --dry-run
uvx --from pip-audit pip-audit

Automated checks:

  • weekly Dependabot PRs for uv dependencies and GitHub Actions
  • weekly Dependency Health workflow for vulnerability scanning and upgrade dry runs

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选