WebSearch-MCP:为AI助手提供网络搜索功能

WebSearch-MCP:为AI助手提供网络搜索功能

一个基于MCP协议的自托管服务器实现,通过WebSearch Crawler API提供实时网络搜索能力。

快速入门

安装

通过Smithery安装:

npx -y @smithery/cli install @mnhlt/WebSearch-MCP --client claude

或手动安装:

npm install -g websearch-mcp

配置

使用环境变量配置API URL和最大搜索结果数:

API_URL=http://localhost:3001 MAX_SEARCH_RESULT=5 npx websearch-mcp

启动爬虫服务

  1. 创建 docker-compose.yml 文件并启动服务:
docker-compose up -d
  1. 检查服务状态:
docker-compose ps
  1. 测试API健康检查:
curl http://localhost:3001/health

使用示例

运行本地测试客户端:

npm run test-client

更多参数说明见README文档。