The Agent Path
Developers and engineers will connect their own AI agents to Infrastream through the Model Context Protocol (MCP). The agent works with the tiers of the person who signs in. It reads, debugs and proposes changes. Test each change in a non-production environment first, then release it.
The MCP sign-in, the MCP gateway and the MCP tools are rolling out to production. Today they run only in the Infrastream integration environment, and customers cannot use them yet. Steps 1 to 4 below use them. Steps 5 and 6 work today through pull requests and the portal. In integration, each agent has an identity of its own. We plan a cap for one agent, and we defer it for now.
An agent signs in as you, passes the gateway, reads and debugs with your tiers, and proposes changes as pull requests. Your team tests in a non-production environment. The release track promotes the tested version to production.
Who the agent acts as
The agent acts as the person who signs in. It gets the tiers of that person, and no more.
- The sign-in. Your MCP client opens the Infrastream sign-in page. You accept a consent screen. The token names your tenant, your email and your tier in the organization.
- The organization tier. A route can require a lowest tier in the
Organizationmanifest. In the integration environment, each route requires one, so a tier on a project alone gives no MCP sign-in there. A route with no rule needs only membership in the tenant. - The route. Each MCP server has its own route on the gateway, and each route has its own scope, such as
mcp:gcp. A token for one route does not open another route. - The tier for a route. The operator of the sign-in can set the lowest organization tier for each route, and can also require a group. In the integration environment, the
gcproute needs the read tier. Theinfrastreamandjobsroutes need the dev tier and a group that the operator names. - The tier for a project. The
gcpserver uses your tier on the project of each call. This tier can be lower than your tier in the organization. Theinfrastreamserver does not check the project. With the dev tier in the organization, the agent reads the state of each project. - The consent. The consent screen can only narrow the access. It cannot add access that your tiers do not give.
- A tier change. A tier change gets into the token at the next sign-in, not at a refresh. The operator can turn on the refresh hook, as in the integration environment. Then a refresh fails if the token holds a higher tier than the person has now. Without the hook, a tier that you remove in a manifest can stay in a token. With the hook, an access token that is already out stays valid until it ends.
- The project tier on each call. The
gcpserver examines the project tier again on each call. A project tier change has an effect up to 90 seconds after the portal reads the applied manifests. The server keeps an answer of the portal for 30 seconds. - The audit. The
gcpserver writes one audit line for each tool call. It sends the same request ID to Google Cloud.
Controls for each project and environment
A project tier applies to one project, and each project is in one environment. Thus you can give a person a different project tier in each environment. The gcp route uses this project tier. The infrastream route uses the organization tier, the same in each environment.
The example gives the payments team the dev tier in integration and the read tier in production. Through the gcp route, the agents of the team can read the log entries in integration. In production, they can read the resources and the metrics, but not the log entries. A log-based metric can still hold text from a log line.
spec:
mcpGcpAccess:
enabled: true
permissions:
contributors:
groups: [payments-team]
spec:
mcpGcpAccess:
enabled: true
permissions:
viewers:
groups: [payments-team]
mcpGcpAccess.enabled lets the agents read the Google Cloud resources of the project. Without it, the project gives no Google Cloud access through MCP. The gcp route works only if your organization uses the infrastreamManaged workforce federation. With a Google Workspace or an Entra federation, no project gives access through MCP yet.
Select a tier to see what an agent can do with it.
- read (viewers)
- dev (contributors)
- admin (administrators)
| Action | Non-production project | Production project |
|---|---|---|
| Read Cloud Run, Compute Engine, Cloud SQL, Spanner, bucket metadata and metricsThe gcp route, the project tier. The project must set mcpGcpAccess.enabled. | Yes | Yes |
| Read Cloud Logging entriesThe gcp route, the project tier. At most 500 entries for each call. | No | No |
| Read state, deployments, change history and approvalsThe infrastream route. The tier in the organization decides, not the tier on the project. | No | No |
| Comment on a pull requestThe infrastream route. The comment_pr tool writes only to GitHub. | No | No |
| Open a pull request for manifestsThe infrastream route, the organization tier. In production, the pull request gets a warning and the privilege-change label. | No | No |
| Change a privilege field, such as permissions, accessControl or invokersThe gate examines a fixed list of fields, and it also finds a field that a change removes. A field that is not on the list gets no warning. | No | No |
| Start or approve a release stageNo release route is open today. Planned: a machine client starts the pre-release stage and gives a QA vote, and nothing more. In integration, every MCP client counts as an agent, so a human action needs the portal. | Planned | No |
| Read a Secret Manager payload, change an IAM policy or impersonate a service accountNo tier holds these permissions. A log line can still hold a secret. | No | No |
| Action | Non-production project | Production project |
|---|---|---|
| Read Cloud Run, Compute Engine, Cloud SQL, Spanner, bucket metadata and metricsThe gcp route, the project tier. The project must set mcpGcpAccess.enabled. | Yes | Yes |
| Read Cloud Logging entriesThe gcp route, the project tier. At most 500 entries for each call. | Yes | Yes |
| Read state, deployments, change history and approvalsThe infrastream route. The tier in the organization decides, not the tier on the project. | Yes | Yes |
| Comment on a pull requestThe infrastream route. The comment_pr tool writes only to GitHub. | Yes | Yes |
| Open a pull request for manifestsThe infrastream route, the organization tier. In production, the pull request gets a warning and the privilege-change label. | Yes | With a warning |
| Change a privilege field, such as permissions, accessControl or invokersThe gate examines a fixed list of fields, and it also finds a field that a change removes. A field that is not on the list gets no warning. | With a warning | With a warning |
| Start or approve a release stageNo release route is open today. Planned: a machine client starts the pre-release stage and gives a QA vote, and nothing more. In integration, every MCP client counts as an agent, so a human action needs the portal. | Planned | No |
| Read a Secret Manager payload, change an IAM policy or impersonate a service accountNo tier holds these permissions. A log line can still hold a secret. | No | No |
| Action | Non-production project | Production project |
|---|---|---|
| Read Cloud Run, Compute Engine, Cloud SQL, Spanner, bucket metadata and metricsThe gcp route, the project tier. The project must set mcpGcpAccess.enabled. | Yes | Yes |
| Read Cloud Logging entriesThe gcp route, the project tier. At most 500 entries for each call. | Yes | Yes |
| Read state, deployments, change history and approvalsThe infrastream route. The tier in the organization decides, not the tier on the project. | Yes | Yes |
| Comment on a pull requestThe infrastream route. The comment_pr tool writes only to GitHub. | Yes | Yes |
| Open a pull request for manifestsThe infrastream route, the organization tier. In production, the pull request gets a warning and the privilege-change label. | Yes | With a warning |
| Change a privilege field, such as permissions, accessControl or invokersThe gate examines a fixed list of fields, and it also finds a field that a change removes. A field that is not on the list gets no warning. | With a warning | With a warning |
| Start or approve a release stageNo release route is open today. Planned: a machine client starts the pre-release stage and gives a QA vote, and nothing more. In integration, every MCP client counts as an agent, so a human action needs the portal. | Planned | No |
| Read a Secret Manager payload, change an IAM policy or impersonate a service accountNo tier holds these permissions. A log line can still hold a secret. | No | No |
The MCP tools are the same for the dev and admin tiers. The admin tier adds data writes for people, as Access Tiers shows. The gcp and infrastream routes have no tool that changes your databases, buckets or cloud resources. The tools write_pr and comment_pr write only to GitHub. The jobs route can start a job, and a backup job writes to a bucket.
Debug with the agent
Ask the agent a question in plain words. It selects the tool. The table shows the tool that answers each question, its route and the tier that it needs.
| Question | Tool, route and tier |
|---|---|
| Why did the last deployment fail? | get_deployment, get_run_statusinfrastream route, dev tier |
| What changed in this resource, and in which pull request? | get_resource_history, get_resource_audit_loginfrastream route, dev tier |
| Which manifests does this manifest own? | get_dependency_graphinfrastream route, dev tier |
| Is this manifest valid? | lint_manifestsinfrastream route, dev tier |
| Which environments are non-production? | get_environment_classificationinfrastream route, dev tier |
| Which revisions does this service have? | gcp_run_services, gcp_run_revisionsgcp route, read tier |
| Is the service healthy? | gcp_monitoring_timeseriesgcp route, read tier |
| What do the logs say? | gcp_logsgcp route, dev tier |
get_dependency_graph shows which manifest owns which manifest. It does not show which service calls a database. All gcp tools are read-only. Each tool takes the project ID and a small set of checked arguments. No tool takes a URL, a header or a service account.
What limits lateral movement
Lateral movement is when an agent uses the access that it has to get access that it does not have. Each row shows a path, and the control that limits it.
| The agent tries to | What limits it |
|---|---|
| Use the token of one MCP server on another server | The gateway examines the scope of the route. A token without that scope gets no access. |
| Read a Google Cloud project where the person has no tier | The gcp server asks the portal for the tier of the person on that project. A missing tier gets not_available, the same answer as an unknown project. The infrastream server does not make this check. |
| Use the Google Cloud token of the server | The server gets a token for a reader service account of that project. It never returns this token to the agent. |
| Read a bucket or metrics of another project | The server compares the project number of the bucket with the project of the call. It drops each metric series of another project. |
Call the gcp server around the gateway | The server accepts only a call with one valid signed assertion from the gateway. It removes all other identity headers. |
| Write straight to the main branch | write_pr refuses the default branch and each protected branch. It writes only to a feature branch, and a person merges the pull request. |
| Give itself more access in a pull request | The privilege gate examines a fixed list of privilege fields and privileged kinds, and it also finds a removal. The pull request gets a warning, and in most cases the privilege-change label. A field that is not on the list gets no warning. Your branch rules decide who merges the pull request. |
| Change a production environment | An environment is non-production only when a ReleaseTrack lists it in preReleaseStages and in no release or hotfix stage. A pull request for any other environment gets the same warning. |
| Read a Secret Manager payload or change IAM | No tier holds these permissions. See What no tier can do. A log line can still hold a secret, and the redaction of results cannot find every secret. |
| Send many calls in a short time | Each instance of the gcp server accepts 30 calls a minute from one person, and 120 calls a minute for one project. These limits protect the portal and Google Cloud from one caller. They are not a security control. |
Test in non-production, then release
Use a non-production environment as the place where agents work. A change can be an application version or a manifest, and each one has its own path. For a manifest, no control makes this order necessary. Your team keeps to it.
An application version. The release track moves it from stage to stage.
- Ask the agent to make the change in the code. The agent opens a pull request on a feature branch.
- Merge the pull request. Your branch rules decide who can merge. CI deploys the build to your pre-release environment.
- Test the change in the pre-release environment. The agent can read the logs, the metrics and the revisions there.
- Start the release in the portal. A stage with an
approvalPolicywaits for a person. See CI/CD.
A manifest. Each environment has its own manifest files, and a release does not copy them.
- Ask the agent to change the manifest of the non-production environment. Merge it, then test it there.
- Ask the agent to make the same change in the production manifest. This is a second pull request, and it gets the warning of the privilege gate.
- Read the warning, and merge the pull request when the change is correct.
If a change causes a problem, revert its commit and merge. See Roll back a deployment or a setting.
No release route is open today. We plan one. Through it, a machine client will be able to start the pre-release stage and give a QA vote, and do nothing more. The vote will need evidence for the commit of the deployment.
In integration, every MCP client counts as an agent, so a human action needs the portal. Only a person can start a release or approve a stage after integration. See Agent access model.
Next
- Objective-driven RSI: how agents will improve the platform in non-production, and where people decide.
- Agent access model: the rule for what an agent can reach.
- Agentic Governance
- Access Tiers
- CI/CD
- Use Beck