Brian Hetherman 7e260a67a6 Add README
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 00:33:24 -04:00
2026-04-02 00:18:33 -04:00
2026-04-02 00:18:33 -04:00
2026-04-02 00:33:24 -04:00
2026-04-02 00:18:33 -04:00

SearXNG MCP Server

An MCP (Model Context Protocol) server that provides web search via a SearXNG instance.

Setup

python -m venv venv
venv/Scripts/pip install -r requirements.txt   # Windows
# or
venv/bin/pip install -r requirements.txt       # Linux/macOS

Usage

With Claude Code

Add to your .mcp.json or ~/.claude/settings.json:

{
  "mcpServers": {
    "searxng": {
      "command": "/path/to/venv/bin/python",
      "args": ["/path/to/server.py"],
      "env": {
        "SEARXNG_URL": "http://your-searxng-instance:8080"
      }
    }
  }
}

Standalone

SEARXNG_URL=http://your-searxng-instance:8080 python server.py

Configuration

Environment Variable Default Description
SEARXNG_URL http://192.168.50.224:30053 Base URL of your SearXNG instance

Your SearXNG instance must have JSON format enabled in its settings.yml under search.formats.

Search the web using SearXNG.

Parameter Type Required Description
query string yes Search query
categories string no Comma-separated: general, images, news, videos, music, files, it, science, social media
language string no Language code (e.g. en, de, fr)
pageno int no Page number (starting at 1)
time_range string no day, week, month, or year
safesearch int no 0=off, 1=moderate, 2=strict
max_results int no Max results to return (default 10, max 50)

Tests

pip install pytest pytest-asyncio respx
pytest test_server.py -v
Description
No description provided
Readme 28 KiB
Languages
Python 100%