- Home
- MCP servers
- SearxNG
SearxNG
- python
8
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.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"sacode-searxng-simple-mcp": {
"command": "pipx",
"args": [
"run",
"searxng-simple-mcp@latest"
],
"env": {
"TRANSPORT_PROTOCOL": "stdio",
"SEARXNG_MCP_TIMEOUT": "10",
"SEARXNG_MCP_LOG_LEVEL": "ERROR",
"SEARXNG_MCP_SEARXNG_URL": "https://your-instance.example.com",
"SEARXNG_MCP_DEFAULT_FORMAT": "text",
"SEARXNG_MCP_DEFAULT_LANGUAGE": "en",
"SEARXNG_MCP_DEFAULT_RESULT_COUNT": "10"
}
}
}
}You run a small MCP server that lets Large Language Models search the web privately via SearxNG. It’s designed to be lightweight and easy to integrate with MCP-compatible clients, so you can add web search capabilities to your AI workflows without exposing user data.
How to use
You connect to the MCP server from your MCP client by using one of the supported runtime methods. The server runs locally (stdio transport) or can be accessed via an HTTP-based transport if you choose the SSE path in a different setup. For typical uses, start the server through the recommended runtime (pipx, uvx, Python module, or Docker) and point your client to the local endpoint or the configured URL. The MCP client will send search queries and receive structured results optimized for model consumption.
How to install
Prerequisites you need before starting:
-
Python 3.10 or higher
-
A SearxNG instance (public or self-hosted)
Using pipx run (Recommended, no installation required)
{
"mcpServers": {
"searxng": {
"command": "pipx",
"args": [
"run", "searxng-simple-mcp@latest"
],
"env": {
"SEARXNG_MCP_SEARXNG_URL": "https://your-instance.example.com"
}
}
}
}
Using uvx run (No installation required)
{
"mcpServers": {
"searxng": {
"command": "uvx",
"args": [
"run", "searxng-simple-mcp@latest"
],
"env": {
"SEARXNG_MCP_SEARXNG_URL": "https://your-instance.example.com"
}
}
}
}
Using Python with pip (requires installation)
{
"mcpServers": {
"searxng": {
"command": "python",
"args": ["-m", "searxng_simple_mcp.server"],
"env": {
"SEARXNG_MCP_SEARXNG_URL": "https://your-instance.example.com"
}
}
}
}
Using with Docker (No installation required)
{
"mcpServers": {
"searxng": {
"command": "docker",
"args": [
"run", "--rm", "-i", "--network=host",
"-e", "SEARXNG_MCP_SEARXNG_URL=http://localhost:8080",
"ghcr.io/sacode/searxng-simple-mcp:latest"
]
}
}
}
Notes about Docker usage
When using Docker with MCP servers, pass environment variables directly with -e within the args array, since the env object may not propagate automatically to the container.
Transport protocols
The MCP server supports STDIO (default) for CLI-style integrations and SSE for HTTP-based clients. STDIO is suitable for Claude Desktop and similar MCP-compatible clients, while SSE starts an HTTP server for web-based interactions. Not all applications support SSE, so verify compatibility before using it.
Configuration
Configure the server using environment variables. The following options are available:
-
SEARXNG_MCP_SEARXNG_URL: URL of the SearxNG instance to use • Default: https://paulgo.io/
-
SEARXNG_MCP_TIMEOUT: HTTP request timeout in seconds • Default: 10
-
SEARXNG_MCP_DEFAULT_RESULT_COUNT: Default number of results to return • Default: 10
-
SEARXNG_MCP_DEFAULT_LANGUAGE: Language code for results (e.g., 'en', 'ru', 'all') • Default: all
-
SEARXNG_MCP_DEFAULT_FORMAT: Default format for results ('text', 'json') • Default: text
-
SEARXNG_MCP_LOG_LEVEL: Logging level (e.g., 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL') • Default: ERROR
-
TRANSPORT_PROTOCOL: Transport protocol ('stdio' or 'sse') • Default: stdio
Security and notes
Increase log levels with care; DEBUG/INFO may produce excessive output and interfere with some MCP clients.
Troubleshooting
If you cannot reach your SearxNG instance, verify SEARXNG_MCP_SEARXNG_URL is correct and reachable from the running MCP server. For Docker setups, ensure network access matches your host configuration and, if needed, use --network=host to connect to a host-bound SearxNG service.
Development
To test locally, install dependencies and run the server module directly. Use the appropriate transport depending on your client.
Publishing to PyPI
Package maintainers can publish new versions following the standard Python packaging workflow. Ensure dependencies are installed and use the usual publishing tools.