Google Cloud MCP Server
Google Cloud MCP 服务器
连接到 Google Cloud 服务的模型上下文协议服务器,用于提供与 Google Cloud 资源交互的上下文和工具。
服务
支持的服务:
[x] 谷歌云日志
[x] 谷歌云监控
[x] 谷歌云扳手
正在开发中的服务器:
[ ] 谷歌云追踪
[ ] Google IAM
[ ] 谷歌云计算
[ ] 谷歌云运行
[ ] 谷歌云存储
谷歌云日志
查询和过滤来自 Google Cloud Logging 的日志条目:
使用自定义过滤器查询日志
搜索特定时间范围内的日志
以可读格式格式化并显示日志条目
谷歌云扳手
与 Google Cloud Spanner 数据库交互:
对 Spanner 数据库执行 SQL 查询
列出可用的数据库和表
探索数据库架构
谷歌云监控
从 Google Cloud Monitoring 检索并分析指标:
使用自定义过滤器查询指标
随时间变化的指标数据可视化
列出可用的指标类型
谷歌云追踪
分析来自 Google Cloud Trace 的分布式跟踪:
通过 ID 检索跟踪
使用过滤选项列出最近的跟踪
查找与日志相关的痕迹
识别失败的痕迹
使用自然语言查询跟踪(例如,“显示过去一小时的失败跟踪”)
Related MCP server: GCP MCP
验证
该服务器支持两种 Google Cloud 身份验证方法:
服务帐号密钥文件(推荐):将
GOOGLE_APPLICATION_CREDENTIALS环境变量设置为服务帐号密钥文件的路径。这是标准的 Google Cloud 身份验证方法。环境变量:直接设置
GOOGLE_CLIENT_EMAIL和GOOGLE_PRIVATE_KEY环境变量。这对于无法存储密钥文件的环境非常有用。
如果设置了,服务器还将使用GOOGLE_CLOUD_PROJECT环境变量,否则它将尝试从身份验证凭据中确定项目 ID。
安装
# Clone the repository
git clone https://github.com/krzko/google-cloud-mcp.git
cd google-cloud-mcp
# Install dependencies
pnpm install
# Build
pnpm build向 Google Cloud 进行身份验证:
gcloud auth application-default login在您的客户端中配置mcpServers :
{
"mcpServers": {
"google-cloud-mcp": {
"command": "node",
"args": [
"/Users/foo/code/google-cloud-mcp/dist/index.js"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/Users/foo/.config/gcloud/application_default_credentials.json"
}
}
}
}发展
启动服务器
# Build the project
pnpm build
# Start the server
pnpm start开发模式
# Build the project
pnpm build
# Start the server and inspector
npx -y @modelcontextprotocol/inspector node dist/index.js与 Smithery 一起使用(很快)
此服务器可与 Smithery 一起部署和使用。服务器实现了身份验证的延迟加载,这意味着它将立即启动并推迟身份验证,直到实际需要时才进行。操作仍然需要身份验证,但这种方法可以防止服务器初始化期间出现超时。
注意:Smithery 本地服务器支持目前正在开发中,可能尚不可用。
故障排除
服务器超时问题
如果在使用 Smithery 运行服务器时遇到超时问题,请尝试以下操作:
通过在配置中设置
debug: true来启用调试日志记录确保将
lazyAuth: true设置为推迟身份验证,直到真正需要时才进行确保您的凭证文件可访问且有效
检查日志中是否有任何错误消息
重要提示:操作仍然需要身份验证,但启用延迟加载后,服务器将立即启动并在需要时进行身份验证,而不是在初始化期间。
身份验证问题
服务器支持两种身份验证方法:
服务帐户密钥文件:将
GOOGLE_APPLICATION_CREDENTIALS环境变量设置为服务帐户密钥文件的路径环境变量:设置
GOOGLE_CLIENT_EMAIL和GOOGLE_PRIVATE_KEY环境变量
如果您遇到身份验证问题,请确保:
您的服务帐号具有必要的权限
密钥文件格式正确且可访问
环境变量设置正确
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides access to BigQuery. This server enables LLMs to inspect database schemas and execute queries.128MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI assistants like Claude to interact with Google Cloud Platform environments through natural language, allowing users to query and manage GCP resources during conversations.94,204200MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables LLMs to understand BigQuery dataset structures and execute SQL queries.365MIT
- AlicenseNot gradedqualityFmaintenanceA Model Context Protocol server that connects to Google Cloud services, allowing users to query logs, interact with Spanner databases, and analyze monitoring metrics through natural language.137MIT
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for interacting with the Supabase platform
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/krzko/google-cloud-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server