Skip to main content
Glama
williamvd4

Web Search MCP Server

by williamvd4

网页搜索 MCP 服务器

模型上下文协议 (MCP) 服务器可使用 Google 搜索结果进行免费网络搜索,无需 API 密钥。

特征

  • 使用 Google 搜索结果搜索网页

  • 无需 API 密钥或身份验证

  • 返回包含标题、URL 和描述的结构化结果

  • 可配置每次搜索的结果数量

Related MCP server: MCP Google Server

安装

  1. 克隆或下载此存储库

  2. 安装依赖项:

npm install
  1. 构建服务器:

npm run build
  1. 将服务器添加到您的 MCP 配置:

对于 VSCode(Claude Dev Extension):

{ "mcpServers": { "web-search": { "command": "node", "args": ["/path/to/web-search/build/index.js"] } } }

对于 Claude 桌面:

{ "mcpServers": { "web-search": { "command": "node", "args": ["/path/to/web-search/build/index.js"] } } }

用法

服务器提供了一个名为search的工具,它接受以下参数:

{ "query": string, // The search query "limit": number // Optional: Number of results to return (default: 5, max: 10) }

使用示例:

use_mcp_tool({ server_name: "web-search", tool_name: "search", arguments: { query: "your search query", limit: 3 // optional } })

响应示例:

[ { "title": "Example Search Result", "url": "https://example.com", "description": "Description of the search result..." } ]

限制

由于此工具使用 Google 搜索结果的网络抓取,因此需要注意一些重要的限制:

  1. 速率限制:如果短时间内执行的搜索次数过多,Google 可能会暂时阻止请求。为了避免这种情况:

    • 保持合理的搜索频率

    • 明智地使用限制参数

    • 如果需要,考虑在搜索之间设置延迟

  2. 结果准确度

    • 该工具依赖于 Google 的 HTML 结构,该结构可能会发生变化

    • 某些结果可能缺少描述或其他元数据

    • 复杂的搜索运算符可能无法按预期工作

  3. 法律考虑

    • 此工具仅供个人使用

    • 尊重 Google 的服务条款

    • 考虑针对您的用例实施适当的速率限制

贡献

请随时提交问题和增强请求!

One-click Deploy
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/williamvd4/web-search'

If you have feedback or need assistance with the MCP directory API, please join our Discord server