Back to MCP directory
publicPublicdnsLocal runtime

web-search-iur

一个无需API密钥的谷歌搜索MCP服务,提供结构化网页搜索结果

article

README

🚀 网络搜索 MCP 服务器

这是一个基于 Model Context Protocol (MCP) 的服务器,它能借助 Google 搜索结果实现免费的网络搜索,且无需 API 密钥,为用户提供便捷的搜索服务。

✨ 主要特性

  • 利用 Google 搜索结果开展网络搜索。
  • 无需 API 密钥或身份验证,使用门槛低。
  • 返回结构化搜索结果,涵盖标题、URL 和描述,方便查看。
  • 可对每次搜索的结果数量进行配置。

📦 安装指南

  1. 克隆或下载此仓库。
  2. 安装依赖项:
npm install
  1. 构建服务器:
npm run build
  1. 将服务器添加到您的 MCP 配置中:
    • 对于 VSCode(Claude Dev 扩展)
{
  "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 搜索结果的网页抓取,存在以下重要限制:

  1. 速率限制:如果在短时间内执行过多搜索,Google 可能会暂时阻止请求。为了避免这种情况:
    • 保持合理的搜索频率。
    • 谨慎使用 limit 参数。
    • 如果需要,考虑在搜索之间添加延迟。
  2. 结果准确性
    • 工具依赖于 Google 的 HTML 结构,该结构可能会更改。
    • 部分结果可能缺少描述或其他元数据。
    • 复杂的搜索运算符可能无法按预期工作。
  3. 法律考虑
    • 该工具旨在供个人使用。
    • 遵守 Google 的服务条款。
    • 考虑为您的用例实现适当的速率限制。

🤝 贡献指南

欢迎提交问题和改进请求!

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client