Provides web search capabilities through SearXNG, enabling searches across multiple search engines with category filtering, language selection, time-based filtering, autocomplete suggestions, and access to instance configuration and health monitoring.
SearXNG MCP Server
A Model Context Protocol (MCP) server that integrates with SearXNG, providing powerful web search capabilities to MCP clients like Claude Desktop, Cline, and other MCP-compatible applications.
Features
š Web Search: Search across multiple search engines aggregated by SearXNG
šÆ Category Filtering: Filter by categories (general, images, videos, news, etc.)
š Multi-Engine: Query specific search engines or use them all
š Localization: Search in different languages
ā° Time Filtering: Filter results by time range (day, month, year)
š”ļø Safe Search: Configurable safe search levels
š” Autocomplete: Get search suggestions for query completion
š§ Configuration Access: Query SearXNG instance capabilities
š„ Health Monitoring: Check instance health status
Prerequisites
Python 3.10 or higher
A running SearXNG instance (local or remote)
An MCP client (e.g., Claude Desktop, Cline)
Installation
From Source
Clone the repository:
Install the package:
From PyPI (coming soon)
Configuration
For Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
For Local Instance (Recommended):
For Public Instance:
For Cline (VSCode Extension)
Add to your MCP settings file:
Path: <User Directory>/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json
For Local Instance (Recommended):
For Public Instance:
Environment Variables
SEARXNG_BASE_URL(required): Base URL of your SearXNG instanceExample:
https://search.example.comorhttp://localhost:8888
SEARXNG_VERIFY_SSL(optional): Whether to verify SSL certificatesDefault:
trueSet to
falsefor self-signed certificates or local development
Testing with MCP Inspector
Before using with Claude Desktop or Cline, test your server with the MCP Inspector.
Quick Start
Use the provided convenience scripts:
Windows (Command Prompt):
Windows (PowerShell):
Linux/macOS:
Or run directly:
The Inspector will open in your browser (typically http://localhost:5173) where you can:
Test all tools interactively
View real-time request/response logs
Inspect resources
Debug connection issues
For detailed testing instructions, see Testing with MCP Inspector.
Setting Up SearXNG
If you don't have a SearXNG instance, you can:
Use a Public Instance
Find public instances at: https://searx.space/
Example public instances:
Important Notes:
Public instances may have rate limits or restrictions
Some public instances block automated requests (HTTP 403 errors)
For reliable operation, consider running your own instance
If you encounter 403 errors, try a different public instance or set up a local instance
Run Your Own Instance
Using Docker (recommended):
See the SearXNG documentation for more deployment options.
Available Tools
1. search
Perform web searches across multiple search engines.
Parameters:
query(required): Search query stringcategories(optional): Array of categories (e.g.,["general", "images", "news"])engines(optional): Array of specific engines (e.g.,["google", "bing"])language(optional): Language code (default:"en")page(optional): Page number for pagination (default: 1)time_range(optional): Filter by time ("day", "month", "year")safesearch(optional): Safe search level (0=off, 1=moderate, 2=strict)
Example:
2. get_suggestions
Get autocomplete suggestions for a query prefix.
Parameters:
query(required): Query prefixlanguage(optional): Language code (default:"en")
Example:
3. health_check
Check if the SearXNG instance is accessible and healthy.
Parameters: None
4. get_config
Get the configuration and capabilities of the SearXNG instance.
Parameters: None
Returns information about:
Available search engines
Enabled categories
Supported languages
Active plugins
Instance settings
Available Resources
searxng://config
Access to the SearXNG instance configuration as a persistent resource.
searxng://health
Health status of the SearXNG instance as a persistent resource.
Usage Examples
Example 1: Basic Web Search
Ask your MCP client:
Example 2: Image Search
Ask your MCP client:
The server will use:
Example 3: News Search
Ask your MCP client:
The server will use:
Example 4: Get Search Suggestions
Ask your MCP client:
Search Categories
Available categories in SearXNG:
general- General web searchimages- Image searchvideos- Video searchnews- News articlesmusic- Music searchfiles- File searchsocial media- Social media postsscience- Scientific articlesit- IT/Programming resourcesmap- Maps and locations
Development
Setup Development Environment
Running Tests
Code Formatting
Project Structure
Troubleshooting
Connection Issues
If you encounter connection errors:
Verify the SearXNG URL: Ensure
SEARXNG_BASE_URLis correct and accessibleCheck SSL certificates: For self-signed certificates, set
SEARXNG_VERIFY_SSL=falseTest the instance: Visit the URL in your browser to ensure it's running
Check firewall: Ensure no firewall is blocking the connection
SSL Certificate Errors
For self-signed certificates or local development:
No Results
If searches return no results:
Check instance configuration: Use the
get_configtool to see available enginesVerify engines are enabled: Some instances may have limited engines
Try different categories: Some categories may not be available
Check instance logs: Review SearXNG logs for errors
Contributing
Contributions are welcome! Please follow these steps:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Make your changes
Run tests and linting
Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
SearXNG - The privacy-respecting metasearch engine
Model Context Protocol - The protocol specification
Anthropic - For developing the MCP standard
Related Projects
SearXNG - Privacy-respecting metasearch engine
MCP Specification - MCP protocol documentation
Claude Desktop - Desktop application with MCP support
Support
š Report bugs
š” Request features
š Documentation
Changelog
See CHANGELOG.md for version history and changes.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Integrates with SearXNG metasearch engine to provide powerful web search capabilities across multiple search engines with filtering options for categories, languages, time ranges, and safe search levels. Enables comprehensive web searches, autocomplete suggestions, and search engine configuration access through MCP-compatible applications.