searxng-mcp
Provides privacy-focused web search capabilities through SearXNG, supporting categories, language filters, time ranges, and HTTP Basic Auth.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
SearXNG MCP Server
A Model Context Protocol (MCP) server that provides privacy-focused web search capabilities through SearXNG, using Streamable HTTP transport.
Features
Privacy-Focused Search: Leverages SearXNG for anonymous, tracker-free web searches
Streamable HTTP Transport: Modern HTTP-based MCP protocol for remote access
Environment Variables: All configuration via environment variables
HTTP Basic Auth: Support for authentication-protected SearXNG instances
Advanced Search Parameters: Support for categories, language filters, and time ranges
Async Architecture: Built with async/await for non-blocking operations
Related MCP server: MCP Server SearXNG
Installation
# Clone the repository
git clone <repo-url>
cd searxng-mcp
# Install dependencies
pip install -e .
# Or using uv
uv pip install -e .Configuration
All configuration is done via environment variables:
Variable | Description | Default |
| Base URL of your SearXNG instance |
|
| Username for HTTP Basic Auth (optional) | - |
| Password for HTTP Basic Auth (optional) | - |
| Request timeout in seconds |
|
| Maximum results allowed per query |
|
| Server host address |
|
| Server port |
|
| Base URL path for the MCP server |
|
| Logging verbosity |
|
Using Environment File
Create a searxng.env file from the example:
cp searxng.env.example searxng.envEdit searxng.env with your settings:
# SearXNG Configuration
SEARXNG_BASE_URL=https://example.com/searxng
SEARXNG_USERNAME=your_username
SEARXNG_PASSWORD=your_password
SEARXNG_TIMEOUT=10
MAX_RESULTS_LIMIT=50
# Server Configuration
HOST=0.0.0.0
PORT=3000
BASE_URL=/searxng-mcp
# Logging
LOG_LEVEL=INFORunning
Using Python (with env file)
# Load from searxng.env file and run
export $(grep -v '^#' searxng.env | xargs) && python -m searxng_mcpUsing CLI
# With environment variables inline
SEARXNG_BASE_URL=https://example.com/searxng \
SEARXNG_USERNAME=your_username \
SEARXNG_PASSWORD=your_password \
searxng-mcpUsing Docker
Build the image:
docker build -t searxng-mcp .Run with environment file:
docker run -d \
--name searxng-mcp \
--env-file searxng.env \
-p 127.0.0.1:3000:3000 \
searxng-mcpRun with inline environment variables:
docker run -d \
--name searxng-mcp \
-e SEARXNG_BASE_URL=https://example.com/searxng \
-e SEARXNG_USERNAME=your_username \
-e SEARXNG_PASSWORD=your_password \
-e HOST=0.0.0.0 \
-e PORT=3000 \
-p 127.0.0.1:3000:3000 \
searxng-mcpSearXNG Instance
You need a running SearXNG instance. Options:
Local:
docker run -d --name searxng -p 8888:8080 searxng/searxng:latestRemote: Use any public or private SearXNG instance
If your SearXNG instance is protected with HTTP Basic Auth, set SEARXNG_USERNAME and SEARXNG_PASSWORD.
MCP Client Configuration
Configure your MCP client to connect to this server:
{
"mcpServers": {
"searxng": {
"type": "streamable-http",
"url": "http://localhost:3000"
}
}
}If using a reverse proxy:
{
"mcpServers": {
"searxng": {
"type": "streamable-http",
"url": "http://your-server/searxng-mcp"
}
}
}Usage
Once connected, use the web_search tool:
Basic Search
Search for "Python async programming tutorials"Search with Maximum Results
Search for "machine learning news" with max_results=20Category-Specific Search
Available categories:
general- General web searchnews- News articlesimages- Image searchvideos- Video contentfiles- File downloadsscience- Scientific papers and resourcesit- IT and tech resources
Language-Specific Search
Use ISO 639-1 language codes: en, de, fr, es, zh, ja, etc.
Time-Range Filtered Search
Available time ranges: day, week, month, year
Using with Reverse Proxy
For production deployment with a custom base URL, use a reverse proxy:
Nginx Example
location /searxng-mcp/ {
proxy_pass http://127.0.0.1:3000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}License
MIT License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for Google search results via SERP API
Serper MCP — wraps the Serper Google Search API (serper.dev)
Web search API and MCP server for developers building AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA privacy-friendly web search MCP server using SearXNG, enabling searches across multiple engines and categories.1MIT
- AlicenseAqualityCmaintenanceMCP server for SearXNG meta search engine with enhanced error handling and parameter validation for AI agents. Enables privacy-focused web searches with structured JSON results and advanced filtering.161 npm2MIT
- AlicenseAqualityDmaintenanceA privacy-focused web search and content extraction MCP server. It integrates SearxNG with fallback to Google scraping, featuring relevance ranking, security-aware search, and rate limiting.3MIT
- AlicenseNot gradedqualityDmaintenanceFree web search MCP server using SearXNG, supporting web search, news search, and search summaries.MIT