MCP边缘搜索服务器是一个提供网页搜索功能的MCP协议服务器,它专为与Claude桌面等MCP客户端配合使用而设计,能让AI助手执行网络搜索并获取信息,为用户带来便捷的网络搜索体验。
在运行此服务器之前,你需要确保满足以下先决条件:
pip install -r requirements.txt
与Claude Desktop等MCP客户端一起使用时,执行以下命令启动服务器:
python edge_search_server.py
服务器启动后,等待MCP客户端连接。
无需MCP客户端即可测试搜索功能,使用以下命令:
python edge_search_server.py --test --query "你的搜索关键词"
要测试网页内容检索,使用以下命令:
python edge_search_server.py --test --url "https://example.com"
pip install -r requirements.txt
python edge_search_server.py
python edge_search_server.py --test --query "你的搜索关键词"
python edge_search_server.py --test --url "https://example.com"
将此服务器与Claude Desktop配合使用,可按以下步骤操作:
%AppData%\Claude\claude_desktop_config.json{
"mcpServers": {
"edge-search": {
"command": "C:/path/to/python.exe",
"args": [
"C:/path/to/mcp-edge-search/edge_search_server.py"
]
}
}
}
将C:/path/to/python.exe替换为实际的Python可执行文件路径,将C:/path/to/mcp-edge-search替换为此仓库的实际路径。
3. 重启Claude Desktop。
4. 点击“启用网络搜索”按钮。
如果在Claude Desktop中看到“服务器已断开连接”的错误,可按以下步骤排查:
edge_search.log文件中的错误信息。如果Claude Desktop显示无效JSON错误,可按以下步骤处理:
/)而不是反斜杠(\)。edge_search_server.py:主服务器实现文件。mcp_wrapper.py:提高与Claude Desktop兼容性的辅助脚本。requirements.txt:Python依赖项列表。run_server.bat:Windows批量运行服务器的批处理文件。此项目开源,采用MIT许可证。
欢迎贡献!请随意提交Pull Request。