Baidu Search
STDIOMCP server implementation for intelligent search using Baidu Wenxin API.
MCP server implementation for intelligent search using Baidu Wenxin API.
这是一个用于 Model Context Protocol (MCP) 的百度搜索服务器实现,它允许AI助手使用百度文心API进行智能搜索。
npm install @modelcontextprotocol/sdk axios
首先需要获取百度文心API密钥:
设置环境变量:
export BAIDU_API_KEY=your_api_key_here
node build/index.js
在你的MCP设置文件中添加以下配置:
{ "mcpServers": { "baidu-search": { "command": "node", "args": ["/path/to/baidu-search-mcp/build/index.js"], "env": { "BAIDU_API_KEY": "your_api_key_here" }, "disabled": false, "autoApprove": [] } } }
搜索工具支持以下参数:
query
(必需): 搜索查询文本model
: 使用的模型名称
search_mode
: 搜索模式
enable_deep_search
: 是否开启深度搜索(默认:false)search_recency_filter
: 搜索结果的时效性范围
npm install
npm run build
MIT License
欢迎提交 Issues 和 Pull Requests!
本项目不对API密钥的使用承担责任,请确保遵守百度文心API的使用条款和政策。