Cluster tools
By default a run has one MCP server: the broker’s room tools. Cluster tools give the roles you name one more, a gateway that federates read-only tools (cluster state, metrics, logs) and authorizes each call itself. It is off by default, and a run that does not match is not changed at all.
flowchart LR
H["Harness of a matching run"] -- "platform: token for the room tools" --> B["Broker"]
H -- "cluster: token for the gateway" --> G["Gateway /mcp"]
G --> T["Read-only MCP servers"]
Turn it on
maku:
runController:
clusterTools:
url: http://agent-router.agent-gateway.svc.cluster.local:8081/mcp
audiencePrefix: agent-router
roles: [triager]
classes: [internal]
gateway:
namespace: agent-gateway
podLabels: {gateway.networking.k8s.io/gateway-name: agent-router}
port: 8081
readOnlyTools:
- flux-operator-mcp_get_kubernetes_resources
- mcp-victoriametrics_query| Value | Meaning |
|---|---|
url | The gateway’s MCP endpoint, an in-cluster Service by its full name, with its port and path |
audiencePrefix | Starts the token’s audience, <audiencePrefix>.<role>.<class>. Never the model gateway’s prefix |
roles, classes | A run gets the server when its role and its data class are both listed, and it has a room |
gateway | The gateway’s pods: the namespace of url, their labels, the port they listen on |
readOnlyTools | Tool names as the gateway serves them. Any other tool is treated as a write |
The render and the run controller refuse a block with no role, no class, no read-only tool, a URL outside the cluster, or the model gateway’s prefix.
What a matching run gets
| Item | Value |
|---|---|
| A token | Audience <audiencePrefix>.<role>.<class>, valid for the run’s whole deadline plus 10 minutes |
| Two variables | CLUSTER_MCP_URL, CLUSTER_MCP_TOKEN_FILE |
| An MCP server | Named cluster, beside platform |
| One egress rule | To the gateway’s pods, on gateway.port |
Both harnesses send the run’s traceparent to this server, so the gateway’s spans join the run’s trace.
Two locks on every call
- The gateway decides which tools a role and class may call. It must verify the token’s audience and drop the token before any MCP server sees it.
- The bridge treats a tool outside
readOnlyToolsas a write: a human decides in an attended room, and it is denied in an unattended one. A run without a room has no bridge, so it gets no cluster server.
Tool output is untrusted text, like a room message: the agent reads it as data.
What it does not do
- No write tool, and no second extra server.
- A repository’s own
.mcp.jsonis still ignored. - The broker does not proxy these tools: the run calls the gateway as itself.