搜索Web MCP服务器
使用SearXNG实例提供web搜索功能的模型上下文协议(MCP)服务器。
特性
- 网页搜索:通过SearXNG进行尊重隐私的网络搜索
- 片段提取:从搜索结果中返回标题、URL和文本片段
用法
Docker(推荐)
将此添加到您的 mcp.json (需要一个正在运行的SearXNG实例):
{
"mcpServers": {
"search-web": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "SEARXNG_API_URL=http://host.docker.internal:8080",
"--add-host=host.docker.internal:host-gateway",
"ghcr.io/artyom-k-dev/search-web-mcp:latest"
]
}
}
}或手动运行:
docker run -i --rm \
-e SEARXNG_API_URL=http://host.docker.internal:8080 \
--add-host=host.docker.internal:host-gateway \
ghcr.io/artyom-k-dev/search-web-mcp:latest本地开发
- 确保你有一个正在运行的SearXNG实例(例如,通过Docker):
docker-compose up -d- 运行服务器:
export SEARXNG_API_URL=http://localhost:8080
cargo run --release可用工具
search:使用SearXNG搜索网络。
- 论据: - query:搜索查询字符串
配置
| 环境变量 | 描述 | 默认值 |
|---|---|---|
SEARXNG_API_URL | SearXNG实例的基本URL | http://localhost:8080 |
