谷歌MCP服务器
用于使用完全托管的远程工作的资源集合 谷歌MCP服务器。此存储库包含配置文件、演示场景和示例提示,可帮助您开始使用Google的模型上下文协议(MCP)集成。
______________________________________________________________________
什么是Google MCP服务器?
Google MCP服务器是完全管理的远程服务器,将Google Cloud和Google服务作为AI代理(如Gemini)可以调用的工具公开。使用 模型上下文协议(MCP),你可以让人工智能代理能够查询BigQuery、阅读Firestore文档、管理计算引擎虚拟机、搜索云日志、调用谷歌地图API等等——所有这些都可以通过自然语言提示完成。
______________________________________________________________________
存储库结构
.
├── README.md # This file
├── configuration/
│ └── gemini-cli-settings.json # Ready-to-use Gemini CLI MCP server configuration
├── demos/
│ ├── README.md # Full setup guide and scenario catalog
│ ├── requirements.txt # Python dependencies for demo setup scripts
│ ├── scenario_1.sh # Inject sample logs for Scenario 1
│ ├── setup_scenario_2.py # Setup data for Scenario 2
│ ├── setup_scenario_3.py # Setup data for Scenario 3
│ ├── scenario_3.sh # Inject sample logs for Scenario 3
│ ├── setup_scenario_4.py # Setup data for Scenario 4
│ ├── setup_scenario_5.py # Setup data for Scenario 5
│ ├── setup_scenario_6.py # Setup data for Scenario 6
│ └── setup_scenario_7.py # Setup data for Scenario 7
├── infographics/ # Several infographics that you can use
└── prompts/
└── getting-started.md # 10 sample prompts across Google Cloud services______________________________________________________________________
可用的MCP服务器
此存储库涵盖了以下由Google管理的MCP服务器:
| MCP服务器 | 端点 | 身份验证 |
|---|---|---|
| 开发人员知识 | https://developerknowledge.googleapis.com/mcp | API密钥 |
| 地图/地点 | https://mapstools.googleapis.com/mcp | API密钥 |
| 云SQL | https://sqladmin.googleapis.com/mcp | 谷歌凭据(OAuth) |
| BigQuery | https://bigquery.googleapis.com/mcp | 谷歌凭据(OAuth) |
| 计算引擎 | https://compute.googleapis.com/mcp | 谷歌凭据(OAuth) |
| 云日志 | https://logging.googleapis.com/mcp | 谷歌凭据(OAuth) |
| 云监控 | https://monitoring.googleapis.com/mcp | 谷歌凭据(OAuth) |
| Firestore | https://firestore.googleapis.com/mcp | 谷歌凭据(OAuth) |
| Google Kubernetes Engine | https://container.googleapis.com/mcp | 谷歌凭据(OAuth) |
______________________________________________________________________
先决条件
- A. 谷歌云项目 启用计费。
- 谷歌云CLI(
gcloud) 已安装并验证:
gcloud auth login
gcloud auth application-default login
gcloud config set project YOUR_PROJECT_ID- GCP测试版组件 用于启用托管MCP服务器:
gcloud components install beta- 所需IAM角色 关于你的身份:
- roles/serviceusage.serviceUsageAdmin --启用服务和MCP - roles/mcp.toolUser --进行MCP工具调用 - 根据需要服务特定角色(例如。, roles/bigquery.admin, roles/datastore.owner, roles/logging.admin)
______________________________________________________________________
配置
文件位置:将内容物放入 ~/.gemini/settings.json (全球)或 .gemini/settings.json (本地项目)。替换 YOUR_GCP_PROJECT_ID 和 YOUR_DEVELOPER_KNOWLEDGE_API_KEY / YOUR_GOOGLE_MAPS_API_KEY 与你的实际价值观。
启动Gemini后验证配置:
gemini
# then, inside the session:
/mcp list______________________________________________________________________
演示场景
这 demos/ 该文件夹包含一组端到端场景,展示了使用Google Managed MCP服务器和Gemini的多工具AI编排。每个场景都包括一个用于填充示例数据的设置脚本和一个建议的Gemini提示。
| # | 场景 | 使用的服务 |
|---|---|---|
| 1 | 自动事件分类 | 云日志、开发人员知识 |
| 2 | VIP客户端使用情况分析 | Firestore、BigQuery |
| 3 | 实时活动健康 | Firestore、云日志 |
| 4 | 威胁狩猎 | BigQuery,开发人员知识 |
| 5 | 迁移性能验证 | BigQuery,开发人员知识 |
| 6 | 动态驾驶员路线 | Firestore、BigQuery、谷歌地图 |
| 7 | 零售业扩张分析 | Firestore、BigQuery、谷歌地图 |
请参阅中的完整设置指南和提示目录 demos/README.md.
______________________________________________________________________
信息图
这 infographics/ 该文件夹包含视觉指南和信息图表,涵盖了围绕Google MCP服务器的一系列功能。这些信息图表主要是使用NotebookLM生成的。
| 文件 | 描述 |
|---|---|
FirestoreMCPServer.jpg | 使用Firestore MCP服务器的信息图 |
FirestoreMCPServer2.jpg | 使用Firestore MCP服务器的信息图(第2部分) |
GoogleMCPServersSecurity.jpg | Google MCP服务器安全信息图 |
StepByStepGuidetoGoogleMCPServers-March1-2026.png | 逐步使用Google MCP服务器的视觉指南 |
______________________________________________________________________
入门提示
这 prompts/getting-started.md 文件包含 10个自然语言查询 展示了谷歌MCP集成在以下方面的广度:
- 📊 数据与分析 --BigQuery公共数据集,Firestore文档写入
- 🏗️ 基础设施和计算 --计算引擎VM创建、GKE集群列表
- 🗄️ 数据库管理 --云SQL实例检查和表创建
- 🔍 可观察性和故障排除 --云日志错误检索、监控警报策略
- 🌍 现实世界的融合 --谷歌地图位置搜索、多服务路线+天气查询
每个提示都包括要启用的API、所需的IAM角色以及成功运行它所需的任何资源先决条件。
______________________________________________________________________
贡献
欢迎投稿!欢迎打开pull请求以添加新的提示、演示场景或配置示例。
