Skip to main content
Glama

气相色谱法 (GCP) 气相色谱法

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

GCP MCP 演示

特征

  • 🔍 使用自然语言查询和修改 GCP 资源
  • ☁️ 支持多个 GCP 项目
  • 🌐 多区域支持
  • 🔐 安全凭证处理(不会向外部服务公开任何凭证)
  • 🏃‍♂️ 使用您的 GCP 凭据进行本地执行
  • 🔄 自动重试以提高可靠性

先决条件

  • Node.js
  • Claude 桌面/光标/风帆冲浪
  • 本地配置的 GCP 凭据(应用程序默认凭据)

安装

  1. 克隆存储库:
git clone https://github.com/eniayomi/gcp-mcp cd gcp-mcp
  1. 安装依赖项:
npm install

配置

克劳德桌面

  1. 打开 Claude 桌面应用程序并转到“设置”->“开发者”->“编辑配置”
  2. 将以下条目添加到您的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替换为项目目录的实际路径。

光标

  1. 打开 Cursor 并转到“设置”(⌘,)
  2. 导航至 AI -> 模型上下文协议
  3. 添加新的 MCP 配置:
{ "gcp": { "command": "npx -y gcp-mcp" } }

风帆冲浪

  1. 打开~/.windsurf/config.json (如果不存在则创建)
  2. 添加 MCP 配置:
{ "mcpServers": { "gcp": { "command": "npx -y gcp-mcp" } } }

GCP 设置

  1. 设置 GCP 凭据:
    • 使用gcloud auth application-default login设置应用程序默认凭据
  2. 刷新你的人工智能助手(Claude Desktop/Cursor/Windsurf)

用法

首先选择一个项目或提出以下问题:

  • “列出我有权访问的所有 GCP 项目”
  • “显示项目 X 中的所有 Cloud SQL 实例”
  • “我目前的账单状态是什么?”
  • “显示我的 Cloud Run 服务的日志”
  • “列出 us-central1 中的所有 GKE 集群”
  • “显示项目 X 中的所有 Cloud Storage 存储桶”
  • “us-central1 中部署了哪些云功能?”
  • “列出所有 Cloud Run 服务”
  • “向我展示 BigQuery 数据集和表格”

可用工具

  1. run-gcp-code :使用 TypeScript 代码执行 GCP API 调用
  2. list-projects :列出所有可访问的 GCP 项目
  3. select-project :选择一个 GCP 项目进行后续操作
  4. get-billing-info :获取当前项目的账单信息
  5. get-cost-forecast :获取当前项目的成本预测
  6. get-billing-budget :获取当前项目的计费预算
  7. list-gke-clusters :列出当前项目中的所有 GKE 集群
  8. list-sql-instances :列出当前项目中的所有 Cloud SQL 实例
  9. get-logs :获取当前项目的 Cloud Logging 条目

交互示例

  1. 列出可用项目:
List all GCP projects I have access to
  1. 选择一个项目:
Use project my-project-id
  1. 检查账单状态:
What's my current billing status?
  1. 查看日志:
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

常见问题:

  1. 身份验证错误:确保您已运行gcloud auth application-default login
  2. 权限错误:检查您账户的 IAM 角色
  3. API 错误:验证项目中是否启用了所需的 API

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

执照

麻省理工学院

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

模型上下文协议服务器使 Claude 等 AI 助手能够通过自然语言与 Google Cloud Platform 环境进行交互,从而允许用户在对话过程中查询和管理 GCP 资源。

  1. 特征
    1. 先决条件
      1. 安装
        1. 配置
          1. 克劳德桌面
          2. 光标
          3. 风帆冲浪
          4. GCP 设置
        2. 用法
          1. 可用工具
            1. 交互示例
              1. 支持的服务
                1. 故障排除
                  1. 贡献
                    1. 执照

                      Related MCP Servers

                      • -
                        security
                        F
                        license
                        -
                        quality
                        A 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.
                        Last updated -
                        16
                        2
                        TypeScript
                      • A
                        security
                        A
                        license
                        A
                        quality
                        A 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 -
                        1
                        75
                        3
                        TypeScript
                        MIT License
                      • -
                        security
                        A
                        license
                        -
                        quality
                        A Model Context Protocol server that enables AI assistants like Claude to read from, append to, and format text in Google Documents programmatically.
                        Last updated -
                        24
                        TypeScript
                        MIT License
                        • Linux
                        • Apple
                      • A
                        security
                        A
                        license
                        A
                        quality
                        A Model Context Protocol server that enables AI agents to interact with Google Workspace services including Drive, Docs, and Sheets through natural language commands.
                        Last updated -
                        8
                        Python
                        MIT License
                        • Linux
                        • Apple

                      View all related MCP servers

                      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/eniayomi/gcp-mcp'

                      If you have feedback or need assistance with the MCP directory API, please join our Discord server