platform-mcp
Provides read-only tools for investigating incidents, taking inventory, and surfacing cost-optimization opportunities in Google Cloud projects, using APIs for logging, monitoring, error reporting, resource inventory, cost recommendations, and more.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@platform-mcpList all compute instances in us-central1"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
platform-mcp
A read-only Model Context Protocol server that turns an AI agent (Claude Code, Claude Desktop, or any MCP client) into a GCP platform engineer. Point it at your Google Cloud projects and ask it to investigate incidents, take inventory, and surface cost-optimization opportunities — all without any ability to change your infrastructure.
Observation only. No tool in this server mutates state. Combined with a viewer-only identity (below), that gives you a hard, defense-in-depth guarantee that an agent can look but never touch.
What it can do
Area | Tools |
Environments |
|
Logs & errors |
|
Metrics & alerting |
|
Cost & recommendations |
|
Resource inventory |
|
Typical prompts once it's connected:
"What are the top error groups in the last 24 hours, and which one is newest?"
"Which GKE node pools are over-provisioned? Show mean CPU against machine type."
"Where can I reduce spend in this project?"
Related MCP server: k8s-readonly-mcp
Multiple environments
One server can reach several projects. Define them under
PLATFORM_MCP_ENVIRONMENTS (see Configuration) and the agent
picks one from the wording of your prompt:
"Any errors in staging in the last hour?"
"Compare Cloud Run services between staging and prod."
Every tool takes an optional environment argument. Omit it and the default
environment is used; pass environment="production" to target another. Names,
any aliases you define, common shorthands (prod, stg, qa, …) and bare
project ids all resolve. An unrecognized name is an error listing the valid
options — a typo can never silently retarget the wrong project.
Each environment carries its own service account, so staging and production are
reached through separate identities from the same process, and every result
echoes back the environment and project it came from.
Requirements
Python 3.11+
A Google Cloud project and credentials (your own login, or a service account)
Install
git clone https://github.com/deBilla/platform-mcp.git
cd platform-mcp
python3 -m venv .venv
./.venv/bin/pip install -e .One-time GCP setup
Run these once per project you want to reach — staging and production each need their own APIs enabled and their own read-only service account.
1. Enable the APIs the tools depend on:
gcloud services enable \
logging.googleapis.com monitoring.googleapis.com clouderrorreporting.googleapis.com \
recommender.googleapis.com cloudasset.googleapis.com cloudbilling.googleapis.com \
bigquery.googleapis.com \
--project YOUR_PROJECT_ID2. Grant read-only access to the identity the server runs as.
For local development with your own login (Application Default Credentials):
gcloud auth application-default loginThe identity needs these viewer roles on the project, plus roles/billing.viewer
on the billing account:
roles/viewer # broad read (compute, run, gke, sql via Asset Inventory)
roles/logging.viewer
roles/monitoring.viewer
roles/errorreporting.viewer
roles/recommender.viewer
roles/cloudasset.viewer
roles/bigquery.dataViewer # only for get_cost_breakdown
roles/bigquery.jobUser # only for get_cost_breakdown3. (Recommended) Use a dedicated read-only service account instead of your login:
PROJECT=YOUR_PROJECT_ID
gcloud iam service-accounts create platform-mcp-ro \
--display-name "platform-mcp read-only" --project $PROJECT
SA=platform-mcp-ro@$PROJECT.iam.gserviceaccount.com
for ROLE in roles/viewer roles/logging.viewer roles/monitoring.viewer \
roles/errorreporting.viewer roles/recommender.viewer roles/cloudasset.viewer; do
gcloud projects add-iam-policy-binding $PROJECT \
--member="serviceAccount:$SA" --role="$ROLE"
done
# Let your own login impersonate it (no key file to manage):
gcloud iam service-accounts add-iam-policy-binding $SA \
--member="user:you@example.com" \
--role="roles/iam.serviceAccountTokenCreator" --project $PROJECTThen reference it as that environment's impersonate value in
PLATFORM_MCP_ENVIRONMENTS (preferred — no key file), or point at a downloaded
key via GOOGLE_APPLICATION_CREDENTIALS.
Impersonation is performed by whatever identity your ADC resolves to. If your ADC is itself an impersonated service account, that SA — not your user — needs
roles/iam.serviceAccountTokenCreatoron eachplatform-mcp-ro.
Security model
Read-only is enforced by IAM, not by OAuth scope. The server requests the
broad cloud-platform scope and stays read-only purely because it never calls a
mutating API. Do not rely on the code alone — run it under a viewer-only
identity (step 3 above) so the credential itself is incapable of writing,
regardless of what code executes. This gives you two independent layers: the
server doesn't try to write, and the identity couldn't if it did.
With multiple environments this stays per-project: each environment authenticates as its own service account, so a staging identity is never used to reach production. Grant each one viewer-only access to its project alone.
Configuration
Copy the example config and fill in your values:
cp .mcp.json.example .mcp.json.mcp.json is git-ignored, so your project ids and service-account emails stay
local. Environment variables it (or your shell) can set:
Variable | Purpose |
| JSON map of environment name → settings. The recommended way to configure the server. |
| Environment used when a tool call omits |
| Path to a read-only SA key file (alternative to impersonation). |
| Default max rows for list-style tools (default 50). |
PLATFORM_MCP_ENVIRONMENTS holds a JSON object; each entry accepts:
Key | Purpose |
| Required. GCP project id. |
| Read-only SA to impersonate for this environment (no key file needed). |
| Fully-qualified BigQuery billing export table, required only for |
| Extra names the agent may use for this environment. |
A bare string value is shorthand for {"project": "..."}. As JSON inside
.mcp.json the quotes must be escaped; unescaped it reads:
{
"staging": {
"project": "my-app-staging",
"impersonate": "platform-mcp-ro@my-app-staging.iam.gserviceaccount.com"
},
"production": {
"project": "my-app",
"impersonate": "platform-mcp-ro@my-app.iam.gserviceaccount.com",
"billing_export_table": "my-app.billing.gcp_billing_export_v1_XXXXXX"
}
}Single-environment mode. If PLATFORM_MCP_ENVIRONMENTS is unset the server
behaves as before, exposing one environment named default:
Variable | Purpose |
| Target project. Falls back to your ADC default project if unset. |
| Read-only SA to impersonate. Also the fallback for registry entries with no |
| Billing export table. Also the fallback for registry entries with no |
Register with a client
Claude Code / Claude Desktop — add the block from .mcp.json.example to your
MCP config (.mcp.json in a project for Claude Code, or
claude_desktop_config.json for Desktop), pointing command at the venv's
console script so no global install is needed:
{
"mcpServers": {
"platform-mcp": {
"command": "/absolute/path/to/platform-mcp/.venv/bin/platform-mcp",
"env": {
"PLATFORM_MCP_DEFAULT_ENVIRONMENT": "staging",
"PLATFORM_MCP_ENVIRONMENTS": "{\"staging\":{\"project\":\"YOUR_STAGING_PROJECT_ID\",\"impersonate\":\"platform-mcp-ro@YOUR_STAGING_PROJECT_ID.iam.gserviceaccount.com\"},\"production\":{\"project\":\"YOUR_PROD_PROJECT_ID\",\"impersonate\":\"platform-mcp-ro@YOUR_PROD_PROJECT_ID.iam.gserviceaccount.com\"}}"
}
}
}
}MCP Inspector — for interactive testing:
./.venv/bin/mcp dev src/platform_mcp/server.pyNotes
All tools cap result counts and truncate long payloads to stay token-friendly.
GCP clients are built lazily and cached per environment, so switching between staging and production mid-conversation costs one client construction each.
Cost recommenders are zonal/regional;
list_cost_recommendationsauto-discovers the locations where you have resources (via Asset Inventory) and fans out, skipping locations and recommenders that are empty or unavailable.get_cost_breakdownuses parameterized BigQuery queries with a whitelisted set of group-by columns.
License
MIT © 2026 Dimuthu Wickramanayake
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA read-only MCP server for AI coding agents to inspect repositories, audit code quality, route engineering skills, and plan safe issue/PR workflows.1MIT
- AlicenseAqualityCmaintenanceA read-only MCP server for inspecting Kubernetes clusters, allowing LLMs to list resources, describe pods, and read logs without mutation.5MIT
- AlicenseNot gradedqualityCmaintenanceA read-only MCP server that lets an LLM inspect an AWS account — list EC2 instances, S3 buckets, IAM users, and cost — with a structural guarantee against any mutations.MIT
- FlicenseAqualityCmaintenanceA secure, read-only MCP server for AI-powered system monitoring. It provides real-time OS metrics, config discovery, and safe log tailing to enable autonomous infrastructure audits without shell access risks.4
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
Read-only Remote MCP for externally grounded AI agent trust receipts.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/deBilla/platform-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server