clintgeek/searxng-mcp-server
If you are the rightful owner of searxng-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The SearXNG MCP Server is a privacy-focused web search solution that leverages the SearXNG metasearch engine to provide a secure and efficient search experience through the Model Context Protocol.
SearXNG MCP Server
Privacy-focused web search for Model Context Protocol using SearXNG metasearch engine.
Features
- 🔒 Privacy-focused - No tracking, self-hosted search
- 🌐 Meta-search - Aggregates 70+ search engines
- 🚀 Fast & lightweight - Minimal dependencies
- 🎯 Flexible filtering - Categories, languages, time ranges
- 🔑 No API keys - Works with your own SearXNG instance
- ⚡ MCP native - Built for Model Context Protocol
Quick Start
1. Install SearXNG
Using Docker (recommended):
docker run -d -p 8888:8080 searxng/searxng
Or see SearXNG installation docs for other methods.
2. Install the MCP Server
npm install -g @fussymonkey-dev/searxng-mcp-server
3. Configure Your MCP Client
Add to your MCP settings (e.g., Claude Desktop, Cline, etc.):
{
"mcpServers": {
"searxng": {
"command": "searxng-mcp-server",
"env": {
"SEARXNG_URL": "http://localhost:8888"
}
}
}
}
Configuration
Environment variables:
| Variable | Description | Default |
|---|---|---|
SEARXNG_URL | SearXNG instance URL | http://localhost:8888 |
SEARXNG_MAX_RESULTS | Max results per search (1-50) | 10 |
SEARXNG_TIMEOUT | Request timeout (ms) | 30000 |
SEARXNG_CATEGORIES | Default categories (comma-separated) | general |
SEARXNG_SAFESEARCH | Safe search level (0-2) | 0 |
Usage
The server provides one tool:
search_web
Search the web using SearXNG.
Parameters:
query(required) - Search querymax_results(optional) - Number of results (1-50)categories(optional) - Array of categories:general,news,images,videos,files,music,science,social_medialanguage(optional) - Language code (e.g.,en,es,fr)time_range(optional) - Filter by time:day,week,month,year
Example:
Search for "machine learning tutorials" with news from the past week
Docker Compose Setup
See for a complete setup with SearXNG and the MCP server.
Development
# Clone the repo
git clone https://github.com/fussymonkey-dev/searxng-mcp-server
cd searxng-mcp-server
# Install dependencies
npm install
# Set up environment
cp .env.example .env
# Run locally
npm start
# Run tests
npm test
Troubleshooting
Connection errors?
- Verify SearXNG is running:
curl http://localhost:8888 - Check
SEARXNG_URLenvironment variable - Run health check:
npm run health-check
Timeout errors?
- Increase
SEARXNG_TIMEOUT - Check SearXNG instance performance
- Reduce
max_results
Empty results?
- Try different search categories
- Check SearXNG engine configuration
- Verify engines are enabled in SearXNG settings
Contributing
Contributions welcome! Please:
- Fork the repo
- Create a feature branch
- Keep code clean, DRY, and KISS
- Submit a PR
License
MIT - See
Credits
Created by FussyMonkey.dev
Built with:
- SearXNG - Privacy-respecting metasearch engine
- Model Context Protocol SDK - MCP TypeScript SDK
Questions or issues? Open an issue on GitHub