GCP MCP Server
Enables AI agents to manage Google Cloud Platform resources including projects, IAM, service accounts, and APIs directly through GCP REST APIs without requiring gcloud CLI or Terraform.
README
GCP MCP Server
An MCP (Model Context Protocol) server that lets AI agents manage Google Cloud Platform — no gcloud CLI or Terraform required. It talks directly to GCP REST APIs using a service account.
Tools Exposed
📁 Projects
| Tool | Description |
|---|---|
gcp_list_projects |
List all accessible GCP projects |
gcp_get_project |
Get details for a specific project |
gcp_create_project |
Create a new project |
gcp_update_project |
Update a project's display name or labels |
gcp_delete_project |
Soft-delete a project (30-day recovery) |
gcp_get_operation |
Poll a long-running project operation |
🔑 IAM & Service Accounts
| Tool | Description |
|---|---|
gcp_list_service_accounts |
List service accounts in a project |
gcp_create_service_account |
Create a new service account |
gcp_delete_service_account |
Delete a service account |
gcp_enable_service_account |
Re-enable a disabled service account |
gcp_disable_service_account |
Disable a service account |
gcp_list_service_account_keys |
List keys for a service account |
gcp_get_project_iam_policy |
Get the project's IAM policy |
gcp_add_project_iam_binding |
Grant a role to a member |
gcp_remove_project_iam_binding |
Revoke a role from a member |
gcp_list_roles |
Browse available IAM roles |
⚙️ APIs / Services
| Tool | Description |
|---|---|
gcp_list_apis |
List enabled/disabled APIs on a project |
gcp_enable_apis |
Enable one or more APIs (batch) |
gcp_disable_api |
Disable an API |
gcp_get_api |
Check if a specific API is enabled |
gcp_get_api_operation |
Poll an API enable/disable operation |
Prerequisites
- A Google Cloud service account with appropriate permissions (see below)
- A JSON key file downloaded for that service account
- Node.js 18+
Minimum IAM Permissions for the Service Account
| Capability | Required Role |
|---|---|
| List/view projects | roles/viewer or resourcemanager.projects.get |
| Create projects | resourcemanager.projects.create on the org/folder |
| Manage IAM policies | roles/resourcemanager.projectIamAdmin |
| Manage service accounts | roles/iam.serviceAccountAdmin |
| Enable/disable APIs | roles/serviceusage.serviceUsageAdmin |
Setup
1. Get a service account key
# In Google Cloud Console:
# IAM & Admin → Service Accounts → Create → download JSON key
# OR via gcloud (if installed):
gcloud iam service-accounts create gcp-mcp-sa \
--display-name "GCP MCP Server"
gcloud iam service-accounts keys create key.json \
--iam-account gcp-mcp-sa@YOUR_PROJECT.iam.gserviceaccount.com
2. Set environment variable
export GOOGLE_APPLICATION_CREDENTIALS=/home/nathan/googlemcp/key.json
Or copy .env.example → .env and fill in the path (you'll need to load it yourself or use dotenv).
3. Build
npm run build
4. Test the server starts
node dist/index.js
# Should print: ✅ GCP MCP Server running on stdio
Connecting to an Agent
Antigravity / Claude Desktop (MCP config)
Add to your MCP settings (e.g. ~/.config/antigravity/mcp.json or Claude Desktop config):
{
"mcpServers": {
"gcp": {
"command": "node",
"args": ["/home/nathan/googlemcp/dist/index.js"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/home/nathan/googlemcp/key.json"
}
}
}
}
Generic stdio MCP
The server communicates over stdin/stdout using the MCP protocol. Any MCP-compatible client can connect by spawning the process:
node /home/nathan/googlemcp/dist/index.js
Example Agent Interactions
"List all my active GCP projects" → calls
gcp_list_projectswithfilter: "state:ACTIVE"
"Create a new project called my-api-backend" → calls
gcp_create_projectwithprojectId: "my-api-backend", thengcp_get_operationto poll
"Enable Cloud Run and Cloud Build on my project" → calls
gcp_enable_apiswith["run.googleapis.com", "cloudbuild.googleapis.com"]
"Create a deployer service account and give it Cloud Run invoker" →
gcp_create_service_account→gcp_add_project_iam_bindingwithroles/run.invoker
Project Structure
googlemcp/
├── src/
│ ├── auth.ts # Service account token fetcher
│ ├── index.ts # MCP server entry point (21 tools registered)
│ └── tools/
│ ├── projects.ts # Project CRUD (CRM v3)
│ ├── iam.ts # Service accounts + IAM policies
│ └── apis.ts # API enable/disable (Service Usage v1)
├── dist/ # Compiled output (after npm run build)
├── tsconfig.json
└── package.json
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。