cloud-platform): calls run with the signed-in person’s own access to
their projects. Service account key: the whole JSON key file (Cloud
console > IAM & Admin > Service accounts > Keys > Add key > JSON), stored as
the key; the plugin signs a JWT with it and trades it at
oauth2.googleapis.com for an access token, cached until a minute before it
expires. Give the service account only the roles the calls need. A ready
access token (ya29...) works as the key too, until it expires.
- Resource names. Most APIs address things by their full name:
projects/<project>/topics/orders,projects/<project>/locations/us-central1/services/api,projects/<project>/secrets/stripe-key/versions/latest. Pass them whole inname,parent,topicorresource; slashes are kept. Cloud Storage, Compute Engine and Cloud SQL take the parts instead (bucket+object,project+zone+instance). - Groups.
pubsub.*,iam.*(service accounts and their keys, roles, workload identity pools for keyless CI sign-in) andiamCredentials.*(short-lived tokens for a service account),resourceManager.*(projects, folders, organizations, tags and their IAM policies),serviceUsage.*(turning APIs on and off),run.*,functions.*,build.*,artifactRegistry.*,storage.*(storage.objects.insertwithfileuploads,storage.objects.downloadreturns the bytes),logging.*,monitoring.*,secretManager.*,scheduler.*,tasks.*,sql.*,compute.*,billing.*andbudgets.*. - Turn the API on first. A call to an API the project hasn’t enabled
fails with 403 “has not been used in project … or it is disabled”:
run
serviceUsage.services.enablewithprojects/<project>/services/<api>.googleapis.com, then retry after a minute. - Long-running operations. Creates and deletes on Cloud Run, Functions,
Service Usage, Cloud SQL and Compute return an operation; read it with the
same API’s
operations.get(Compute:zoneOperations.get,regionOperations.get,globalOperations.get). Most APIs mark a finished operation withdone: true(checkerrortoo); Compute Engine and Cloud SQL operations usestatus: "DONE"instead. - IAM policies.
setIamPolicyreplaces the whole policy: read it withgetIamPolicy, add the binding, and send it back with itsetag, so a change made in between is refused instead of overwritten. - Quota project. With Google sign-in, Service Usage, Billing Budgets and
a few other APIs ask which project to bill the quota to: set
quotaProjectin the plugin options. - Lists page with
pageSizeandpageToken(Cloud Storage, Compute and Cloud SQL usemaxResults); pass the response’snextPageTokenfor the next page. - Risk. Reads (GETs and the POSTs that only read, such as
getIamPolicy,testIamPermissions, searches andlogging.entries.list) areread. Deletes and destroys, replacing an IAM policy, turning an API or a service account off, stopping or resetting VMs and databases, changing a project’s billing account, moving a project or billing account, publishing a Pub/Sub message or seeking a subscription, sending a verification code, running a job, build, trigger or task now, running SQL, minting credentials (service account keys, signed JWTs, access and ID tokens), committing a function upgrade and locking a bucket’s retention policy aredestructive; other writes arewrite. - Not wrapped: Compute Engine’s load balancing, VPN, interconnect, security
policy and reservation APIs; Cloud Logging’s folder, organization and
billing-account copies of its config API (the top-level calls take any
parent); workforce identity pools; Cloud Storage push channels; webhook
receivers; and streaming calls (
logging.entries.tail). Other Google Cloud APIs (BigQuery, Firebase, Vision) have their own plugins.
- 1058 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- OAuth 2.0 (Recommended)
- API Key
Open hub.corsair.dev, navigate to your project, and enter the client ID and client secret from your Google Cloud OAuth app.More: OAuth 2.0
4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
Read recent errors from Cloud LoggingWhat’s next
API reference
Every
googlecloud.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.