
eniayomi/gcp-mcp 是从 https://github.com/eniayomi/gcp-mcp. 导入的 MCP 服务器候选
概览
eniayomi/gcp-mcp 是从 https://github.com/eniayomi/gcp-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
一个模型上下文协议(MCP)服务器,使像 Claude 这样的 AI 助手能够与你的 Google Cloud Platform 环境交互。这允许在对话中进行自然语言查询和管理你的 GCP 资源。
特色
- 🔍 使用自然语言查询和修改GCP资源
- ☁️ 支持多个GCP项目
- 🌐 多区域支持
- 🔐 安全凭证处理(外部服务不泄露凭证)
- 🏃 ♂️ 用你的GCP凭证进行本地执行
- 🔄 自动重试以提升可靠性
先修条件
- Node.js
- Claude桌面/光标/风帆冲浪
- GCP 凭据在本地配置(应用默认凭证)
安装
-
克隆仓库:
-
安装依赖:
配置
克劳德桌面
-
打开 Claude 桌面应用,进入设置 -> 开发者 -> 编辑配置
-
在你的
claude_desktop_config.json中添加以下条目:
通过NPM:
如果你是从源代码安装的:
如果使用源安装,将 /path/to/gcp-mcp 替换为你项目目录的实际路径。
光标
- 打开光标并进入设置(⌘,)
- 导航至AI->模型上下文协议
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
GCP MCP
A Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with your Google Cloud Platform environment. This allows for natural language querying and management of your GCP resources during conversations.
Features
- 🔍 Query and modify GCP resources using natural language
- ☁️ Support for multiple GCP projects
- 🌐 Multi-region support
- 🔐 Secure credential handling (no credentials are exposed to external services)
- 🏃♂️ Local execution with your GCP credentials
- 🔄 Automatic retries for improved reliability
Prerequisites
- Node.js
- Claude Desktop/Cursor/Windsurf
- GCP credentials configured locally (application default credentials)
Installation
- Clone the repository:
git clone https://github.com/eniayomi/gcp-mcp
cd gcp-mcp
- Install dependencies:
npm install
Configuration
Claude Desktop
-
Open Claude desktop app and go to Settings -> Developer -> Edit Config
-
Add the following entry to your
claude_desktop_config.json:
via npm:
{
"mcpServers": {
"gcp": {
"command": "sh",
"args": ["-c", "npx -y gcp-mcp"]
}
}
}
If you installed from source:
{
"mcpServers": {
"gcp": {
"command": "npm",
"args": [
"--silent",
"--prefix",
"/path/to/gcp-mcp",
"start"
]
}
}
}
Replace /path/to/gcp-mcp with the actual path to your project directory if using source installation.
Cursor
- Open Cursor and go to Settings (⌘,)
- Navigate to AI -> Model Context Protocol
- Add a new MCP configuration:
{
"gcp": {
"command": "npx -y gcp-mcp"
}
}
Windsurf
- Open
~/.windsurf/config.json(create if it doesn’t exist) - Add the MCP configuration:
{
"mcpServers": {
"gcp": {
"command": "npx -y gcp-mcp"
}
}
}
GCP Setup
-
Set up GCP credentials:
- Set up application default credentials using
gcloud auth application-default login
- Set up application default credentials using
-
Refresh your AI assistant (Claude Desktop/Cursor/Windsurf)
Usage
Start by selecting a project or asking questions like:
- “List all GCP projects I have access to”
- “Show me all Cloud SQL instances in project X”
- “What’s my current billing status?”
- “Show me the logs from my Cloud Run services”
- “List all GKE clusters in us-central1”
- “Show me all Cloud Storage buckets in project X”
- “What Cloud Functions are deployed in us-central1?”
- “List all Cloud Run services”
- “Show me BigQuery datasets and tables”
Available Tools
run-gcp-code: Execute GCP API calls using TypeScript codelist-projects: List all accessible GCP projectsselect-project: Select a GCP project for subsequent operationsget-billing-info: Get billing information for the current projectget-cost-forecast: Get cost forecast for the current projectget-billing-budget: Get billing budgets for the current project
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"gcp": {
"command": "sh",
"args": ["-c", "npx -y gcp-mcp"]
}
}
}