{
  "markdown": "<div align=\"center\">\n\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/banner-dark.svg\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/banner-light.svg\">\n  <img alt=\"SearXNG HTTP MCP\" src=\"assets/banner-light.svg\" width=\"100%\">\n</picture>\n\n<p>\n  <a href=\"https://github.com/whw23/searxng_http_mcp/blob/main/LICENSE\"><img src=\"https://img.shields.io/github/license/whw23/searxng_http_mcp?color=yellow\" alt=\"License\"></a>\n  <a href=\"https://github.com/whw23/searxng_http_mcp/pkgs/container/searxng-http-mcp\"><img src=\"https://img.shields.io/badge/ghcr.io-latest-blue?logo=docker&logoColor=white\" alt=\"Docker Image\"></a>\n  <a href=\"https://github.com/whw23/searxng_http_mcp/actions/workflows/build.yml\"><img src=\"https://github.com/whw23/searxng_http_mcp/actions/workflows/build.yml/badge.svg\" alt=\"Build Status\"></a>\n  <img src=\"https://img.shields.io/badge/python-3.14+-blue?logo=python&logoColor=white\" alt=\"Python 3.14+\">\n  <img src=\"https://img.shields.io/badge/transport-HTTP%20%7C%20stdio-orange\" alt=\"Transport\">\n  <img src=\"https://img.shields.io/badge/MCP-compatible-brightgreen\" alt=\"MCP Compatible\">\n  <a href=\"https://pypi.org/project/searxng-http-mcp/\"><img src=\"https://img.shields.io/pypi/v/searxng-http-mcp?logo=pypi&logoColor=white\" alt=\"PyPI\"></a>\n  <a href=\"https://registry.modelcontextprotocol.io/?q=io.github.whw23/searxng-http-mcp\"><img src=\"https://img.shields.io/badge/MCP_Registry-published-brightgreen\" alt=\"MCP Registry\"></a>\n  <a href=\"https://scorecard.dev/viewer/?uri=github.com/whw23/searxng_http_mcp\"><img src=\"https://api.scorecard.dev/projects/github.com/whw23/searxng_http_mcp/badge\" alt=\"OpenSSF Scorecard\"></a>\n  <a href=\"https://www.bestpractices.dev/projects/12854\"><img src=\"https://www.bestpractices.dev/projects/12854/badge\" alt=\"OpenSSF Best Practices\"></a>\n  <a href=\"https://github.com/punkpeye/awesome-mcp-servers\"><img src=\"https://awesome.re/mentioned-badge.svg\" alt=\"Mentioned in Awesome MCP Servers\"></a>\n  <a href=\"https://glama.ai/mcp/servers/whw23/searxng_http_mcp\"><img src=\"https://glama.ai/mcp/servers/whw23/searxng_http_mcp/badges/score.svg\" alt=\"Glama score\"></a>\n</p>\n\n<a href=\"https://glama.ai/mcp/servers/whw23/searxng_http_mcp\"><img width=\"380\" height=\"200\" src=\"https://glama.ai/mcp/servers/whw23/searxng_http_mcp/badge\" alt=\"searxng-http-mcp MCP server\"></a>\n\n<p>\n  <a href=\"README.zh-CN.md\">中文</a> ·\n  <a href=\"#-quick-start\">Quick Start</a> ·\n  <a href=\"#-features\">Features</a> ·\n  <a href=\"#-architecture\">Architecture</a> ·\n  <a href=\"#-comparison-with-alternatives\">Comparison</a> ·\n  <a href=\"#-usage\">Usage</a> ·\n  <a href=\"#-mcp-tools-reference\">MCP Tools</a> ·\n  <a href=\"#-client-configuration\">Client Config</a> ·\n  <a href=\"#-ai-coding-agent-plugin\">Plugin</a> ·\n  <a href=\"#-contributing\">Contributing</a>\n</p>\n\n</div>\n\nA self-contained MCP server that wraps [SearXNG](https://github.com/searxng/searxng) — a free, privacy-respecting metasearch engine that aggregates results from 200+ search engines.\n\n---\n\n## 🚀 Quick Start\n\n**Server mode** — deploy once, connect from any client:\n\n```bash\ndocker run -d --name searxng-mcp --restart unless-stopped \\\n  -p YOUR_PORT:8888 --memory=512m --cpus=1 \\\n  ghcr.io/whw23/searxng-http-mcp:latest\n```\n\nThen [connect your client](#-client-configuration) to `http://YOUR_HOST:YOUR_PORT/mcp/`. To enable API key auth, see [Authentication](#-authentication).\n\n**Local mode** — no server needed, run directly in your client:\n\n```bash\ndocker run --rm -i --memory=512m --cpus=1 ghcr.io/whw23/searxng-http-mcp:latest --stdio\n```\n\nAdd this as a stdio MCP server in your client — see [Client Configuration](#-client-configuration) for details.\n\n**uvx mode** — if you already have SearXNG running ([install guide](https://docs.searxng.org/admin/installation.html)):\n\n```bash\nuvx searxng-http-mcp\n```\n\nSet `SEARXNG_URL` to point to your SearXNG instance (default: `http://127.0.0.1:8080`).\n\n## ✨ Features\n\n### Search\n\n- 🔍 200+ search engines — Google, Bing, DuckDuckGo, Brave, and more via SearXNG\n- 📂 30+ categories — news, images, videos, science, IT, and more\n- 📄 Multi-page fanout — up to 5 pages per call\n- 💡 Autocomplete suggestions — discover relevant search terms\n- 🗂 Engine discovery — query available engines grouped by category\n- 🎯 Token-efficient — results trimmed to essentials\n\n### Infrastructure\n\n- 📦 Self-contained — SearXNG built into Docker image\n- 🔄 Triple transport — HTTP server, Docker stdio, and uvx standalone\n- 🔐 Authentication — `x-api-key` + HTTP Basic Auth\n- 🌐 Reverse proxy — SearXNG Web UI on the same port\n- ⚡ Dynamic tool descriptions — live category lists injected at startup\n- 📐 Rich JSON Schema — enum constraints, range limits, and descriptions on every parameter\n\n## 🏛 Architecture\n\n```mermaid\ngraph LR\n  Client([\"client:YOUR_PORT\"]) --> Expose(\":8888\")\n\n  subgraph Container[\"🐳 Docker Container\"]\n    direction LR\n    Expose --> Auth{Auth}\n    Auth -->|/mcp| MCP[FastMCP Server]\n    Auth -->|/*| Proxy[Reverse Proxy]\n    MCP --> SearXNG[SearXNG :8080]\n    Proxy --> SearXNG\n  end\n\n  style Expose fill:none,stroke:#2496ed,stroke-dasharray:5 5,color:#2496ed\n\n  style Client fill:#4a90d9,color:#fff,stroke:#3a7bc8\n  style Container fill:#f0f4f8,stroke:#2496ed,stroke-width:2px,color:#2496ed\n  style Auth fill:#f5a623,color:#fff,stroke:#d4900e\n  style MCP fill:#50c878,color:#fff,stroke:#3da85e\n  style Proxy fill:#9b59b6,color:#fff,stroke:#8344a5\n  style SearXNG fill:#e74c3c,color:#fff,stroke:#c0392b\n```\n\n## 📊 Comparison with Alternatives\n\n<details>\n<summary>Why these five?</summary>\n\nThere are [20+ SearXNG MCP servers](https://glama.ai/mcp/servers?query=searxng) 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:\n\n- **88plug/searxng-mcp** — richest tool surface among SearXNG MCPs (7 tools: rendered fetch, research mode, parallel queries)\n- **ihor/mcp-searxng** — most GitHub stars among SearXNG MCPs\n- **open-webSearch** — top free multi-engine alternative outside the SearXNG ecosystem (Bing, Baidu, DuckDuckGo, Brave, etc.)\n- **exa-mcp-server** — most popular commercial search API MCP\n- **Perplexity MCP** — commercial AI-powered search, highest star count in the search MCP space\n\n</details>\n\n<table>\n<thead>\n  <tr>\n    <th>Feature</th>\n    <th>✨ This project</th>\n    <th><a href=\"https://github.com/88plug/searxng-mcp\">88plug/searxng-mcp</a></th>\n    <th><a href=\"https://github.com/ihor-sokoliuk/mcp-searxng\">ihor/mcp-searxng</a></th>\n    <th><a href=\"https://github.com/Aas-ee/open-webSearch\">open-webSearch</a></th>\n    <th><a href=\"https://github.com/exa-labs/exa-mcp-server\">exa-mcp-server</a></th>\n    <th><a href=\"https://github.com/perplexityai/modelcontextprotocol\">Perplexity MCP</a></th>\n  </tr>\n</thead>\n<tbody>\n  <tr><td colspan=\"7\"><strong>Search</strong></td></tr>\n  <tr><td>200+ engines via SearXNG</td><td align=\"center\">&#9989;</td><td align=\"center\">&#9989;</td><td align=\"center\">&#9989;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td></tr>\n  <tr><td>30+ search categories</td><td align=\"center\">&#9989;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td></tr>\n  <tr><td>Multi-page fanout</td><td align=\"center\">&#9989;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td></tr>\n  <tr><td>Autocomplete suggestions</td><td align=\"center\">&#9989;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td></tr>\n  <tr><td>Engine discovery tool</td><td align=\"center\">&#9989;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td></tr>\n  <tr><td>Dynamic tool descriptions</td><td align=\"center\">&#9989;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td></tr>\n  <tr><td colspan=\"7\"><strong>Infrastructure</strong></td></tr>\n  <tr><td>Self-contained (built-in search)</td><td align=\"center\">&#9989;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#9989;</td><td align=\"center\">N/A</td><td align=\"center\">N/A</td></tr>\n  <tr><td>Zero-install Docker deploy</td><td align=\"center\">&#9989;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#9989;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td></tr>\n  <tr><td>HTTP + stdio transport</td><td align=\"center\">&#9989;</td><td align=\"center\">&#9989;</td><td align=\"center\">&#9989;</td><td align=\"center\">&#9989;</td><td align=\"center\">&#9989;</td><td align=\"center\">&#9989;</td></tr>\n  <tr><td>Authentication</td><td align=\"center\">&#9989;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#9989;</td><td align=\"center\">&#9989;</td></tr>\n  <tr><td>Web UI reverse proxy</td><td align=\"center\">&#9989;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td></tr>\n  <tr><td>AI Coding Agent Plugin</td><td align=\"center\">&#9989;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#9989;</td></tr>\n  <tr><td colspan=\"7\"><strong>General</strong></td></tr>\n  <tr><td>Free &amp; open source</td><td align=\"center\">&#9989;</td><td align=\"center\">&#9989;</td><td align=\"center\">&#9989;</td><td align=\"center\">&#9989;</td><td align=\"center\">&#10060; (paid API)</td><td align=\"center\">&#10060; (paid API)</td></tr>\n  <tr><td>Privacy (self-hosted)</td><td align=\"center\">&#9989;</td><td align=\"center\">&#9989;</td><td align=\"center\">&#9989;</td><td align=\"center\">&#9989;</td><td align=\"center\">&#10060;</td><td align=\"center\">&#10060;</td></tr>\n  <tr><td>Language</td><td align=\"center\">Python</td><td align=\"center\">Python</td><td align=\"center\">Node.js</td><td align=\"center\">TypeScript</td><td align=\"center\">TypeScript</td><td align=\"center\">TypeScript</td></tr>\n  <tr><td>GitHub Stars</td><td align=\"center\"><a href=\"https://github.com/whw23/searxng_http_mcp\"><img src=\"https://img.shields.io/github/stars/whw23/searxng_http_mcp?style=social\" alt=\"stars\"></a></td><td align=\"center\"><a href=\"https://github.com/88plug/searxng-mcp\"><img src=\"https://img.shields.io/github/stars/88plug/searxng-mcp?style=social\" alt=\"stars\"></a></td><td align=\"center\"><a href=\"https://github.com/ihor-sokoliuk/mcp-searxng\"><img src=\"https://img.shields.io/github/stars/ihor-sokoliuk/mcp-searxng?style=social\" alt=\"stars\"></a></td><td align=\"center\"><a href=\"https://github.com/Aas-ee/open-webSearch\"><img src=\"https://img.shields.io/github/stars/Aas-ee/open-webSearch?style=social\" alt=\"stars\"></a></td><td align=\"center\"><a href=\"https://github.com/exa-labs/exa-mcp-server\"><img src=\"https://img.shields.io/github/stars/exa-labs/exa-mcp-server?style=social\" alt=\"stars\"></a></td><td align=\"center\"><a href=\"https://github.com/perplexityai/modelcontextprotocol\"><img src=\"https://img.shields.io/github/stars/perplexityai/modelcontextprotocol?style=social\" alt=\"stars\"></a></td></tr>\n</tbody>\n</table>\n\n<details>\n<summary>Why fewer tools?</summary>\n\nMCP 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:\n\n- **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.\n- **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.\n- **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.\n\nInstead 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).**\n\n</details>\n\n## 📖 Usage\n\n### 🌐 HTTP Mode (default)\n\n```bash\n# Without authentication\ndocker run -d --name searxng-mcp --restart unless-stopped \\\n  -p YOUR_PORT:8888 --memory=512m --cpus=1 \\\n  ghcr.io/whw23/searxng-http-mcp:latest\n\n# With authentication\ndocker run -d --name searxng-mcp --restart unless-stopped \\\n  -p YOUR_PORT:8888 --memory=512m --cpus=1 \\\n  -e API_KEY=your-secret-key \\\n  ghcr.io/whw23/searxng-http-mcp:latest\n```\n\n<table>\n<tr><td>🔗 <strong>MCP Endpoint</strong></td><td><code>http://YOUR_HOST:YOUR_PORT/mcp/</code></td></tr>\n<tr><td>🖥 <strong>SearXNG Web UI</strong></td><td><code>http://YOUR_HOST:YOUR_PORT/</code></td></tr>\n</table>\n\n### 📡 stdio Mode\n\n```bash\ndocker run --rm -i --memory=512m --cpus=1 \\\n  ghcr.io/whw23/searxng-http-mcp:latest --stdio\n```\n\nNo ports exposed. Communication via stdin/stdout. SearXNG runs internally for the MCP tools.\n\n### 🐍 uvx Mode\n\n```bash\n# Connect to a local SearXNG instance (default: http://127.0.0.1:8080)\nuvx searxng-http-mcp\n\n# Connect to a remote SearXNG instance\nSEARXNG_URL=http://YOUR_SEARXNG_HOST:YOUR_SEARXNG_PORT uvx searxng-http-mcp\n```\n\nRequires Python 3.14+ and an existing SearXNG instance. No Docker needed.\n\n### ⚙️ Environment Variables\n\n<table>\n<thead>\n  <tr><th>Variable</th><th>Default</th><th>Description</th></tr>\n</thead>\n<tbody>\n  <tr><td><code>API_KEY</code></td><td><em>(empty, no auth)</em></td><td>API key for authentication</td></tr>\n  <tr><td><code>SEARXNG_URL</code></td><td><code>http://127.0.0.1:8080</code></td><td>SearXNG instance URL (for uvx/standalone mode)</td></tr>\n</tbody>\n</table>\n\n### 🔐 Authentication\n\nWhen `API_KEY` is set, all requests require one of:\n\n- **`x-api-key` header** — for MCP clients: `x-api-key: your-key`\n- **HTTP Basic Auth** — for browsers\n\n> [!TIP]\n> **Browser Login:** When accessing the Web UI with `API_KEY` enabled, the browser will show a login dialog. **Leave the username empty** and enter your API key as the **password**.\n>\n> <img src=\"assets/browser_login.svg\" alt=\"Browser Login Dialog\" width=\"420\">\n\nWhen `API_KEY` is not set, all requests are open.\n\n---\n\n## 🔧 MCP Tools Reference\n\n<details>\n<summary>🔍 <code>search</code> — Search the web using SearXNG</summary>\n\n<br>\n\nAggregates results from 200+ search engines with privacy.\n\n<table>\n<thead>\n  <tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr>\n</thead>\n<tbody>\n  <tr><td><code>query</code></td><td>string</td><td>yes</td><td>—</td><td>The search query to use</td></tr>\n  <tr><td><code>categories</code></td><td>string</td><td>no</td><td>\"\"</td><td>Comma-separated category names (e.g., <code>general,news,science</code>)</td></tr>\n  <tr><td><code>engines</code></td><td>string</td><td>no</td><td>\"\"</td><td>Comma-separated engine names (e.g., <code>google,arxiv,wikipedia</code>)</td></tr>\n  <tr><td><code>language</code></td><td>string</td><td>no</td><td>\"\"</td><td>Search language code (e.g., <code>en</code>, <code>zh</code>, <code>ja</code>)</td></tr>\n  <tr><td><code>time_range</code></td><td>enum</td><td>no</td><td>null</td><td><code>day</code>, <code>week</code>, <code>month</code>, <code>year</code></td></tr>\n  <tr><td><code>safesearch</code></td><td>enum</td><td>no</td><td>0</td><td><code>0</code>=off, <code>1</code>=moderate, <code>2</code>=strict</td></tr>\n  <tr><td><code>pageno</code></td><td>int ≥1</td><td>no</td><td>1</td><td>Starting page number</td></tr>\n  <tr><td><code>pages</code></td><td>int 1–5</td><td>no</td><td>1</td><td>Number of pages to fetch in parallel</td></tr>\n  <tr><td><code>max_results</code></td><td>int 1–100</td><td>no</td><td>10</td><td>Maximum number of results to return</td></tr>\n  <tr><td><code>format</code></td><td>enum</td><td>no</td><td>compact</td><td><code>compact</code> (title/url/content) or <code>full</code> (+ engines/score/category/date)</td></tr>\n</tbody>\n</table>\n\n**Returns:** results, answers, suggestions, corrections, infoboxes.\n\n</details>\n\n<details>\n<summary>💡 <code>autocomplete</code> — Get search query suggestions</summary>\n\n<br>\n\n<table>\n<thead>\n  <tr><th>Parameter</th><th>Type</th><th>Required</th><th>Description</th></tr>\n</thead>\n<tbody>\n  <tr><td><code>query</code></td><td>string</td><td>yes</td><td>Partial query string to get suggestions for</td></tr>\n</tbody>\n</table>\n\n</details>\n\n<details>\n<summary>🗂 <code>engine_info</code> — Discover available engines and categories</summary>\n\n<br>\n\nNo parameters. Returns the list of enabled engines grouped by category.\n\n**Returns:**\n\n```json\n{\n  \"categories\": [\"general\", \"images\", \"videos\", \"news\", ...],\n  \"engines\": [\"google\", \"bing\", \"duckduckgo\", ...],\n  \"category_engines\": {\n    \"general\": [\"google\", \"bing\", \"duckduckgo\", \"brave\", ...],\n    \"science\": [\"arxiv\", \"google scholar\", \"pubmed\", ...],\n    ...\n  }\n}\n```\n\nUse this to discover what engines are available before calling `search` with specific `engines` or `categories` filters.\n\n</details>\n\n---\n\n## 🔌 Client Configuration\n\nThe following is a **baseline** server-mode (remote HTTP) example using the standard `mcpServers` JSON structure. Many clients accept this structure, but field names and required `type` values differ — see the NOTE below and adjust for your client:\n\n```json\n{\n  \"mcpServers\": {\n    \"searxng\": {\n      \"type\": \"http\",\n      \"url\": \"http://YOUR_HOST:YOUR_PORT/mcp/\",\n      \"headers\": {\n        \"x-api-key\": \"your-secret-key\"\n      }\n    }\n  }\n}\n```\n\n> [!NOTE]\n> Field-name differences: **ZCode** uses `mcp.servers`; **Kilo Code** uses a top-level `mcp` key with `\"type\": \"remote\"`; **Windsurf** uses `serverUrl` instead of `url`; **VS Code Copilot** uses a top-level `servers` key; **OpenCode** nests under `mcp` with `\"type\": \"remote\"`; **Codex** and **Hermes** use `mcp_servers` (TOML/YAML). For **Claude Code**, `\"type\": \"http\"` is **required** — without it the entry is read as a stdio server and skipped. For **Cline**, set `\"type\": \"streamableHttp\"` on remote HTTP servers.\n\n<details>\n<summary><img src=\"assets/icons/claude.svg\" height=\"16\" alt=\"Claude\"> <b>Claude Desktop</b></summary>\n\n**Server mode** — edit `~/Library/Application Support/Claude/claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"searxng\": {\n      \"url\": \"http://YOUR_HOST:YOUR_PORT/mcp/\",\n      \"headers\": {\n        \"x-api-key\": \"your-secret-key\"\n      }\n    }\n  }\n}\n```\n\n**Local mode**:\n\n```json\n{\n  \"mcpServers\": {\n    \"searxng\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"--rm\", \"-i\", \"--memory=512m\", \"--cpus=1\", \"ghcr.io/whw23/searxng-http-mcp:latest\", \"--stdio\"]\n    }\n  }\n}\n```\n\n**uvx mode**:\n\n```json\n{\n  \"mcpServers\": {\n    \"searxng\": {\n      \"command\": \"uvx\",\n      \"args\": [\"searxng-http-mcp\"],\n      \"env\": { \"SEARXNG_URL\": \"http://YOUR_SEARXNG_HOST:YOUR_SEARXNG_PORT\" }\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary><img src=\"assets/icons/claude.svg\" height=\"16\" alt=\"Claude\"> <b>Claude Code</b></summary>\n\n**Server mode (CLI)**:\n\n```bash\nclaude mcp add --transport http searxng http://YOUR_HOST:YOUR_PORT/mcp/ \\\n  --header \"x-api-key: your-secret-key\"\n```\n\n**Server mode (JSON)** — the same `mcpServers` structure works in a **team-shared** project `.mcp.json` or a **user-wide** global `~/.claude.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"searxng\": {\n      \"type\": \"http\",\n      \"url\": \"http://YOUR_HOST:YOUR_PORT/mcp/\",\n      \"headers\": {\n        \"x-api-key\": \"your-secret-key\"\n      }\n    }\n  }\n}\n```\n\n**Local mode**:\n\n```bash\nclaude mcp add --transport stdio searxng -- docker run --rm -i --memory=512m --cpus=1 ghcr.io/whw23/searxng-http-mcp:latest --stdio\n```\n\n**uvx mode**:\n\n```bash\nclaude mcp add --transport stdio searxng -- uvx searxng-http-mcp\n```\n\n</details>\n\n<details>\n<summary><img src=\"assets/icons/codex.svg\" height=\"16\" alt=\"Codex\"> <b>Codex</b></summary>\n\n**Server mode** — add to `~/.codex/config.toml`:\n\n```toml\n[mcp_servers.searxng]\nurl = \"http://YOUR_HOST:YOUR_PORT/mcp/\"\nhttp_headers = { \"x-api-key\" = \"your-secret-key\" }\n```\n\n**Local mode**:\n\n```toml\n[mcp_servers.searxng]\ncommand = \"docker\"\nargs = [\"run\", \"--rm\", \"-i\", \"--memory=512m\", \"--cpus=1\", \"ghcr.io/whw23/searxng-http-mcp:latest\", \"--stdio\"]\n```\n\n**uvx mode**:\n\n```toml\n[mcp_servers.searxng]\ncommand = \"uvx\"\nargs = [\"searxng-http-mcp\"]\n```\n\n</details>\n\n<details>\n<summary><img src=\"assets/icons/cursor.svg\" height=\"16\" alt=\"Cursor\"> <b>Cursor</b></summary>\n\n**Server mode** — edit `.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"searxng\": {\n      \"url\": \"http://YOUR_HOST:YOUR_PORT/mcp/\",\n      \"headers\": {\n        \"x-api-key\": \"your-secret-key\"\n      }\n    }\n  }\n}\n```\n\n**Local mode**:\n\n```json\n{\n  \"mcpServers\": {\n    \"searxng\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"--rm\", \"-i\", \"--memory=512m\", \"--cpus=1\", \"ghcr.io/whw23/searxng-http-mcp:latest\", \"--stdio\"]\n    }\n  }\n}\n```\n\n**uvx mode**:\n\n```json\n{\n  \"mcpServers\": {\n    \"searxng\": {\n      \"command\": \"uvx\",\n      \"args\": [\"searxng-http-mcp\"],\n      \"env\": { \"SEARXNG_URL\": \"http://YOUR_SEARXNG_HOST:YOUR_SEARXNG_PORT\" }\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary><img src=\"assets/icons/githubcopilot.svg\" height=\"16\" alt=\"Copilot\"> <b>VS Code Copilot</b></summary>\n\n**Server mode** — add to `.vscode/mcp.json`:\n\n```json\n{\n  \"servers\": {\n    \"searxng\": {\n      \"type\": \"http\",\n      \"url\": \"http://YOUR_HOST:YOUR_PORT/mcp/\",\n      \"headers\": {\n        \"x-api-key\": \"your-secret-key\"\n      }\n    }\n  }\n}\n```\n\n**Local mode**:\n\n```json\n{\n  \"servers\": {\n    \"searxng\": {\n      \"type\": \"stdio\",\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"--rm\", \"-i\", \"--memory=512m\", \"--cpus=1\", \"ghcr.io/whw23/searxng-http-mcp:latest\", \"--stdio\"]\n    }\n  }\n}\n```\n\n**uvx mode**:\n\n```json\n{\n  \"servers\": {\n    \"searxng\": {\n      \"type\": \"stdio\",\n      \"command\": \"uvx\",\n      \"args\": [\"searxng-http-mcp\"],\n      \"env\": { \"SEARXNG_URL\": \"http://YOUR_SEARXNG_HOST:YOUR_SEARXNG_PORT\" }\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary><img src=\"assets/icons/windsurf.svg\" height=\"16\" alt=\"Windsurf\"> <b>Windsurf</b></summary>\n\n**Server mode** — add to `~/.codeium/windsurf/mcp_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"searxng\": {\n      \"serverUrl\": \"http://YOUR_HOST:YOUR_PORT/mcp/\",\n      \"headers\": {\n        \"x-api-key\": \"your-secret-key\"\n      }\n    }\n  }\n}\n```\n\n**Local mode**:\n\n```json\n{\n  \"mcpServers\": {\n    \"searxng\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"--rm\", \"-i\", \"--memory=512m\", \"--cpus=1\", \"ghcr.io/whw23/searxng-http-mcp:latest\", \"--stdio\"]\n    }\n  }\n}\n```\n\n**uvx mode**:\n\n```json\n{\n  \"mcpServers\": {\n    \"searxng\": {\n      \"command\": \"uvx\",\n      \"args\": [\"searxng-http-mcp\"],\n      \"env\": { \"SEARXNG_URL\": \"http://YOUR_SEARXNG_HOST:YOUR_SEARXNG_PORT\" }\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary><img src=\"assets/icons/cline.svg\" height=\"16\" alt=\"Cline\"> <b>Cline</b></summary>\n\nConfigure via Cline's MCP settings panel in VS Code (`Cline > MCP Servers > Add`).\n\n**Server mode**:\n\n```json\n{\n  \"mcpServers\": {\n    \"searxng\": {\n      \"type\": \"streamableHttp\",\n      \"url\": \"http://YOUR_HOST:YOUR_PORT/mcp/\",\n      \"headers\": {\n        \"x-api-key\": \"your-secret-key\"\n      }\n    }\n  }\n}\n```\n\n**Local mode**:\n\n```json\n{\n  \"mcpServers\": {\n    \"searxng\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"--rm\", \"-i\", \"--memory=512m\", \"--cpus=1\", \"ghcr.io/whw23/searxng-http-mcp:latest\", \"--stdio\"]\n    }\n  }\n}\n```\n\n**uvx mode**:\n\n```json\n{\n  \"mcpServers\": {\n    \"searxng\": {\n      \"command\": \"uvx\",\n      \"args\": [\"searxng-http-mcp\"],\n      \"env\": { \"SEARXNG_URL\": \"http://YOUR_SEARXNG_HOST:YOUR_SEARXNG_PORT\" }\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary><img src=\"assets/icons/opencode.svg\" height=\"16\" alt=\"OpenCode\"> <b>OpenCode</b></summary>\n\n**Server mode** — edit `opencode.json`:\n\n```json\n{\n  \"mcp\": {\n    \"searxng\": {\n      \"type\": \"remote\",\n      \"url\": \"http://YOUR_HOST:YOUR_PORT/mcp/\",\n      \"headers\": {\n        \"x-api-key\": \"your-secret-key\"\n      }\n    }\n  }\n}\n```\n\n**Local mode**:\n\n```json\n{\n  \"mcp\": {\n    \"searxng\": {\n      \"type\": \"local\",\n      \"command\": [\"docker\", \"run\", \"--rm\", \"-i\", \"--memory=512m\", \"--cpus=1\", \"ghcr.io/whw23/searxng-http-mcp:latest\", \"--stdio\"]\n    }\n  }\n}\n```\n\n**uvx mode**:\n\n```json\n{\n  \"mcp\": {\n    \"searxng\": {\n      \"type\": \"local\",\n      \"command\": [\"uvx\", \"searxng-http-mcp\"]\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary><img src=\"assets/icons/hermes.svg\" height=\"16\" alt=\"Hermes\"> <b>Hermes Agent</b></summary>\n\n**Server mode** — edit `~/.hermes/config.yaml`:\n\n```yaml\nmcp_servers:\n  searxng:\n    url: \"http://YOUR_HOST:YOUR_PORT/mcp/\"\n    headers:\n      x-api-key: \"your-secret-key\"\n```\n\n**Local mode**:\n\n```yaml\nmcp_servers:\n  searxng:\n    command: \"docker\"\n    args: [\"run\", \"--rm\", \"-i\", \"--memory=512m\", \"--cpus=1\", \"ghcr.io/whw23/searxng-http-mcp:latest\", \"--stdio\"]\n```\n\n**uvx mode**:\n\n```yaml\nmcp_servers:\n  searxng:\n    command: \"uvx\"\n    args: [\"searxng-http-mcp\"]\n```\n\n</details>\n\n<details>\n<summary>🟦 <b>ZCode</b> (Zhipu AI · GLM)</summary>\n\n**Server mode** — edit `~/.zcode/cli/config.json` (user-wide) or `.zcode/config.json` (project):\n\n```json\n{\n  \"mcp\": {\n    \"servers\": {\n      \"searxng\": {\n        \"type\": \"http\",\n        \"url\": \"http://YOUR_HOST:YOUR_PORT/mcp/\",\n        \"headers\": {\n          \"x-api-key\": \"your-secret-key\"\n        }\n      }\n    }\n  }\n}\n```\n\n**Local mode**:\n\n```json\n{\n  \"mcp\": {\n    \"servers\": {\n      \"searxng\": {\n        \"command\": \"docker\",\n        \"args\": [\"run\", \"--rm\", \"-i\", \"--memory=512m\", \"--cpus=1\", \"ghcr.io/whw23/searxng-http-mcp:latest\", \"--stdio\"]\n      }\n    }\n  }\n}\n```\n\n**uvx mode**:\n\n```json\n{\n  \"mcp\": {\n    \"servers\": {\n      \"searxng\": {\n        \"command\": \"uvx\",\n        \"args\": [\"searxng-http-mcp\"],\n        \"env\": { \"SEARXNG_URL\": \"http://YOUR_SEARXNG_HOST:YOUR_SEARXNG_PORT\" }\n      }\n    }\n  }\n}\n```\n\nZCode also accepts the standard `mcpServers` structure (e.g. in `.agents/mcp.json`). Alternatively, add servers via `Settings → MCP Servers → New MCP Server`.\n\n</details>\n\n<details>\n<summary>⚡ <b>Kilo Code</b></summary>\n\n**Server mode** — edit `~/.config/kilo/kilo.jsonc` (global) or `.kilo/kilo.jsonc` (project):\n\n```json\n{\n  \"mcp\": {\n    \"searxng\": {\n      \"type\": \"remote\",\n      \"url\": \"http://YOUR_HOST:YOUR_PORT/mcp/\",\n      \"headers\": {\n        \"x-api-key\": \"your-secret-key\"\n      },\n      \"enabled\": true\n    }\n  }\n}\n```\n\n**Local mode**:\n\n```json\n{\n  \"mcp\": {\n    \"searxng\": {\n      \"type\": \"local\",\n      \"command\": [\"docker\", \"run\", \"--rm\", \"-i\", \"--memory=512m\", \"--cpus=1\", \"ghcr.io/whw23/searxng-http-mcp:latest\", \"--stdio\"],\n      \"enabled\": true\n    }\n  }\n}\n```\n\n**uvx mode**:\n\n```json\n{\n  \"mcp\": {\n    \"searxng\": {\n      \"type\": \"local\",\n      \"command\": [\"uvx\", \"searxng-http-mcp\"],\n      \"environment\": { \"SEARXNG_URL\": \"http://YOUR_SEARXNG_HOST:YOUR_SEARXNG_PORT\" },\n      \"enabled\": true\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary>🥧 <b>Pi</b></summary>\n\nInstall the MCP adapter once, then add a standard `mcpServers` block — e.g. in `~/.pi/agent/mcp.json` (all projects) or `.pi/mcp.json` (project):\n\n```bash\npi install npm:pi-mcp-adapter\n```\n\nRestart Pi after installing.\n\n**Server mode**:\n\n```json\n{\n  \"mcpServers\": {\n    \"searxng\": {\n      \"url\": \"http://YOUR_HOST:YOUR_PORT/mcp/\",\n      \"headers\": {\n        \"x-api-key\": \"your-secret-key\"\n      }\n    }\n  }\n}\n```\n\n**Local mode**:\n\n```json\n{\n  \"mcpServers\": {\n    \"searxng\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"--rm\", \"-i\", \"--memory=512m\", \"--cpus=1\", \"ghcr.io/whw23/searxng-http-mcp:latest\", \"--stdio\"]\n    }\n  }\n}\n```\n\n**uvx mode**:\n\n```json\n{\n  \"mcpServers\": {\n    \"searxng\": {\n      \"command\": \"uvx\",\n      \"args\": [\"searxng-http-mcp\"],\n      \"env\": { \"SEARXNG_URL\": \"http://YOUR_SEARXNG_HOST:YOUR_SEARXNG_PORT\" }\n    }\n  }\n}\n```\n\n</details>\n\n---\n\n## 🧩 AI Coding Agent Plugin\n\nCompatible with **Claude Code**, **GitHub Copilot CLI**, and **OpenAI Codex CLI**. Add the marketplace, then install the plugin that fits your setup:\n\n```bash\n/plugin marketplace add whw23/searxng_http_mcp\n```\n\nAll plugins include:\n\n- 🔍 **`/web-search-via-searxng` skill** — search the web with category selection guide and usage rules\n- 🤖 **`web-searcher` agent** — research subagent with:\n  - 🌐 Multi-language parallel search — auto-detects query language, searches in multiple languages for broader coverage\n  - 🛡 Source credibility tiers — Tier 1/2/3 classification with AI poisoning defense\n  - ✅ Cross-validation — key facts require 2+ independent sources\n  - 🔍 WebFetch deep reading — reads full pages from credible sources, not just snippets\n  - 🔄 Multi-round iterative search — up to 3 rounds with automatic deepening on gaps\n  - ⏱ Timeliness evaluation — flags outdated content, states source date ranges\n  - 📝 Footnote-style references — structured output with inline source citations\n\n<details>\n<summary>🐍 <b>Standalone mode</b> — uvx, no Docker, bring your own SearXNG</summary>\n\n<br>\n\n```bash\n/plugin install searxng-http-mcp-standalone@searxng-http-mcp\n```\n\nRuns via `uvx`. Requires Python 3.14+ and an existing SearXNG instance. Set `SEARXNG_URL` in `~/.claude/settings.json`:\n\n```json\n{\n  \"env\": {\n    \"SEARXNG_URL\": \"http://YOUR_SEARXNG_HOST:YOUR_SEARXNG_PORT\"\n  }\n}\n```\n\n</details>\n\n<details>\n<summary>🐳 <b>Local mode</b> — Docker stdio, zero config</summary>\n\n<br>\n\n```bash\n/plugin install searxng-http-mcp@searxng-http-mcp\n```\n\nRuns SearXNG in a local Docker container via stdio. Requires Docker installed.\n\n</details>\n\n<details>\n<summary>🌐 <b>Remote mode</b> — connect to a deployed server via HTTP</summary>\n\n<br>\n\n```bash\n/plugin install searxng-http-mcp-remote@searxng-http-mcp\n```\n\nConnects to a deployed SearXNG MCP server. Requires env vars `SEARXNG_MCP_URL` and `SEARXNG_API_KEY`.\n\nAdd to `~/.claude/settings.json` under the `env` field:\n\n```json\n{\n  \"env\": {\n    \"SEARXNG_MCP_URL\": \"http://YOUR_HOST:YOUR_PORT/mcp/\",\n    \"SEARXNG_API_KEY\": \"your-api-key\"\n  }\n}\n```\n\nThen restart Claude Code.\n\n</details>\n\n---\n\n## 🛠 SearXNG Configuration\n\n<details>\n<summary>🖥 <b>Via Web UI</b></summary>\n\n<br>\n\nAccess the SearXNG Web UI at `http://YOUR_HOST:YOUR_PORT/` to configure search engines, languages, and other settings. Changes persist during the container's lifetime.\n\n</details>\n\n<details>\n<summary>💾 <b>Via Volume Mount</b> — persistent configuration</summary>\n\n<br>\n\nMount the SearXNG config directory for persistent configuration:\n\n```bash\ndocker run -d --name searxng-mcp --restart unless-stopped \\\n  -p YOUR_PORT:8888 --memory=512m --cpus=1 \\\n  -v /path/to/searxng-config:/etc/searxng \\\n  ghcr.io/whw23/searxng-http-mcp:latest\n```\n\nSearXNG generates `settings.yml` on first startup. The container automatically enables JSON format output required by MCP tools.\n\n</details>\n\n---\n\n## 🏗 Build from Source\n\n```bash\ngit clone https://github.com/whw23/searxng_http_mcp.git\ncd searxng_http_mcp\ndocker build -t searxng-http-mcp:local .\ndocker run -d --name searxng-mcp --restart unless-stopped \\\n  -p YOUR_PORT:8888 --memory=512m --cpus=1 \\\n  searxng-http-mcp:local\n```\n\n## 🤝 Contributing\n\nSee **[CONTRIBUTING.md](CONTRIBUTING.md)** for the full workflow, CI requirements, and development setup.\n\n1. 🍴 Fork the repository and enable GitHub Actions in your fork\n2. 🌿 Create a feature branch from `dev`\n3. ✍️ Make your changes\n4. ✅ Run tests: `pytest tests/ -v` — CI must pass in your fork before opening a PR\n5. 📬 Submit a PR to `dev`\n\nDevelopment happens on the `dev` branch. Merges to `main` trigger image builds.\n\n## 📄 License\n\n[MIT](LICENSE) — MCP server code.\n\n[SearXNG](https://github.com/searxng/searxng) itself is licensed under [AGPL-3.0-or-later](https://github.com/searxng/searxng/blob/master/LICENSE).\n",
  "bytes": 32559,
  "sha": "66ac40e3bd1c6d0530623b312800d160985089c1b455e75a8b8ad782480c556c",
  "repo_slug": "whw23/searxng_http_mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_whw23_searxng_http_mcp_d2bd3882/readme"
}