searchLABSCO SUMMARY
Search where you own both ends of the query.
The trade against a hosted search API is clear: you run a SearXNG container, and in exchange there is no search vendor between the agent and the results, no key to rotate, and no per-query quota. The parameter list is close to SearXNG's own, so anything you already know about tuning your instance carries over. The instance has to be reachable from wherever this server runs — the default points at a Docker bridge address, which is worth checking first.
What it is
A search server that points at a SearXNG instance you run. Nothing goes through a commercial search API — the results come from whichever engines your instance is configured to use.
What you get
- A search tool taking a query string q, with everything else optional
- Categories and engines narrow which sources answer, and enabled_engines and disabled_engines override the instance defaults per call
- Language, time_range across day, month or year, and page for walking further into results
- Safesearch, image_proxy, autocomplete and theme are all passed through, so the instance's behaviour is tunable from the call
- SSE and stdio transports, selected with TRANSPORT — SSE serves at /sse on the configured port
Requirements
Python 3.9 or higher and a running SearXNG instance, which the README shows starting as a Docker container. SEARXNG_BASE_URL points at it; HOST, PORT and TRANSPORT configure the server itself. A Docker image can be built from the repository.
Setup effort
Build from source — git clone https://github.com/The-AI-Workshops/searxng-mcp-server.git
USE CASES
Giving an agent web search without a search vendor
Results come from your own instance's engines rather than a hosted API.
Restricting a search to recent results
A time range of day, month or year without rewriting the query.
Steering which sources answer
Categories and engine lists are per-call, so one instance serves several kinds of question.
Running it inside an existing container setup
SSE transport on a bound port, which is what n8n and similar hosts need.
1 tool
Listed in project docs. Your client may show a different list.
BEFORE YOU INSTALL
What to know first
Tools you get
1 tool named in the project's documentation.
Requires
- Python 3.9+
- A running SearXNG instance (the README starts one on port 32768 with the searxng/searxng Docker image)
- Docker, for SearXNG and the Docker setup
Where it runs
All 5 documented setups run the server on your machine.
INSTALLATION
Connect your client
Server setup
git clone https://github.com/The-AI-Workshops/searxng-mcp-server.git
cd searxng-mcp-server
pip install -r requirements.txtEdit .env in the clone so SEARXNG_BASE_URL points at your SearXNG instance
For the SSE setups, start the server (TRANSPORT defaults to sse, on port 32769):
python server.pyMCP Clients
Any MCP client — SSE
{
"mcpServers": {
"searxng": {
"type": "sse",
"url": "http://localhost:32769/sse"
}
}
}Start the server with python server.py (SSE transport) first; the address is http://localhost:32769/sse.
Windsurf — SSE
{
"mcpServers": {
"searxng": {
"serverUrl": "http://localhost:32769/sse"
}
}
}Start the server with python server.py (SSE transport) first; the address is http://localhost:32769/sse.
Claude Desktop — stdio, Windsurf — stdio
{
"mcpServers": {
"searxng": {
"command": "python",
"args": [
"<YOUR_PATH_TO_SEARXNG_MCP_SERVER>/server.py"
],
"env": {
"TRANSPORT": "stdio",
"SEARXNG_BASE_URL": "http://localhost:32768",
"HOST": "0.0.0.0",
"PORT": "32769"
}
}
}
}<YOUR_PATH_TO_SEARXNG_MCP_SERVER> is the absolute path to your clone, and SEARXNG_BASE_URL is your SearXNG address.
Docker
{
"mcpServers": {
"searxng": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"TRANSPORT",
"-e",
"SEARXNG_BASE_URL",
"-e",
"HOST",
"-e",
"PORT",
"mcp/searxng-mcp"
],
"env": {
"TRANSPORT": "stdio",
"SEARXNG_BASE_URL": "http://localhost:32768",
"HOST": "0.0.0.0",
"PORT": "32769"
}
}
}
}Build the image first from your clone: docker build -t mcp/searxng-mcp . Inside the container localhost is the container itself, so set SEARXNG_BASE_URL to an address the container can reach, such as the project's default http://172.17.0.1:32768.