开源 AI 联网搜索工具:OpenWebSearch MCP
本项目是一个开源 AI 插件开发工具(OpenWebSearch MCP),旨在解决 AI 在实际应用中无法联网或联网费用高昂的问题,适合在 Claude、LangChain、RAG 方案中添加实时搜索能力。
项目亮点
-
多引擎实时搜索
- 支持 Bing、DuckDuckGo、Exa、Brave 等主流搜索引擎
- 支持 HTTP 代理配置,解决网络访问限制
- 可配置引擎组合搜索,获取更全面的内容
-
流式响应(MCP 协议)
- 完美兼容 Claude 插件(MCP)协议
- 支持
streamableHttp和SSE两种方式返回搜索结果
-
文章正文抓取
- 支持提取指定博客文章全文
- 适用于摘要分析、RAG、训练语料等场景
-
完全免费 & 无需 API Key
- 不再依赖 Bing API / Google Custom Search
- 可自托管,无额度限制,数据可控
-
Docker 一键部署
- 提供
docker-compose和镜像
- 提供
如何使用
安装
git clone https://github.com/Aas-ee/open-webSearch
cd open-webSearch
npm install
npm run build
node build/index.js
Docker 启动
docker run -d \
--name web-search \
-p 3000:3000 \
-e ENABLE_CORS=true \
-e CORS_ORIGIN=* \
ghcr.io/aas-ee/open-web-search:latest
环境变量说明
# 启用 CORS (默认:false)
ENABLE_CORS=true
# CORS 来源配置 (默认:*)
CORS_ORIGIN=*
# 默认搜索引擎 (可选值:bing, duckduckgo, exa, brave,默认:bing)
DEFAULT_SEARCH_ENGINE=duckduckgo
# 启用 HTTP 代理 (默认:false)
USE_PROXY=true
# 代理服务器 URL
PROXY_URL=http://your-proxy-server:port
MCP 客户端配置指南
Cherry Studio
{
"mcpServers": {
"web-search": {
"name": "Web Search MCP",
"type": "streamableHttp",
"description": "Multi-engine web search with article fetching",
"isActive": true,
"baseUrl": "http://localhost:3000/mcp"
},
"web-search-sse": {
"name": "Web Search SSE",
"type": "sse",
"description": "SSE version of web search",
"isActive": true,
"url": "http://localhost:3000/sse"
}
}
}
VSCode Claude Dev Extension
{
"mcpServers": {
"web-search": {
"transport": {
"type": "streamableHttp",
"url": "http://localhost:3000/mcp"
}
},
"web-search-sse": {
"transport": {
"type": "sse",
"url": "http://localhost:3000/sse"
}
}
}
}
如果是 Docker 部署,请将
localhost替换为实际 IP 地址。
MCP 工具支持
search:多引擎搜索工具
{
"query": "Claude 插件开发",
"limit": 5,
"engines": ["bing", "duckduckgo"]
}
返回结构化数据(标题、URL、摘要、来源)。
fetchArticle:提取文章全文
{
"url": "https://example.com/article/xxx"
}
获取正文,支持摘要分析、RAG、训练语料等场景。
CI/CD:支持 Docker 镜像自动构建发布
支持 GitHub Actions 自动构建并发布到容器仓库。开发者可自由部署在内网、私有云环境下。
后续计划
- 支持更多搜索引擎
- 支持文档类内容全文抽取
项目地址
GitHub 地址:https://github.com/Aas-ee/open-webSearch Docker 镜像:ghcr.io/aas-ee/open-web-search:latest


