Skip to content

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
ValueMeaning
urlThe gateway’s MCP endpoint, an in-cluster Service by its full name, with its port and path
audiencePrefixStarts the token’s audience, <audiencePrefix>.<role>.<class>. Never the model gateway’s prefix
roles, classesA run gets the server when its role and its data class are both listed, and it has a room
gatewayThe gateway’s pods: the namespace of url, their labels, the port they listen on
readOnlyToolsTool 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

ItemValue
A tokenAudience <audiencePrefix>.<role>.<class>, valid for the run’s whole deadline plus 10 minutes
Two variablesCLUSTER_MCP_URL, CLUSTER_MCP_TOKEN_FILE
An MCP serverNamed cluster, beside platform
One egress ruleTo 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

  1. 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.
  2. The bridge treats a tool outside readOnlyTools as 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.json is still ignored.
  • The broker does not proxy these tools: the run calls the gateway as itself.