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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.