GCP MCP
气相色谱法 (GCP) 气相色谱法
模型上下文协议 (MCP) 服务器,使 Claude 等 AI 助手能够与您的 Google Cloud Platform 环境进行交互。这允许在对话过程中使用自然语言查询和管理您的 GCP 资源。

特征
🔍 使用自然语言查询和修改 GCP 资源
☁️ 支持多个 GCP 项目
🌐 多区域支持
🔐 安全凭证处理(不会向外部服务公开任何凭证)
🏃♂️ 使用您的 GCP 凭据进行本地执行
🔄 自动重试以提高可靠性
Related MCP server: Kubectl MCP Tool
先决条件
Node.js
Claude 桌面/光标/风帆冲浪
本地配置的 GCP 凭据(应用程序默认凭据)
安装
克隆存储库:
git clone https://github.com/eniayomi/gcp-mcp
cd gcp-mcp安装依赖项:
npm install配置
克劳德桌面
打开 Claude 桌面应用程序并转到“设置”->“开发者”->“编辑配置”
将以下条目添加到您的
claude_desktop_config.json中:
通过 npm:
{
"mcpServers": {
"gcp": {
"command": "sh",
"args": ["-c", "npx -y gcp-mcp"]
}
}
}如果您从源代码安装:
{
"mcpServers": {
"gcp": {
"command": "npm",
"args": [
"--silent",
"--prefix",
"/path/to/gcp-mcp",
"start"
]
}
}
}如果使用源安装,请将/path/to/gcp-mcp替换为项目目录的实际路径。
光标
打开 Cursor 并转到“设置”(⌘,)
导航至 AI -> 模型上下文协议
添加新的 MCP 配置:
{
"gcp": {
"command": "npx -y gcp-mcp"
}
}风帆冲浪
打开
~/.windsurf/config.json(如果不存在则创建)添加 MCP 配置:
{
"mcpServers": {
"gcp": {
"command": "npx -y gcp-mcp"
}
}
}GCP 设置
设置 GCP 凭据:
使用
gcloud auth application-default login设置应用程序默认凭据
刷新你的人工智能助手(Claude Desktop/Cursor/Windsurf)
用法
首先选择一个项目或提出以下问题:
“列出我有权访问的所有 GCP 项目”
“显示项目 X 中的所有 Cloud SQL 实例”
“我目前的账单状态是什么?”
“显示我的 Cloud Run 服务的日志”
“列出 us-central1 中的所有 GKE 集群”
“显示项目 X 中的所有 Cloud Storage 存储桶”
“us-central1 中部署了哪些云功能?”
“列出所有 Cloud Run 服务”
“向我展示 BigQuery 数据集和表格”
可用工具
run-gcp-code:使用 TypeScript 代码执行 GCP API 调用list-projects:列出所有可访问的 GCP 项目select-project:选择一个 GCP 项目进行后续操作get-billing-info:获取当前项目的账单信息get-cost-forecast:获取当前项目的成本预测get-billing-budget:获取当前项目的计费预算list-gke-clusters:列出当前项目中的所有 GKE 集群list-sql-instances:列出当前项目中的所有 Cloud SQL 实例get-logs:获取当前项目的 Cloud Logging 条目
交互示例
列出可用项目:
List all GCP projects I have access to选择一个项目:
Use project my-project-id检查账单状态:
What's my current billing status?查看日志:
Show me the last 10 log entries from my project支持的服务
Google 计算引擎
云存储
云函数
云运行
BigQuery
云端 SQL
谷歌 Kubernetes 引擎 (GKE)
云日志
云计费
资源管理器
更多内容即将推出...
故障排除
查看日志:
tail -n 50 -f ~/Library/Logs/Claude/mcp-server-gcp.log常见问题:
身份验证错误:确保您已运行
gcloud auth application-default login权限错误:检查您账户的 IAM 角色
API 错误:验证项目中是否启用了所需的 API
贡献
欢迎贡献代码!欢迎提交 Pull 请求。
执照
麻省理工学院
Available Tools
9 toolsget-billing-budgetC
Get billing budgets for the current project
Inputs: projectId.
get-billing-infoC
Get billing information for the current project
Inputs: projectId.
get-cost-forecastB
Get cost forecast for the current project
Inputs: months, projectId.
get-logsB
Get Cloud Logging entries for the current project
Inputs: filter, pageSize.
list-gke-clustersB
List all GKE clusters in the current project
Inputs: location.
list-projectsA
List all GCP projects accessible with current credentials
Inputs: no named parameters.
list-sql-instancesB
List all Cloud SQL instances in the current project
Inputs: no named parameters.
run-gcp-codeD
Run GCP code
Inputs: code (required), reasoning (required), region, projectId.
select-projectB
Selects GCP project to use for subsequent interactions
Inputs: projectId (required), region.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Tools are mostly distinct: billing-related tools (budget, info, forecast) are clearly separate, and list/select tools for different resources are unambiguous. The only potential confusion is 'run-gcp-code' which is vague but still distinct from other tools.
All tool names follow a consistent verb-noun pattern with hyphens (e.g., get-billing-budget, list-gke-clusters, select-project). The naming convention is uniform and predictable.
The server has 9 tools, which is an appropriate size for a focused GCP management server. It covers several key areas without being overwhelming.
The tool surface is limited to reading and listing operations for select GCP services (billing, logs, GKE, SQL, projects). Missing CRUD operations for resources, compute, storage, IAM, and other common GCP tasks. The vague 'run-gcp-code' tool does not compensate for these gaps.
Related MCP Connectors
The Google GKE MCP server is a managed Model Context Protocol server that provides AI applications with tools to manage Google Kubernetes Engine (GKE) clusters and Kubernetes resources. It exposes a structured, discoverable interface that allows AI agents to interact with GKE and Kubernetes APIs, enabling them to inspect cluster configurations, retrieve Kubernetes resource YAMLs, monitor operations like cluster upgrades, diagnose issues, and optimize costs—all without needing to parse text output or use complex kubectl commands.
The Google Compute Engine MCP server is a fully-managed Model Context Protocol server that provides tools to manage Google Compute Engine resources through AI agents. It enables capabilities including instance management (creating, starting, stopping, resetting, listing), disk management, handling instance templates and group managers, viewing machine and accelerator types, managing images, and accessing reservation and commitment information. The server operates as a zero-deployment, enterprise-grade endpoint at https://compute.googleapis.com/mcp with built-in IAM-based security.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
The BigQuery remote MCP server is a fully managed service that uses the Model Context Protocol to connect AI applications and LLMs to BigQuery data sources. It provides secure, standardized tools for AI agents to list datasets and tables, retrieve schemas, generate and execute SQL queries through natural language, and analyze data—enabling direct access to enterprise analytics data without requiring manual SQL coding.
Related MCP Servers
- AlicenseCqualityDmaintenanceA Model Context Protocol server that connects to Google Cloud services, allowing users to query logs, interact with Spanner databases, and analyze Cloud Monitoring metrics through natural language interaction.4080Apache 2.0
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that enables AI assistants to interact with Kubernetes clusters through natural language, supporting core Kubernetes operations, monitoring, security, and diagnostics.280 npm976MIT
- AlicenseCqualityDmaintenanceA Model Context Protocol server allowing Claude AI to interact with AWS resources through natural language, enabling users to query and manage AWS services without using the traditional AWS Console or CLI.36ISC
- AlicenseCqualityCmaintenanceA Model Context Protocol server implementation that enables AI assistants like Claude to perform Google searches and retrieve web data directly through natural language requests.1704 npm170MIT