
自我托管的AI代理的网页搜索:一个CLI + MCP服务器,将SearxNG包成集成Google,Bing,DuckDuckGo,Brave等多个功能——没有API密钥,没有付费搜索API.
概览
在OpenClaw工作 克洛德代码 反重力 任何CLI ask-search是自动托管的用于AI代理的网络搜索CLI和MCP服务器. 它包裹了SearxNG,因此克洛德代码(Claude Code),OpenClaw,Antigravity或任何外壳都可以搜索Google,Bing,DuckDuckGo,Brave等,没有付费搜索API密钥. Tavily是一个可选的后端. (原始内容存档于2017-10-12). CNAI Agent QQ: 包装 SerxNG, 一条命令 / 13. MCP服务器 Google, Bing, DuckDuck Go, Brave 等搜索结果, 无需付费搜索 API key. Python: CLI 3.8+; MCP服务器 3.10+(由mcp包需要). 您的 AI 代理想要搜索网络, 但是 : - 大部分搜索 API 需要密钥, 成本钱, 且收费有限 - 内建网络搜索将您的查询发送给第三方服务 ask-search slashs SearxNG——一个自发托管的元搜索引擎,它聚合了Google,Bing,DuckDuckGo,Brave和更多来源. 一个指挥部,所有结果,不收取每桶费用. 您的 SearxNG 必须在设置中启用 json. formats in search. yml: 需要Python 3.10+和pip安装mcp.
概述(AI 翻译)
** 自办的人工智能代理网络搜索——不需要搜索API密钥**
- OpenClaw的工作 克洛德法典 反重力 任何CLI*
ask-search是自动托管的用于AI代理的网络搜索CLI和MCP服务器. 它包裹了SearxNG,因此克洛德代码(Claude Code),OpenClaw,Antigravity或任何外壳都可以搜索Google,Bing,DuckDuckGo,Brave等,没有付费搜索API密钥. Tavily是一个可选的后端.
(原始内容存档于2017-10-12). CNAI Agent QQ: 包装 SerxNG, 一条命令 / 13. MCP服务器 Google, Bing, DuckDuck Go, Brave 等搜索结果, 无需付费搜索 API key.
Python: CLI 3.8+; MCP服务器 3.10+ (由mcp包需要).
– – . . .
□ 问题
您的AI代理想要搜索网络,但:
- 大部分搜索API需要钥匙,成本钱,而且价格有限
- 内建网络搜索将您的查询发送给第三方服务
** 你只是希望你的本地代理在没有付费API的情况下搜索Google和朋友. **
□ □ 解决
ask-search包装SearxNG——一个自行托管的元搜索引擎,它集成了Google,Bing,DuckDuckGo,Brave和更多来源. 一个指挥部,所有结果,不收取每桶费用.
(无效产出)
□ 相容性
环境 整合 状态 |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
ask-search is a self-hosted web search CLI and MCP server for AI agents. It wraps SearxNG so Claude Code, OpenClaw, Antigravity or any shell can search Google, Bing, DuckDuckGo, Brave and more without a paid search API key. Tavily is an optional backend.
给 AI Agent 用的自托管联网搜索:包装 SearxNG,一条命令 / 一个 MCP server 就能聚合 Google、Bing、DuckDuckGo、Brave 等搜索结果,无需付费搜索 API key。
Python: CLI 3.8+; MCP server 3.10+ (required by the mcp package).
😡 The Problem
Your AI agent wants to search the web, but:
- Most search APIs need a key, cost money, and are rate limited
- Built-in web search sends your queries to third-party services
You just want your local agent to search Google and friends without a paid API.
✅ The Solution
ask-search wraps SearxNG — a self-hosted meta search engine that aggregates Google, Bing, DuckDuckGo, Brave and many more sources. One command, all results, no per-query fees.
ask-search "Claude Code vs Cursor 2026"
[1] Example result title
https://example.com/article-1
Example snippet text...
[google,brave]
[2] Another example result title
https://example.com/article-2
...
(illustrative output)
📊 Compatibility
| Environment | Integration | Status |
|---|---|---|
| OpenClaw | CLI Skill (SKILL.md) |
✅ |
| Claude Code | CLI command | ✅ |
| Antigravity | MCP Server | ✅ |
| Any shell | ask-search CLI |
✅ |
🚀 Quick Start
1. Start SearxNG (Docker Compose, recommended)
git clone https://github.com/ythx-101/ask-search
cd ask-search/searxng
cp .env.example .env # then set SEARXNG_SECRET (python3 -c "import secrets; print(secrets.token_hex(32))")
docker compose up -d
Or with plain docker run:
docker run -d --name searxng \
-p 127.0.0.1:8080:8080 \
-e SEARXNG_SECRET=your-secret-key \
-v "$PWD/searxng/searxng.yml:/etc/searxng/settings.yml" \
searxng/searxng
2. Install the command
bash install.sh # or: sudo bash install.sh, or: bash install.sh ~/.local/bin
3. Search
ask-search "hello world"
Already have SearxNG?
git clone https://github.com/ythx-101/ask-search
cd ask-search
bash install.sh
export SEARXNG_URL=http://localhost:8080 # if not the default
ask-search "hello world"
Your SearxNG must have json enabled in search.formats in settings.yml:
search:
formats:
- html
- json
🔧 Usage
安装
docker run -d --name searxng \配置
{
"mcpServers": {
"ask-search": {
"command": "python3",
"args": ["/path/to/ask-search/mcp/server.py"],
"env": {
"SEARXNG_URL": "http://localhost:8080",
"TAVILY_API_KEY": "tvly-YOUR_API_KEY"
}
}
}
}