Google 搜索 MCP 服务器
该项目是一个模型上下文协议 (MCP) 服务器,为 AI 助手提供 Google 搜索 API 功能。
概述
Google Search MCP Server 是一种工具,可让您的 AI 助手使用 Google Search API 执行网络搜索。我们使用 Gradio 和 MCP 来提供 AI 助手和 Google 搜索 API 之间的接口。
Related MCP server: Scrapeless MCP Server
功能
使用 Google 搜索 API 搜索网页
以 JSON 格式返回搜索结果
获取最多 20 个搜索结果
先决条件
Python 3.12 或更高版本
Google 自定义搜索引擎 ID
Google API 密钥
安装
克隆存储库:
git clone https://github.com/yourusername/google-search-mcp-server.git
cd google-search-mcp-server安装依赖项:
pip install -e .设置环境变量:
将.env.sample文件复制到.env并添加必要的 API 密钥:
cp .env.sample .env编辑.env文件并设置以下值:
GOOGLE_CSE_ID=あなたのGoogleカスタム検索エンジンID
GOOGLE_API_KEY=あなたのGoogleAPIキー如何使用
要启动服务器:
python app.py这将启动 Gradio 界面并充当 MCP 服务器。
与 MCP 集成
该服务器使用模型上下文协议(MCP)与AI助手集成。 AI助手可以通过该服务器访问谷歌搜索功能。
API 参考
执行网络搜索
perform_web_search(query: str, num_results: int = 10)参数:
query(str):搜索查询(最多 400 个字符,50 个单词)num_results(int):结果数(1-20,默认10)。
返回:
str:JSON格式的搜索结果
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/moritalous/google-search-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
