一个 Model Context Protocol (MCP) 服务器,可让像 Claude 这样的 AI 助手与您的 Google Cloud 平台环境进行交互。这使得自然语言
一个 Model Context Protocol (MCP) 服务器,可让像 Claude 这样的 AI 助手与您的 Google Cloud 平台环境进行交互。这使得自然语言
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.
git clone https://github.com/eniayomi/gcp-mcp
cd gcp-mcpnpm installOpen 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.
{
"gcp": {
"command": "npx -y gcp-mcp"
}
}~/.windsurf/config.json (create if it doesn't exist){
"mcpServers": {
"gcp": {
"command": "npx -y gcp-mcp"
}
}
}Set up GCP credentials:
gcloud auth application-default loginRefresh your AI assistant (Claude Desktop/Cursor/Windsurf)
Start by selecting a project or asking questions like:
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 projectlist-gke-clusters: List all GKE clusters in the current projectlist-sql-instances: List all Cloud SQL instances in the current projectget-logs: Get Cloud Logging entries for the current projectList all GCP projects I have access toUse project my-project-idWhat's my current billing status?Show me the last 10 log entries from my projectTo see logs:
tail -n 50 -f ~/Library/Logs/Claude/mcp-server-gcp.logCommon issues:
gcloud auth application-default loginContributions are welcome! Please feel free to submit a Pull Request.
MIT
暂无开放 Issues,或尚未同步最近议题。