# searxng-mcp

Connects a SearXNG meta-search instance to AI assistants via MCP. Delivers aggregated web results across search engines directly to coding agents.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 14
- Author: aicrafted
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/aicrafted/searxng-mcp
- Updated: 2026-05-16
- HTML: https://affpapa.org/en/nevibecode/mcp/searxng-mcp

## What it does

The server exposes a `web_search` tool so that coding assistants can retrieve aggregated answers across numerous providers. It routes queries through your SearXNG setup, gathering links from Google, DuckDuckGo, Brave, GitHub, StackOverflow, or ArXiv. Inquiries can target specific categories such as `news`, `science`, or `it`.

Running from source requires Python 3.10 and an active SearXNG endpoint. It handles `stdio`, stateless `http`, and `sse` communication modes. The prebuilt Docker container on GitHub Container Registry simplifies deployment alongside Docker Compose, configured via the `SEARXNG_URL` variable.

Without enabling `json` inside `search.formats` within SearXNG's `settings.yml`, the server cannot read any search responses. When exposing HTTP or SSE endpoints across custom domains, specify `MCP_ALLOWED_HOSTS` and `MCP_ALLOWED_ORIGINS` to satisfy SDK DNS rebinding verification checks.

## Requirements
- Needs: Docker
- Environment variables: `SEARXNG_URL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env SEARXNG_URL=<SEARXNG_URL> --transport stdio searxng-mcp -- docker run -i --rm -e SEARXNG_URL ghcr.io/aicrafted/searxng-mcp:latest
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add searxng-mcp --env SEARXNG_URL=<SEARXNG_URL> -- docker run -i --rm -e SEARXNG_URL ghcr.io/aicrafted/searxng-mcp:latest
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "searxng-mcp": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "-e",
                "SEARXNG_URL",
                "ghcr.io/aicrafted/searxng-mcp:latest"
            ],
            "env": {
                "SEARXNG_URL": "<SEARXNG_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "searxng-mcp": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "-e",
                "SEARXNG_URL",
                "ghcr.io/aicrafted/searxng-mcp:latest"
            ],
            "env": {
                "SEARXNG_URL": "<SEARXNG_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e SEARXNG_URL=<SEARXNG_URL> searxng-mcp docker run -i --rm -e SEARXNG_URL ghcr.io/aicrafted/searxng-mcp:latest
```
Replace <…> with your own values

## When to use it
- gather technical answers across GitHub, StackOverflow, and PyPI simultaneously
- search the web without relying on proprietary search API keys
- filter query results by content categories such as science or news
- aggregate search outputs from multiple providers into structured agent context

## Example prompts
- Search via SearXNG for issues related to MCP DNS rebinding
- Query the it category for Docker compose examples running SearXNG
- Find recent ArXiv papers discussing large context windows

## Similar
- [searxng-search](https://affpapa.org/en/nevibecode/skills/searxng-search.md) — skill · 828 installs
- [SearXNG HTTP MCP](https://affpapa.org/en/nevibecode/mcp/searxng-http-mcp.md) — MCP server · ★ 12
- [searxng](https://affpapa.org/en/nevibecode/skills/searxng.md) — skill · ★ 79
- [SearXNG Search](https://affpapa.org/en/nevibecode/mcp/searxng-search.md) — MCP server · ★ 1331
- [Web Search](https://affpapa.org/en/nevibecode/mcp/hec-ovi-web-search.md) — MCP server · ★ 8
- [searxNcrawl](https://affpapa.org/en/nevibecode/mcp/searxncrawl.md) — MCP server · ★ 182

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
