
About 一個用來讓 AI Agent 可透過 SearXNG 服務來搜尋外部網站內容與資訊的 MCP server 。
概览
An example of an MCP Server for use by an AI Agent, designed to allow the AI Agent to search for new external information through SearXNG's open-source meta-search engine. Currently, many search engines other than Google have emerged in the market, attempting to capture market share in areas where Google falls short. For instance, DuckDuckGo emphasizes not tracking users, Ecosia plants trees with every search, and Brave Search aims to harness collective efforts to build a free search engine. However, the results returned by these engines are often unsatisfactory. Firstly, they don’t crawl as many web pages as Google does; secondly, their support for Chinese is poor. Although they can access some interesting pages that Google doesn’t display, search engines other than Google are still quite difficult to use. So why not combine the results from multiple search engines!? That’s exactly what a meta-search engine does.
README
以下为原文 README 节选,完整内容请查看原文。
mcp-searxng
An example of an MCP Server for use by an AI Agent, designed to allow the AI Agent to search for new external information through SearXNG’s open-source meta-search engine.
Currently, many search engines other than Google have emerged in the market, attempting to capture market share in areas where Google falls short. For instance, DuckDuckGo emphasizes not tracking users, Ecosia plants trees with every search, and Brave Search aims to harness collective efforts to build a free search engine.
However, the results returned by these engines are often unsatisfactory. Firstly, they don’t crawl as many web pages as Google does; secondly, their support for Chinese is poor. Although they can access some interesting pages that Google doesn’t display, search engines other than Google are still quite difficult to use.
So why not combine the results from multiple search engines!? That’s exactly what a meta-search engine does. SearXNG, an open-source meta-search engine software, can be self-hosted or used via sites provided by enthusiastic community members. For businesses, SearXNG offers a way to maintain privacy and security control while enabling AI Agents to effectively search for the external data they need.
References:
- SearXNG Official Website
- Self-Hosting an Open-Source SearXNG Meta-Search Engine to Search Google, DuckDuckGo, and More at Once
Purpose
This MCP server demonstrates an SSE-based MCP server (integrated with SearXNG and Microsoft’s markdownify to extract web pages into Markdown-formatted text) and its operational mode using the MCP Inspector (MCP client).
Runtime Environment
This project uses uv to manage dependencies and the Python runtime environment. If uv is not yet installed, you can follow the installation instructions on the official website.
The following commands are executed in an Ubuntu 24.04 environment. For operations on other operating systems, please adjust accordingly:
$ curl -LsSf https://astral.sh/uv/install.sh | sh
Download source code:
$ git clone https://github.com/erhwenkuo/mcp-searxng.git
$ cd mcp-searxng
$ uv sync
Running the Service
Running Both Services with Docker Compose
For a simplified setup, you can use the root-level docker-compose.yaml file to run both the SearXNG service and the MCP-SEARXNG service together. This approach automatically handles the network configuration between the two services. This is the fastest way to set up mcp-searxng.
First, ensure you are in the project root directory:
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"searxng": {
"url": "http://localhost:5488/sse"
}
}
}