Infrastructure MCP boundaries: read the plan, not the apply

Ansible, Docker, and Kubernetes servers all expose actions that span machines. The boundary is the same in each: inspect freely, change never.

Nov 20, 2026The avbbc desk
Infrastructure MCP boundaries: read the plan, not the apply
Ansible, Docker, and Kubernetes servers all expose actions that span machines. The boundary is the same in each: inspect freely, change never.

Infrastructure tools are the highest blast radius in this directory. A single wrong call does not change one page; it changes every machine that the tool reaches. That property should shape how MCP servers for infrastructure are connected, and it usually does not.

Three servers illustrate the pattern: Ansible, Docker, and Kubernetes.

The short answer

Connect the read path: inventory, plans, logs, pod state. Do not connect apply, restart, scale, or destroy. The agent's job is to explain what will happen, not to make it happen.

Why infrastructure is different

Operation Page site Infrastructure
Wrong write One page Every host in scope
Rollback Restore a draft Restore a fleet
Visibility The editor Whoever is paged

The first row is the reason. A tool whose scope is 'all of production' needs a different approval model than one that edits a post.

Ansible: the inventory is the map

Ansible reads inventory and run results. That is genuinely useful during a failed deployment: which host, which task, what the module returned. Running a playbook from an agent means changing many machines at once with no review surface, which is the definition of the wrong tool.

Docker: the local socket is root

Docker exposes the socket, and the socket is effectively root on the machine. On a laptop with disposable state that is acceptable. On a host that matters it is a remote-code-execution surface with a friendly interface. Read the container list and logs; do not give the agent the socket on a shared host.

Kubernetes: scoped by RBAC

Kubernetes is the best of the three because the platform already has a permission model. A service account with get/list/watch on pods and events is a read-only integration that is genuinely useful for diagnosis. The risk is context: an agent pointing at the wrong cluster is a mistake that reads as competence.

The read-only setup

Three things make the boundary real: a credential that cannot write, a tool description that says it is read-only, and a log of every call. The second is not a security control; it is what stops the model from trying. The third is what answers the question after something changed.

What good diagnosis looks like

An agent with read access can answer: what is unhealthy, when did it change, what does the plan say, which host failed. That is most of the work of an incident, and none of it requires write access. The remaining steps — applying a fix, restarting a service — are the ones that need a person looking at the plan.

Frequently asked questions

What about a staging cluster? Write access to staging is reasonable; the boundary moves with the blast radius, not with the tool.

Can I approve actions in chat? Only if the chat shows the plan. A confirmation without the diff is theatre.

How do I test the boundary? Try to perform a write with the read-only credential and confirm it fails cleanly. See MCP servers for deploys and data.

Related reading

All posts