- Home
- MCP servers
- SearXNG
SearXNG
- python
7
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.
You can run an SSE-based MCP server that connects to a local or remote SearXNG meta-search engine to empower an AI Agent with external web search capabilities. This server lets you query SearXNG and extract web pages into Markdown text for processing, while keeping the MCP client separate from the server runtime for flexible, cloud-native usage.
How to use
You use an MCP client to connect to the SSE-based MCP server and perform search and read operations via tools exposed by the server. The standard workflow starts the SearXNG service, then runs the MCP server, and finally uses the MCP Inspector to verify that you can connect, list available tools, and execute those tools.
Steps to perform with the MCP Inspector:
- Start the MCP Inspector and ensure the proxy is up. 2. Connect to the MCP server using the SSE transport. 3. Open the Tools tab and list available tools. 4. Run the web_search tool with your query to fetch results. 5. Run the web_url_read tool with a URL to retrieve and format a page.
How to install
Prerequisites you need before you begin:
- uv (for Python-based runtime) - Docker (optional for testing SearXNG) - Node.js (for MCP Inspector and tooling)
Install uv on Ubuntu 24.04 and set up the environment, then install the project source and prepare the local SearXNG instance for testing.
curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/erhwenkuo/mcp-searxng.git
cd mcp-searxng
uv sync
Additional sections
Running the SearXNG service is provided in a pre-configured, test-friendly setup. It uses Docker to map the SearXNG UI to port 8888 locally, enabling you to verify search results through a single, repeatable environment.
Starting the MCP-SEARXNG service can be done in two ways: via uv for a direct Python-based run or via Docker for containerized execution.
To run SearXNG with Docker, switch to the searxng-docker directory and start the service. The test SearXNG service is mapped to port 8888 on the host.
When running the MCP server with uv, pass the SearXNG URL you will connect to, for example: uv run server.py --searxng_url="http://localhost:8888". In a Docker-based setup you pass the URL via the SEARXNG_URL environment variable.
Verification steps include installing Node.js, starting the MCP Inspector, and connecting to the MCP server using the SSE transport. You will see the list of available tools and can run web_search and web_url_read to exercise basic functionality.
Security and usage notes: keep the MCP server accessible to your MCP client while ensuring you run it in a controlled environment. If you deploy in a cloud or multi-node setup, ensure the SearXNG instance is reachable from the MCP server host.
Available tools
web_search
Performs a web search against the connected SearXNG meta-search engine and returns results suitable for processing by the MCP client.
web_url_read
Fetches and returns the content of a provided URL, extracting and formatting the page into Markdown-formatted text for downstream use.