SearXNG HTTP MCP
Self-contained SearXNG metasearch MCP server. One Docker image, 200+ engines, privacy-first.
Ask AI about SearXNG HTTP MCP
Powered by Claude Β· Grounded in docs
I know everything about SearXNG HTTP MCP. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Quick Start Β· Features Β· Architecture Β· Comparison Β· Usage Β· MCP Tools Β· Client Config Β· Plugin Β· Contributing
A self-contained MCP server that wraps SearXNG β a free, privacy-respecting metasearch engine that aggregates results from 200+ search engines.
π Quick Start
Server mode β deploy once, connect from any client:
docker run -d --name searxng-mcp --restart unless-stopped \
-p YOUR_PORT:8888 --memory=512m --cpus=1 \
ghcr.io/whw23/searxng-http-mcp:latest
Then connect your client to http://YOUR_HOST:YOUR_PORT/mcp/. To enable API key auth, see Authentication.
Local mode β no server needed, run directly in your client:
docker run --rm -i --memory=512m --cpus=1 ghcr.io/whw23/searxng-http-mcp:latest --stdio
Add this as a stdio MCP server in your client β see Client Configuration for details.
β¨ Features
Search
- π 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
- π Dual transport β HTTP (Streamable HTTP) and stdio
- π 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
- π§© Claude Code Plugin β self-hosted marketplace
π 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
| Feature | β¨ This project | mcp-searxng | searxng-mcp | searxng-deepdive | exa-mcp-server |
|---|---|---|---|---|---|
| Search | |||||
| 200+ engines via SearXNG | β | β | β | β | β |
| 30+ search categories | β | β | β | β | β |
| Multi-page fanout | β | β | β | β | β |
| Autocomplete suggestions | β | β | β | β | β |
| Engine discovery tool | β | β | β | β | β |
| Dynamic tool descriptions | β | β | β | β | β |
| Infrastructure | |||||
| Self-contained (built-in SearXNG) | β | β | β | β | N/A |
| Zero-install Docker deploy | β | β | β | β | β |
| HTTP + stdio transport | β | β | β | β | β |
| Authentication | β | β | β | β | β |
| Web UI reverse proxy | β | β | β | β | β |
| Claude Code Plugin | β | β | β | β | β |
| General | |||||
| Free & open source | β | β | β | β | β (paid API) |
| Privacy (self-hosted) | β | β | β | β | β |
| Language | Python | Node.js | Python | Node.js | TypeScript |
π Usage
π HTTP Mode (default)
# Without authentication
docker run -d --name searxng-mcp --restart unless-stopped \
-p YOUR_PORT:8888 --memory=512m --cpus=1 \
ghcr.io/whw23/searxng-http-mcp:latest
# With authentication
docker run -d --name searxng-mcp --restart unless-stopped \
-p YOUR_PORT:8888 --memory=512m --cpus=1 \
-e API_KEY=your-secret-key \
ghcr.io/whw23/searxng-http-mcp:latest
| π MCP Endpoint | http://YOUR_HOST:YOUR_PORT/mcp/ |
| π₯ SearXNG Web UI | http://YOUR_HOST:YOUR_PORT/ |
π‘ stdio Mode
docker run --rm -i --memory=512m --cpus=1 \
ghcr.io/whw23/searxng-http-mcp:latest --stdio
No ports exposed. Communication via stdin/stdout. SearXNG runs internally for the MCP tools.
βοΈ Environment Variables
| Variable | Default | Description |
|---|---|---|
API_KEY | (empty, no auth) | API key for authentication |
π Authentication
When API_KEY is set, all requests require one of:
x-api-keyheader β for MCP clients:x-api-key: your-key- HTTP Basic Auth β for browsers
[!TIP] Browser Login: When accessing the Web UI with
API_KEYenabled, the browser will show a login dialog. Leave the username empty and enter your API key as the password.![]()
When API_KEY is not set, all requests are open.
π§ MCP Tools Reference
π search β Search the web using SearXNG
Aggregates results from 200+ search engines with privacy.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | yes | β | The search query to use |
categories | string | no | "" | Comma-separated category names (e.g., general,news,science) |
engines | string | no | "" | Comma-separated engine names (e.g., google,arxiv,wikipedia) |
language | string | no | "" | Search language code (e.g., en, zh, ja) |
time_range | enum | no | null | day, week, month, year |
safesearch | enum | no | 0 | 0=off, 1=moderate, 2=strict |
pageno | int β₯1 | no | 1 | Starting page number |
pages | int 1β5 | no | 1 | Number of pages to fetch in parallel |
max_results | int 1β100 | no | 10 | Maximum number of results to return |
format | enum | no | compact | compact (title/url/content) or full (+ engines/score/category/date) |
Returns: results, answers, suggestions, corrections, infoboxes.
π‘ autocomplete β Get search query suggestions
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | yes | Partial 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.
π Client Configuration
Claude Desktop
Server mode β edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"searxng": {
"url": "http://YOUR_HOST:YOUR_PORT/mcp/",
"headers": {
"x-api-key": "your-secret-key"
}
}
}
}
Local mode:
{
"mcpServers": {
"searxng": {
"command": "docker",
"args": ["run", "--rm", "-i", "--memory=512m", "--cpus=1", "ghcr.io/whw23/searxng-http-mcp:latest", "--stdio"]
}
}
}
Claude Code
Server mode:
claude mcp add --transport http --header "x-api-key: your-secret-key" searxng http://YOUR_HOST:YOUR_PORT/mcp/
Local mode:
claude mcp add --transport stdio searxng -- docker run --rm -i --memory=512m --cpus=1 ghcr.io/whw23/searxng-http-mcp:latest --stdio
Codex
Server mode β add to ~/.codex/config.toml:
[mcp_servers.searxng]
url = "http://YOUR_HOST:YOUR_PORT/mcp/"
http_headers = { "x-api-key" = "your-secret-key" }
Local mode:
[mcp_servers.searxng]
command = "docker"
args = ["run", "--rm", "-i", "--memory=512m", "--cpus=1", "ghcr.io/whw23/searxng-http-mcp:latest", "--stdio"]
Cursor
Server mode β edit .cursor/mcp.json:
{
"mcpServers": {
"searxng": {
"url": "http://YOUR_HOST:YOUR_PORT/mcp/",
"headers": {
"x-api-key": "your-secret-key"
}
}
}
}
Local mode:
{
"mcpServers": {
"searxng": {
"command": "docker",
"args": ["run", "--rm", "-i", "--memory=512m", "--cpus=1", "ghcr.io/whw23/searxng-http-mcp:latest", "--stdio"]
}
}
}
VS Code Copilot
Server mode β add to .vscode/mcp.json:
{
"servers": {
"searxng": {
"type": "http",
"url": "http://YOUR_HOST:YOUR_PORT/mcp/",
"headers": {
"x-api-key": "your-secret-key"
}
}
}
}
Local mode:
{
"servers": {
"searxng": {
"type": "stdio",
"command": "docker",
"args": ["run", "--rm", "-i", "--memory=512m", "--cpus=1", "ghcr.io/whw23/searxng-http-mcp:latest", "--stdio"]
}
}
}
Windsurf
Server mode β add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"searxng": {
"serverUrl": "http://YOUR_HOST:YOUR_PORT/mcp/",
"headers": {
"x-api-key": "your-secret-key"
}
}
}
}
Local mode:
{
"mcpServers": {
"searxng": {
"command": "docker",
"args": ["run", "--rm", "-i", "--memory=512m", "--cpus=1", "ghcr.io/whw23/searxng-http-mcp:latest", "--stdio"]
}
}
}
Cline
Configure via Cline's MCP settings panel in VS Code (Cline > MCP Servers > Add).
Server mode:
{
"mcpServers": {
"searxng": {
"url": "http://YOUR_HOST:YOUR_PORT/mcp/",
"headers": {
"x-api-key": "your-secret-key"
}
}
}
}
Local mode:
{
"mcpServers": {
"searxng": {
"command": "docker",
"args": ["run", "--rm", "-i", "--memory=512m", "--cpus=1", "ghcr.io/whw23/searxng-http-mcp:latest", "--stdio"]
}
}
}
OpenCode
Server mode β edit opencode.json:
{
"mcp": {
"searxng": {
"type": "remote",
"url": "http://YOUR_HOST:YOUR_PORT/mcp/",
"headers": {
"x-api-key": "your-secret-key"
}
}
}
}
Local mode:
{
"mcp": {
"searxng": {
"type": "local",
"command": ["docker", "run", "--rm", "-i", "--memory=512m", "--cpus=1", "ghcr.io/whw23/searxng-http-mcp:latest", "--stdio"]
}
}
}
Hermes Agent
Server mode β edit ~/.hermes/config.yaml:
mcp_servers:
searxng:
url: "http://YOUR_HOST:YOUR_PORT/mcp/"
headers:
x-api-key: "your-secret-key"
Local mode:
mcp_servers:
searxng:
command: "docker"
args: ["run", "--rm", "-i", "--memory=512m", "--cpus=1", "ghcr.io/whw23/searxng-http-mcp:latest", "--stdio"]
π§© Claude Code Plugin
Add the marketplace, then install the plugin that fits your setup:
/plugin marketplace add whw23/searxng_http_mcp
Both plugins include the π /web-search-via-searxng skill for web search.
π³ 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.
π SearXNG Configuration
π₯ Via Web UI
Access 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.
πΎ Via Volume Mount β persistent configuration
Mount the SearXNG config directory for persistent configuration:
docker run -d --name searxng-mcp --restart unless-stopped \
-p YOUR_PORT:8888 --memory=512m --cpus=1 \
-v /path/to/searxng-config:/etc/searxng \
ghcr.io/whw23/searxng-http-mcp:latest
SearXNG generates settings.yml on first startup. The container automatically enables JSON format output required by MCP tools.
π 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
- π΄ Fork the repository
- πΏ Create a feature branch from
dev - βοΈ Make your changes
- β
Run tests:
pytest tests/ -v - π¬ 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.
