io.github.danchev/searxng
Summary: Use this MCP server to provide AI agents with privacy-friendly web search through a configured SearXNG metasearch instance.
Perform web searches using a required
query.Select specific search engines such as Google, Bing, or DuckDuckGo.
Filter searches by categories like general, images, or news.
Set the search language, defaulting to English.
Control the number of returned results from 1 to 100, defaulting to 10.
Filter results by time range: day, week, month, or year.
Return an error when a search fails instead of an empty result list.
Run locally over stdio or remotely over Streamable HTTP at
/mcp.Configure instance URL, timeout, logging, host/port, custom headers, and Docker deployment.
Provides tools for performing privacy-friendly web searches through a SearXNG instance, with support for categories, engines, language, time range, and result limits.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@io.github.danchev/searxngSearch the web for the latest MCP protocol updates"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SearXNG MCP Server
A Model Context Protocol (MCP) server that equips AI agents with privacy-friendly web search capabilities using the SearXNG metasearch engine.
Features
This server provides the following main features:
Web search via multiple search engines
Supports various search categories (general, images, news, etc.)
Customizable search engine selection
Language filtering
Time range filtering
Control over the number of search results
Related MCP server: SearXNG MCP Server
Available Tools
web_search- Perform web search using SearXNGRequired parameters:
query(string): The search query
Optional parameters:
categories(array): Search categories, e.g. ['general', 'images', 'news']engines(array): Search engines, e.g. ['google', 'bing', 'duckduckgo']language(string): Language code for search, default is "en"max_results(integer): Maximum number of results, default is 10 (1-100)time_range(string): Time range filter ('day', 'week', 'month', 'year')
If a search cannot be completed (the instance is unreachable, rate-limits the request, or returns a malformed response), the tool returns an error result describing the failure rather than an empty result list.
Search Limits
Each server process admits up to eight concurrent searches. Further calls return
an error immediately and can be retried later. --timeout bounds the complete
network operation, including streaming the response; cancellation closes the
active request. Responses are limited to 2 MiB before JSON parsing.
The configured instance must serve /search directly: redirects are rejected.
The client requests Accept-Encoding: identity and rejects compressed responses
to prevent unbounded decompression. Result fields are also truncated to their
existing limits. Missing or non-list results and upstream error objects are
reported as failures, while a valid empty list remains a successful search.
Application logs omit search queries and upstream exception text. The CLI keeps
HTTP dependency logging at WARNING even when --log-level=DEBUG is selected.
Privacy Policy
This software does not operate a hosted search service and does not send search queries to its maintainer. It runs on the user's device or infrastructure and sends each query, selected engines, categories, language, time range, and safe search setting directly to the configured SearXNG instance. Search results are returned to the connected MCP client.
The software does not persist queries or results, use analytics or advertising trackers, create user profiles, or share data with the maintainer. Operational logs record result counts and errors but omit query text and upstream exception details. In-memory request and result data is discarded after the request.
The selected SearXNG instance and the search engines it contacts are independent
third parties. Their collection, use, sharing, and retention practices are
governed by their own privacy policies. Before sending sensitive queries, users
should review the selected instance's privacy notice or operate an instance they
trust. The default CLI instance is https://searx.party; its policy is at
https://searx.party/info/en/privacy.
Privacy questions and requests can be filed at https://github.com/danchev/searXNG/issues.
Command Line Options
Option | Default | Description |
|
| SearXNG instance base URL. Must be absolute and cannot contain credentials, a query string, or a fragment. |
|
| Total search network timeout, in seconds. |
|
| Logging verbosity: |
|
| Transport to serve on: |
|
| Host to bind when |
|
| Port to bind when |
|
| Custom HTTP headers to send with search requests (e.g., |
Docker / Kubernetes
You can run the server easily using the official container image published to the GitHub Container Registry:
docker run -p 8000:8000 ghcr.io/danchev/searxng:latest \
--transport http \
--host 0.0.0.0 \
--instance-url=https://searx.party \
--header "Authorization: Bearer my-secret-token"Transports
By default the server speaks stdio, which is what local MCP clients
(Claude Desktop, IDE integrations, uvx) launch it with.
For remote access, --transport http serves the Streamable HTTP
transport at /mcp:
searxng --transport http --host 127.0.0.1 --port 8000
# endpoint: http://127.0.0.1:8000/mcpThe legacy SSE transport is intentionally not implemented. It was superseded by Streamable HTTP in the 2025-03-26 MCP protocol revision and should not be used for new deployments.
Security: the server performs no authentication, so it binds to
127.0.0.1 by default. Only pass --host 0.0.0.0 on a trusted network,
or put an authenticating reverse proxy in front of it.
Binding to a non-loopback host also disables the MCP SDK's DNS-rebinding
protection, which it can only enable automatically for 127.0.0.1,
localhost, and ::1. On a loopback bind a forged Host header is
rejected with 421 Misdirected Request; on a public bind any Host is
accepted. The server logs a warning at startup when this applies.
Usage Example
Configure as an MCP Service
To set up SearXNG as an MCP server, add one of the following to your MCP configuration file:
UVX setup:
"mcpServers": {
"searxng": {
"command": "uvx",
"args": ["searxng", "--instance-url=https://searx.party"]
}
}Docker setup (Local stdio):
"mcpServers": {
"searxng": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/danchev/searxng:latest",
"--instance-url=https://searx.party"
]
}
}This launches the server over stdio, which is the right choice for a local client.
Remote setup (Streamable HTTP):
Start the server as a long-running process:
searxng --transport http --host 0.0.0.0 --port 8000 \
--instance-url=https://searx.partyThen point the client at its /mcp endpoint:
"mcpServers": {
"searxng": {
"url": "http://your-host:8000/mcp"
}
}Note the --host 0.0.0.0 needed to accept connections from other
machines, and the security caveat above: the server is unauthenticated,
so restrict it to a trusted network or front it with an authenticating
reverse proxy.
Example Invocation
{
"name": "web_search",
"arguments": {
"query": "climate change research",
"categories": ["general"],
"engines": ["google"],
"language": "en",
"max_results": 15,
"time_range": "month"
}
}Debugging
You can use the MCP inspector to debug the server:
npx @modelcontextprotocol/inspector uvx searxngLicense
AGPLv3+ License - see LICENSE for details.
Available Tools
1 toolweb_searchSearXNG Web SearchB
Use SearXNG to search the web for information
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query string | |
| engines | No | Search engines, e.g. ['google', 'bing', 'duckduckgo'] | |
| language | No | Search language code (default 'en') | |
| categories | No | Search categories, e.g. ['general', 'images', 'news'] | |
| time_range | No | Time range filter | |
| max_results | No | Maximum number of results to return (default 10) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description carries the full burden of disclosing behavior. It merely says 'search the web for information,' which minimally implies a read-only retrieval operation, but it does not disclose return format, result structure, rate limits, or any side effects. This is a significant gap for a tool with no annotation support.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single short sentence, making it highly scannable and front-loaded with the action verb 'Use.' However, the phrase 'for information' is somewhat redundant; 'search the web' would suffice, so not every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given six parameters and no output schema, the description should clarify what the tool returns (e.g., search results with URLs and snippets) and any noteworthy behavior. It provides none of that, leaving the agent without enough context to fully understand the tool's response or capabilities beyond parameter names.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, so each parameter (query, engines, language, categories, time_range, max_results) is already documented. The tool description adds no semantic detail beyond the schema, but it doesn't need to since the schema is fully self-descriptive. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('search the web') and the specific tool ('SearXNG'), giving the agent a solid understanding of what the tool does. Although it doesn't distinguish from siblings, no siblings are listed, so this is a clear purpose statement without being a tautology.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies this tool is for web search, but it provides no explicit guidance on when to use it versus alternatives, nor any context about when it would be appropriate. With no sibling tools, the usage context is only implied rather than clearly stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.2- First observed
web_search
TDQS
Scored across 1 tool
With only a single tool, there is no possibility of confusing it with others. The purpose of web_search is clear and unambiguous.
The tool name 'web_search' follows a clear verb_noun convention. With only one tool, there are no inconsistent patterns to worry about.
A single tool for a SearXNG server feels thin, as the engine supports additional features like suggestions or categories. However, for a simple web search wrapper, it is borderline acceptable rather than severely lacking.
The server covers the primary search functionality but omits other SearXNG capabilities such as search suggestions or available engine information. These are minor gaps that do not block the core workflow.
Maintenance
Related MCP Connectors
Provides AI assistants with access to Seltz's powerful Web Search capabilities.
Serper MCP — wraps the Serper Google Search API (serper.dev)
Google, Bing, DuckDuckGo and Google Maps search results, free without an API key.
Web search, news, page retrieval, sitemaps, and trending topics through Search1API.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables privacy-respecting web searches through SearXNG metasearch engine with customizable parameters like language, time range, categories, and engines. Supports safe search levels, pagination control, and basic authentication for secure search operations.12MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to perform privacy-respecting web searches through SearXNG, with support for multiple search engines, categories, and advanced filtering options.26-
- AlicenseAqualityDmaintenanceEnables web search, image search, and news search through a self-hosted SearXNG instance. Provides privacy-focused meta-search capabilities aggregating results from multiple search engines.31MIT
- FlicenseAqualityDmaintenanceEnables privacy-respecting web, image, video, and news searches through SearxNG metasearch engine, with options for URL fetching and time filtering.596 PyPI-