- Home
- MCP servers
- SearXNG
SearXNG
- python
2
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can run a privacy‑focused MCP server that lets Claude access web search results through a self‑hosted SearXNG metasearch engine. It aggregates results from multiple engines, supports web, image, video, and news searches, and runs locally with a lightweight toolset for fast, private queries.
How to use
You interact with the MCP server via an MCP client. The server exposes a web search capability at a local address and a local runtime command to start the MCP endpoint that Claude will talk to. Use the client to configure and request search tasks, such as quick web, image, or in‑depth research queries.
How to install
Prerequisites you need before starting:
-
Python 3.10 or higher
-
Docker and Docker Compose
-
Git
Follow these steps to install and run the MCP server and its SearXNG frontend.
Step 1 — Prepare the SearXNG backend
- Clone the SearXNG MCP repository and enter its directory.
git clone https://github.com/netixc/SearxngMCP.git
cd SearxngMCP
Step 2 — Configure SearXNG
Edit the configuration files to reflect your server setup. Set your server IP address where indicated, and generate a secret key that will be used for securing the setup.
# Replace YOUR_IP with your server's IP
# Replace CHANGE_THIS_SECRET_KEY with a secret key
# Edit docker-compose.yml accordingly
# Edit searxng/settings.yml to use the same secret key
# Edit searxng-config/config.json to point to YOUR_IP
Generate a secret key and apply it to both files:
openssl rand -hex 32
Step 3 — Start SearXNG
Launch the SearXNG instance with Docker Compose.
docker compose up -d
Step 4 — Verify SearXNG is running
Confirm the service is reachable on the configured address.
curl http://YOUR_IP:8080
Step 5 — Install the MCP server runtime
Create and activate the Python runtime and install the MCP server package in development mode.
# Create virtual environment and activate
uv venv
source .venv/bin/activate # Linux/macOS
# Install MCP in editable/development mode
uv pip install -e ".[dev]"
Step 6 — Verify MCP server is ready
Check that the MCP server can be reached locally.
curl http://YOUR_IP:8080
Step 7 — Connect the MCP client
Configure your MCP client to point to the SearXNG MCP server. The client needs the runtime start command for the MCP integration.
# Example MCP client configuration (path and exact command may vary by client)
{
"mcpServers": {
"searxng": {
"command": "/absolute/path/to/SearxngMCP/run-server.sh"
}
}
}
Step 8 — Start the MCP server (runtime)
Start the MCP runtime so Claude can access the SearXNG capabilities.
docker-compose up -d
Notes on security and access
Keep the SearXNG instance on a private network or VPN if you intend to expose it externally. Use firewall rules and the secret key to limit access. The MCP runtime should run in a controlled environment separate from public services.
Configuration and notes
MCP client configuration uses the URL of the SearXNG service and a timeout value to manage requests.
{
"searxng": {
"url": "http://YOUR_IP:8080",
"timeout": 10
},
"logging": {
"level": "INFO",
"format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s",
"file": null
}
}
Helpful tips
The MCP server provides three specialized tools to perform searches efficiently and privately. Use the dedicated tool interfaces to perform web, image/video, and deep research tasks without exposing your queries to external trackers.
Troubleshooting
If the SearXNG frontend does not respond, verify that Docker containers are running and that the IP/port configurations match your network. Check logs for searxng and the MCP service to identify issues with startup or connectivity.
Example configuration references
MCP client setup for local runtime and an HTTP endpoint are shown below. Use the exact file paths and commands you use in your environment.
Closing notes
This MCP server integrates SearXNG’s multi‑engine metasearch with Claude to provide fast, private search across web, images, videos, and news, with a streamlined setup that emphasizes minimal tooling and robust privacy.
Available tools
search
Perform quick web or news searches with optional engine selection and result limit.
search_media
Find images or videos by query, with optional engine filtering and max results.
research_topic
Multi‑source research tool that aggregates multiple searches, deduplicates results, and synthesizes a briefing.