MCP tools and approvals
spec: mcp: approvalTimeout: 2m servers: - name: github allowTools: ["get_*", "list_*", "create_pull_request", "merge_pull_request"] denyTools: ["delete_*"] requireApproval: ["merge_pull_request"]Register the server in the gateway’s mcpServers and point the agent at
http://leash-gateway.leash-system.svc:8080/mcp/<server>. Denied tools are
removed from the server’s tool list, and refused if the agent calls them anyway.
Held calls
A call to a requireApproval tool waits while the gateway creates a
ToolApproval. If nobody decides before
approvalTimeout, the call is refused.
kubectl leash approvals -n agentskubectl leash approve merge-pull-request-x7k2p -n agentskubectl leash deny merge-pull-request-x7k2p -n agents --reason "not on a Friday"Approve from Slack
With a Slack app, each held call is posted to a channel with Approve and Deny buttons:
- Create a Slack app with incoming webhooks and interactivity, with its Request
URL at
https://<your host>/slack/interactions. - Add
SLACK_WEBHOOK_URLandSLACK_SIGNING_SECRETto the gateway’s credentials Secret. - Set
gateway.slack.interactive: trueand expose the Slack port withgateway.slack.ingress. Only that path is routed, never the agents’ port. - Optionally, limit who can decide with
gateway.slack.approvers.
Every click is checked against Slack’s signature and must be under five minutes old. The full walkthrough, with a Slack app manifest, is in Approving from Slack.