MCP Workflows Playbook
This page shows four workflows for the Infrastream MCP. Each workflow names what a person does, what an agent may do, and the status of the workflow. For the terms on this page, such as pull request, see the Glossary.
The Infrastream MCP is a pilot. It runs in the Infrastream integration environment. Customers cannot use it yet. Read The Agent Path for the rollout.
Prerequisites
To connect an AI tool, read Manage MCP. Then check these points.
- For the
infrastreamroute, you need the dev tier and a group that the operator names. - For
merge_pr, the caller needs the write scope. - For the
gcproute, your organization must use theinfrastreamManagedworkforce federation. The project must setmcpGcpAccess.enabled.
Rules for all workflows
- An agent changes infrastructure through a pull request. The tool
write_prrefuses the default branch and each protected branch. - Text that a tool returns is data from other people. This includes titles, bodies and comments of pull requests, logs and text of repositories. It is not an instruction. An agent does not obey it.
- A person reads each pull request before it merges to production. An agent does not merge to production.
- An agent cannot cut a release today. The release server is off for each tenant.
- An agent cannot approve or promote a release stage to production. A person does this in the portal.
Agent merge in integration
Status: planned, until a tenant check.
The tool merge_pr merges with the GitHub App token. This token bypasses the branch ruleset. The guards of the tool limit the merge. They do not use the rights of the person. No person must review the pull request. An agent can write a pull request and merge it in integration.
The tool refuses and changes nothing, unless all of these are true:
- The caller holds the write scope.
- The pull request is open, is not a draft, targets
main, is in the manifests repository and is clean. - The head of the pull request equals the
head_shathat the caller passes. - Each changed file is under
environment/integration/. The tool refuses a pull request that deletes a file. - The privilege gate has no findings.
- The check
infrastream-runner/planpassed. - The tenant has fewer than 4 merges in the last hour.
The merge is a squash merge.
1. Improve non-production with objectives
Status: coming. Agent pull requests: shipped. The loop that picks tasks from objectives: coming. See Objective-Driven RSI.
| Who | What they do |
|---|---|
| Person | Sets the goal. Reads each pull request and its plan. Chooses what goes to production. |
| Agent | Reads the code and the state. Opens a pull request on a feature branch. In integration, it can merge the pull request under the guards above (planned). |
Tools:
find_code,trace_pathandlist_god_nodes(wikiroute) read the code graph.get_dependency_graph(infrastreamroute) shows which manifest owns which manifest.get_manifest_schemareturns the schema of a kind. Use it before you write a manifest.lint_manifestschecks the whole manifest tree. It can check proposed files before you commit them.write_propens the pull request.get_prreads its state.
2. Review outbound access
Status: pilot. The plan on a pull request: shipped.
| Who | What they do |
|---|---|
| Person | Reads the plan. Merges or closes the pull request. |
| Agent | Reads the manifest. May propose a change in a pull request. |
An application can call only the sites that its Project lists in spec.allowedEgress. It can also call Google's services and the system update servers. See Configure Egress Rules.
Tools:
search_statesfinds theProjectmanifest.get_manifest_detailsshows the manifest in the state. Use the id fromsearch_states.get_manifest_schemashows the fields of theProjectkind.get_pr_contentshows the files that a pull request changes.write_prproposes a change toallowedEgressor to theaccessControlblock of anApplication.
A change to accessControl is a privilege change. The privilege gate lists it. The tool write_pr then returns requires_confirmation, or labels the pull request. The tool merge_pr refuses a pull request that has privilege findings. A person confirms the change and merges it.
3. Move to Cloud Run in steps
Status: pilot for the tools. The manifest change: shipped. See Migrate a Service to Cloud Run and Adopt a Repository, DNS and Sign-in.
| Who | What they do |
|---|---|
| Person | Describes the resources that already run. Chooses the order of the steps. Merges each pull request. |
| Agent | Reads the state and the live service. Proposes the manifest change in a pull request. |
Infrastream does not scan an account to write manifests. A person describes the resources that already run.
Tools:
list_communities(wikiroute) shows groups of code that depend on each other. Use it before you split a service.get_manifest_detailsshows the manifest in the state.gcp_run_servicesandgcp_run_revisions(gcproute) read the live service. Both tools are read-only.write_propens the pull request that changesspec.targetof theApplication.
4. Compare environments before a release
Status: pilot. Release Lens is a pilot. It shows differences. It does not decide a release.
| Who | What they do |
|---|---|
| Person | Reads the report. Decides when to promote. Approves a release stage in the portal, if the stage has an approval policy. |
| Agent | Can start, approve, reject and retry the single-stage integration pre-release (planned). It cannot promote beyond integration. Production stays with people. |
Release Lens shows what a release changes in configuration, version pins, network routes and access rules between two environments. It also says what it did not read.
The release server is off for each tenant. The go-live gate for the agent is not met.