Skip to main content

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.

Status

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 infrastream route, you need the dev tier and a group that the operator names.
  • For merge_pr, the caller needs the write scope.
  • For the gcp route, your organization must use the infrastreamManaged workforce federation. The project must set mcpGcpAccess.enabled.

Rules for all workflows​

  • An agent changes infrastructure through a pull request. The tool write_pr refuses 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_sha that 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/plan passed.
  • 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.

WhoWhat they do
PersonSets the goal. Reads each pull request and its plan. Chooses what goes to production.
AgentReads 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_path and list_god_nodes (wiki route) read the code graph.
  • get_dependency_graph (infrastream route) shows which manifest owns which manifest.
  • get_manifest_schema returns the schema of a kind. Use it before you write a manifest.
  • lint_manifests checks the whole manifest tree. It can check proposed files before you commit them.
  • write_pr opens the pull request. get_pr reads its state.

2. Review outbound access​

Status: pilot. The plan on a pull request: shipped.

WhoWhat they do
PersonReads the plan. Merges or closes the pull request.
AgentReads 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_states finds the Project manifest.
  • get_manifest_details shows the manifest in the state. Use the id from search_states.
  • get_manifest_schema shows the fields of the Project kind.
  • get_pr_content shows the files that a pull request changes.
  • write_pr proposes a change to allowedEgress or to the accessControl block of an Application.

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.

WhoWhat they do
PersonDescribes the resources that already run. Chooses the order of the steps. Merges each pull request.
AgentReads 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 (wiki route) shows groups of code that depend on each other. Use it before you split a service.
  • get_manifest_details shows the manifest in the state.
  • gcp_run_services and gcp_run_revisions (gcp route) read the live service. Both tools are read-only.
  • write_pr opens the pull request that changes spec.target of the Application.

4. Compare environments before a release​

Status: pilot. Release Lens is a pilot. It shows differences. It does not decide a release.

WhoWhat they do
PersonReads the report. Decides when to promote. Approves a release stage in the portal, if the stage has an approval policy.
AgentCan 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.

Next​