Google 搜索 MCP 服务器
该项目是一个模型上下文协议 (MCP) 服务器,为 AI 助手提供 Google 搜索 API 功能。
概述
Google Search MCP Server 是一种工具,可让您的 AI 助手使用 Google Search API 执行网络搜索。我们使用 Gradio 和 MCP 来提供 AI 助手和 Google 搜索 API 之间的接口。
功能
- 使用 Google 搜索 API 搜索网页
- 以 JSON 格式返回搜索结果
- 获取最多 20 个搜索结果
先决条件
- Python 3.12 或更高版本
- Google 自定义搜索引擎 ID
- Google API 密钥
安装
- 克隆存储库:
- 安装依赖项:
- 设置环境变量:
将.env.sample
文件复制到.env
并添加必要的 API 密钥:
编辑.env
文件并设置以下值:
如何使用
要启动服务器:
这将启动 Gradio 界面并充当 MCP 服务器。
与 MCP 集成
该服务器使用模型上下文协议(MCP)与AI助手集成。 AI助手可以通过该服务器访问谷歌搜索功能。
API 参考
执行网络搜索
参数:
query
(str):搜索查询(最多 400 个字符,50 个单词)num_results
(int):结果数(1-20,默认10)。
返回:
str
:JSON格式的搜索结果
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
模型上下文协议服务器,使 AI 助手能够使用 Google 搜索 API 执行网络搜索,并以 JSON 格式返回最多 20 个搜索结果。
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server that enables AI assistants like Claude to perform real-time web searches using the Exa AI Search API in a safe and controlled manner.Last updated -1,964
- AsecurityFlicenseAqualityA Model Context Protocol server that enables AI assistants to perform real-time web searches, retrieving up-to-date information from the internet via a Crawler API.Last updated -1448JavaScript
- -securityAlicense-qualityA Model Context Protocol server that provides real-time web search capabilities to AI assistants through pluggable search providers, currently integrated with the Brave Search API.Last updated -3TypeScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server implementation that enables AI assistants like Claude to perform Google searches and retrieve web data directly through natural language requests.Last updated -1753TypeScriptMIT License