searxng-mcp-bridge
A minimal MCP server that exposes a private SearXNG instance as a search tool over streamable-HTTP, enabling web search from the llama.cpp WebUI or any compatible MCP client.
README
<p align="center"> <img src="logos/searxng-mcp-bridge_color.png" alt="searxng-mcp-bridge" width="480"> </p>
searxng-mcp-bridge
A minimal MCP server that exposes a private
SearXNG instance as a search tool over
streamable-HTTP, so it can be used as a web-search tool from the
llama.cpp WebUI (or any MCP client that
speaks streamable-HTTP / SSE).
It is deliberately tiny — one file, two dependencies (fastmcp, httpx) — as an
auditable alternative to heavier SearXNG MCP packages.
Why this exists
There are existing SearXNG MCP servers, so why another one? Two reasons specific to this use case:
- Transport. The llama.cpp WebUI is a browser-based MCP client, so it can only talk to MCP servers over a network transport (streamable-HTTP / SSE / WebSocket) — not stdio. Many published SearXNG MCP servers are stdio-first (aimed at Claude Desktop / IDEs), which doesn't fit here.
- Footprint. This service runs unauthenticated on the local network, so its
dependency and supply-chain surface matters. The most prominent PyPI option
(
searxng-mcp) pulls in ~167 transitive packages — includinglitellm,llama-index-core,confluent-kafka, and a number of the author's own utility packages — for what is ultimately a thin wrapper around one HTTP endpoint. That's a lot of unrelated code to trust and keep updated.
Since the actual job is trivial (forward a query to SearXNG's JSON API and return the results), a single readable file with two well-known dependencies is easier to audit, deploy, and reason about than adopting a large general-purpose package.
How it works
llama.cpp WebUI (browser MCP client)
│ streamable-HTTP http://<host>:8000/mcp
▼
server.py (this bridge)
│ GET /search?format=json
▼
SearXNG http://127.0.0.1:4000
The WebUI's MCP client is browser-based and only supports network transports (streamable-HTTP / SSE / WebSocket) — not stdio — which is why this bridge serves HTTP.
Tool
search(query, max_results=10, categories=None, language=None, time_range=None)
— returns a list of {title, url, content, engine} from SearXNG.
Configuration (env vars)
| Var | Default | Meaning |
|---|---|---|
SEARXNG_URL |
http://127.0.0.1:4000 |
Base URL of the SearXNG instance |
HOST |
0.0.0.0 |
Bind address |
PORT |
8000 |
Listen port |
MCP_PATH |
/mcp |
HTTP path for the MCP endpoint |
SearXNG must have the JSON format enabled (search.formats includes json in
settings.yml).
Install (systemd)
git clone <this-repo> /opt/searxng-mcp
cd /opt/searxng-mcp
./install.sh # creates .venv, installs the unit, enables + starts it
install.sh rewrites the unit's paths/user to wherever the repo lives. Override
the interpreter or service user with PYTHON=, SERVICE_USER=, SERVICE_GROUP=.
Manage it:
sudo systemctl restart searxng-mcp
journalctl -u searxng-mcp -f
Run manually (dev)
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
SEARXNG_URL=http://127.0.0.1:4000 .venv/bin/python server.py
Wire into the llama.cpp WebUI
In WebUI → MCP Servers, add a server with transport Streamable HTTP and
URL http://<host>:8000/mcp. Use a tool-capable model served with --jinja.
Accessing the WebUI from another machine (CORS proxy)
If you open the llama.cpp WebUI from a different computer on your LAN/VPN
(i.e. not via localhost), the browser blocks the WebUI's direct connection to
the MCP server because it's a different origin (CORS). The fix is to route MCP
traffic through llama-server's built-in CORS proxy:
-
Start
llama-serverwith the proxy enabled (experimental — only on a trusted network; it lets the server make outbound requests on the client's behalf):llama-server ... --ui-mcp-proxy # (-ag / --agent also enables it, plus all built-in server tools) -
In the WebUI, add the MCP server as above and let it connect. The first attempt will fail from a remote browser — this is expected.
-
Open that server's settings and enable the "Use llama-server proxy" switch, then reconnect. (The switch is greyed out with a hint to pass
--ui-mcp-proxyif the server wasn't started with the flag, and it only becomes relevant once a direct connection has failed.)
When the WebUI is opened on the same machine via localhost, the proxy isn't
needed.
Tested clients
The bridge speaks standard MCP over streamable-HTTP, so it should work with any client that supports that transport. Confirmed working with:
- llama.cpp WebUI — add it under MCP Servers as a Streamable HTTP server at
http://<host>:8000/mcp(see above). - Page Assist (browser extension) — works well; add it as a streamable-HTTP MCP server pointing at the same URL.
Tested another client? PRs adding it to this list are welcome.
Screenshots
llama.cpp WebUI — the bridge added under MCP Servers with the Use llama-server proxy switch enabled (see the CORS-proxy note above):

Page Assist — the bridge registered as an HTTP MCP server:

Security note
Binding HOST=0.0.0.0 exposes an unauthenticated search endpoint on every
reachable network (LAN/VPN). Use 127.0.0.1 if you only need local access, or
restrict at the firewall.
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。