这是一个基于 Model Context Protocol (MCP) 的服务器,它能借助 Google 搜索结果实现免费的网络搜索,且无需 API 密钥,为用户提供便捷的搜索服务。
npm install
npm run build
{
"mcpServers": {
"web-search": {
"command": "node",
"args": ["/path/to/web-search/build/index.js"]
}
}
}
- **对于 Claude Desktop**:
{
"mcpServers": {
"web-search": {
"command": "node",
"args": ["/path/to/web-search/build/index.js"]
}
}
}
该服务器提供了一个名为 search
的工具,它接受以下参数:
{
"query": string, // 搜索查询
"limit": number // 可选:返回的结果数(默认值:5,最大值:10)
}
示例用法如下:
use_mcp_tool({
server_name: "web-search",
tool_name: "search",
arguments: {
query: "your search query",
limit: 3 // 可选
}
})
示例响应:
[
{
"title": "示例搜索结果",
"url": "https://example.com",
"description": "搜索结果的描述..."
}
]
由于该工具使用 Google 搜索结果的网页抓取,存在以下重要限制:
欢迎提交问题和改进请求!