mcp-searxng-enhanced is an enhanced MCP server designed specifically for integration with the SearXNG meta search engine, providing category-aware web search, website scraping, and date-time retrieval functionality. It is designed to integrate seamlessly with modern MCP clients.
Key capabilities include:
- SearXNG-based web search supporting multiple categories: general, images, videos, files, maps, social media. Different categories return customized output, for example the images category returns image URLs, titles, and source pages, the videos category returns video information and embed URLs, the files category returns downloadable file information (format, size), the maps category returns location data (coordinates, address), and the social media category returns posts and profiles.
- Website content scraping with citation metadata, and automatic conversion of Reddit URLs to the old.reddit.com domain to optimize content extraction.
- Preliminary PDF reading support, using PyMuPDF/PyMuPDF4LLM to convert PDFs to Markdown.
- In-memory caching with automatic freshness validation; expired content is automatically refreshed.
- Domain-based rate limiting to prevent excessive requests to the same domain, avoiding service abuse and IP blocking.
- Timezone-aware date-time tools.
- Robust error handling, including custom exception types (MCPServerError, ConfigurationError, SearXNGConnectionError, WebScrapingError, RateLimitExceededError), with error messages passed to the client.
- Supports Dockerized deployment, configurable via environment variables, with configuration persisted across container restarts.
Usage:
- Requires Docker and a running SearXNG instance.
- After building the Docker image, it can be run manually via docker run, with environment variables such as SEARXNG_ENGINE_API_BASE_URL and DESIRED_TIMEZONE set.
- To configure the server in an MCP client (such as Cline in VS Code), environment variables need to be defined in the client settings; the client will use these settings to build the docker run command.
- Supports HTTP server mode (FastMCP), listening by default on 0.0.0.0:8000, MThe CP endpoint is located at /mcp, and CORS is fully open. It can be customized via the environment variables MCP_HTTP_HOST and MCP_HTTP_PORT.
- You can also run it directly with Python without Docker: Python 3.9+ is required (3.11 recommended). Clone the repository, create a virtual environment, install dependencies (pip install -r requirements.txt), set the environment variables, and then run python mcp_server.py (stdio mode) or python mcp_server.py --http (HTTP mode).
- Configuration can be managed via environment variables or the ods_config.json file, with environment variables taking the highest priority. Configuration management uses three layers: script defaults, configuration file, and environment variables.
Tools and aliases:
- The lookup tool is context-sensitive: if the url parameter is provided, it maps to get_website; otherwise it maps to search_web.
- Other tools include search_web, get_website, get_current_datetime, etc.
Use cases:
- MCP clients that need enhanced search and scraping capabilities.
- Applications that need categorized search (such as images, videos, files, etc.).
- Scenarios that need to scrape web page content and extract text.
- Assistants that need date and time queries.
Limitations:
- You need to deploy a SearXNG instance yourself.
- PDF reading is preliminary support.
- Parameters such as rate limits and timeouts can be adjusted, but they need to be configured according to actual conditions.
- HTTP mode is stateless; each POST to /mcp is self-contained. If the client needs session-based transport, stdio mode should be used.
- When using Docker on Linux, you may need to use the host IP address instead of host.docker.internal.
This project is licensed under the MIT License, Copyright © 2025 OvertliDS.