Labsco
whw23 logo

SearXNG HTTP MCP

β˜… 10

from whw23

Self-contained SearXNG MCP server in Docker with 200+ search engines, dual transport (HTTP + stdio), API key auth, and built-in Web UI.

πŸ”₯πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeAdvanced setup

A self-contained MCP server that wraps SearXNG β€” a free, privacy-respecting metasearch engine that aggregates results from 200+ search engines.


✨ Features

  • πŸ” 200+ search engines β€” Google, Bing, DuckDuckGo, Brave, and more via SearXNG
  • πŸ“‚ 30+ categories β€” news, images, videos, science, IT, and more
  • πŸ“„ Multi-page fanout β€” up to 5 pages per call
  • πŸ’‘ Autocomplete suggestions β€” discover relevant search terms
  • πŸ—‚ Engine discovery β€” query available engines grouped by category
  • 🎯 Token-efficient β€” results trimmed to essentials

Infrastructure

  • πŸ“¦ Self-contained β€” SearXNG built into Docker image
  • πŸ”„ Triple transport β€” HTTP server, Docker stdio, and uvx standalone
  • πŸ” Authentication β€” x-api-key + HTTP Basic Auth
  • 🌐 Reverse proxy β€” SearXNG Web UI on the same port
  • ⚑ Dynamic tool descriptions β€” live category lists injected at startup
  • πŸ“ Rich JSON Schema β€” enum constraints, range limits, and descriptions on every parameter

πŸ› Architecture

graph LR
  Client(["client:YOUR_PORT"]) --> Expose(":8888")

  subgraph Container["🐳 Docker Container"]
    direction LR
    Expose --> Auth{Auth}
    Auth -->|/mcp| MCP[FastMCP Server]
    Auth -->|/*| Proxy[Reverse Proxy]
    MCP --> SearXNG[SearXNG :8080]
    Proxy --> SearXNG
  end

  style Expose fill:none,stroke:#2496ed,stroke-dasharray:5 5,color:#2496ed

  style Client fill:#4a90d9,color:#fff,stroke:#3a7bc8
  style Container fill:#f0f4f8,stroke:#2496ed,stroke-width:2px,color:#2496ed
  style Auth fill:#f5a623,color:#fff,stroke:#d4900e
  style MCP fill:#50c878,color:#fff,stroke:#3da85e
  style Proxy fill:#9b59b6,color:#fff,stroke:#8344a5
  style SearXNG fill:#e74c3c,color:#fff,stroke:#c0392b

πŸ“Š Comparison with Alternatives

Why these five?

There are 20+ SearXNG MCP servers and many more general-purpose search MCPs. Most SearXNG wrappers only expose a basic search tool, leaving SearXNG's categories, autocomplete, and engine metadata unused. We picked five alternatives that each represent a distinct category:

  • 88plug/searxng-mcp β€” richest tool surface among SearXNG MCPs (7 tools: rendered fetch, research mode, parallel queries)
  • ihor/mcp-searxng β€” most GitHub stars among SearXNG MCPs
  • open-webSearch β€” top free multi-engine alternative outside the SearXNG ecosystem (Bing, Baidu, DuckDuckGo, Brave, etc.)
  • exa-mcp-server β€” most popular commercial search API MCP
  • Perplexity MCP β€” commercial AI-powered search, highest star count in the search MCP space
Feature✨ This project88plug/searxng-mcpihor/mcp-searxngopen-webSearchexa-mcp-serverPerplexity MCP
Search
200+ engines via SearXNGβœ…βœ…βœ…βŒβŒβŒ
30+ search categoriesβœ…βŒβŒβŒβŒβŒ
Multi-page fanoutβœ…βŒβŒβŒβŒβŒ
Autocomplete suggestionsβœ…βŒβŒβŒβŒβŒ
Engine discovery toolβœ…βŒβŒβŒβŒβŒ
Dynamic tool descriptionsβœ…βŒβŒβŒβŒβŒ
Infrastructure
Self-contained (built-in search)βœ…βŒβŒβœ…N/AN/A
Zero-install Docker deployβœ…βŒβŒβœ…βŒβŒ
HTTP + stdio transportβœ…βœ…βœ…βœ…βœ…βœ…
Authenticationβœ…βŒβŒβŒβœ…βœ…
Web UI reverse proxyβœ…βŒβŒβŒβŒβŒ
AI Coding Agent Pluginβœ…βŒβŒβŒβŒβœ…
General
Free & open sourceβœ…βœ…βœ…βœ…βŒ (paid API)❌ (paid API)
Privacy (self-hosted)βœ…βœ…βœ…βœ…βŒβŒ
LanguagePythonPythonNode.jsTypeScriptTypeScriptTypeScript
GitHub Stars
Why fewer tools?

MCP is designed for composition β€” clients connect multiple specialized servers, each doing one thing well. Some alternatives bundle URL fetching, rendered page extraction, multi-query fan-out, or research modes into the search server. We keep the tool surface to three (search, autocomplete, engine discovery) by design:

  • URL fetching is a separate concern. MCP clients already ship dedicated tools (WebFetch, Playwright MCP, Jina Reader). Bundling fetch into a search server mixes responsibilities and duplicates the client ecosystem.
  • Multi-query parallel search is client-side orchestration. LLM clients can fire multiple search calls in parallel β€” a search_many tool only adds token overhead for tool selection with no real benefit.
  • Research / synthesis belongs in the LLM layer. The model is the best synthesizer. Pushing multi-step research logic into the MCP server couples application concerns to infrastructure.

Instead we invest in what the alternatives above lack: complete SearXNG API coverage (categories, autocomplete, engine metadata β€” capabilities most wrappers leave on the table), self-contained deployment, authentication, Web UI reverse proxy, and AI coding agent plugin integration (Claude Code / Copilot CLI / Codex CLI).

πŸ”§ MCP Tools Reference

πŸ” search β€” Search the web using SearXNG

Aggregates results from 200+ search engines with privacy.

ParameterTypeRequiredDefaultDescription
querystringyesβ€”The search query to use
categoriesstringno""Comma-separated category names (e.g., general,news,science)
enginesstringno""Comma-separated engine names (e.g., google,arxiv,wikipedia)
languagestringno""Search language code (e.g., en, zh, ja)
time_rangeenumnonullday, week, month, year
safesearchenumno00=off, 1=moderate, 2=strict
pagenoint β‰₯1no1Starting page number
pagesint 1–5no1Number of pages to fetch in parallel
max_resultsint 1–100no10Maximum number of results to return
formatenumnocompactcompact (title/url/content) or full (+ engines/score/category/date)

Returns: results, answers, suggestions, corrections, infoboxes.

πŸ’‘ autocomplete β€” Get search query suggestions
ParameterTypeRequiredDescription
querystringyesPartial query string to get suggestions for
πŸ—‚ engine_info β€” Discover available engines and categories

No parameters. Returns the list of enabled engines grouped by category.

Returns:

{
  "categories": ["general", "images", "videos", "news", ...],
  "engines": ["google", "bing", "duckduckgo", ...],
  "category_engines": {
    "general": ["google", "bing", "duckduckgo", "brave", ...],
    "science": ["arxiv", "google scholar", "pubmed", ...],
    ...
  }
}

Use this to discover what engines are available before calling search with specific engines or categories filters.


🧩 AI Coding Agent Plugin

Compatible with Claude Code, GitHub Copilot CLI, and OpenAI Codex CLI. Add the marketplace, then install the plugin that fits your setup:

/plugin marketplace add whw23/searxng_http_mcp

All plugins include:

  • πŸ” /web-search-via-searxng skill β€” search the web with category selection guide and usage rules
  • πŸ€– web-searcher agent β€” research subagent with:
    • 🌐 Multi-language parallel search β€” auto-detects query language, searches in multiple languages for broader coverage
    • πŸ›‘ Source credibility tiers β€” Tier 1/2/3 classification with AI poisoning defense
    • βœ… Cross-validation β€” key facts require 2+ independent sources
    • πŸ” WebFetch deep reading β€” reads full pages from credible sources, not just snippets
    • πŸ”„ Multi-round iterative search β€” up to 3 rounds with automatic deepening on gaps
    • ⏱ Timeliness evaluation β€” flags outdated content, states source date ranges
    • πŸ“ Footnote-style references β€” structured output with inline source citations
🐍 Standalone mode β€” uvx, no Docker, bring your own SearXNG
/plugin install searxng-http-mcp@searxng-http-mcp-standalone

Runs via uvx. Requires Python 3.14+ and an existing SearXNG instance. Set SEARXNG_URL in ~/.claude/settings.json:

{
  "env": {
    "SEARXNG_URL": "http://YOUR_SEARXNG_HOST:YOUR_SEARXNG_PORT"
  }
}
🐳 Local mode β€” Docker stdio, zero config
/plugin install searxng-http-mcp@searxng-http-mcp

Runs SearXNG in a local Docker container via stdio. Requires Docker installed.

🌐 Remote mode β€” connect to a deployed server via HTTP
/plugin install searxng-http-mcp@searxng-http-mcp-remote

Connects to a deployed SearXNG MCP server. Requires env vars SEARXNG_MCP_URL and SEARXNG_API_KEY.

Add to ~/.claude/settings.json under the env field:

{
  "env": {
    "SEARXNG_MCP_URL": "http://YOUR_HOST:YOUR_PORT/mcp/",
    "SEARXNG_API_KEY": "your-api-key"
  }
}

Then restart Claude Code.


πŸ— Build from Source

git clone https://github.com/whw23/searxng_http_mcp.git
cd searxng_http_mcp
docker build -t searxng-http-mcp:local .
docker run -d --name searxng-mcp --restart unless-stopped \
  -p YOUR_PORT:8888 --memory=512m --cpus=1 \
  searxng-http-mcp:local

🀝 Contributing

See CONTRIBUTING.md for the full workflow, CI requirements, and development setup.

  1. 🍴 Fork the repository and enable GitHub Actions in your fork
  2. 🌿 Create a feature branch from dev
  3. ✍️ Make your changes
  4. βœ… Run tests: pytest tests/ -v β€” CI must pass in your fork before opening a PR
  5. πŸ“¬ Submit a PR to dev

Development happens on the dev branch. Merges to main trigger image builds.

πŸ“„ License

MIT β€” MCP server code.

SearXNG itself is licensed under AGPL-3.0-or-later.