№ 0899Skill
On-call toolkit for Muse Code via Kong AI Gateway
Demo that turns an ops REST API into eight MCP tools for Muse Code through Kong AI Gateway 2.0, with per-identity tool ACLs so an investigator can diagnose but only an operator can roll back.
On-call toolkit for Muse Code, gated by Kong AI Gateway
A working demo for the post Give Muse Code an On-Call Toolkit with Kong.
An ops REST API is converted into eight MCP tools by Kong AI Gateway 2.0.
Two identities get two different toolsets. An investigator can diagnose a
production incident and open an incident record, but cannot roll back a
deployment. An operator can. The refusal happens at the gateway, and both the
allow and the deny are recorded in an audit log.
Layout
oncall-gateway.yaml 8 tools, 2 identities, per-tool ACLs, http-log
ops-api/opsapi.py mock ops API, seeds a live incident on start
ops-api/auditsink.py receives Kong's http-log, renders ACL decisions
proof/verify.py 16 assertions, no model in the loop
muse/settings.*.json Muse MCP config per identity
stack.sh bring Docker + containers + python services up
demo.sh up | verify | muse-config | reset | down
keepalive.sh keeps Docker Desktop's VM from idling out
.env gateway id, region, generated keys
Prerequisites
- A Kong Konnect AI Gateway (hybrid) with a running data plane on
:8000 kongctlauthenticated:kongctl login- Python 3.10+
- Muse Code, only for the two agent runs:
curl -fsSL https://dev.meta.ai/install.sh | sh
Run it
set -a; source .env; set +a
./stack.sh # docker daemon, containers, ops API, audit sink
./demo.sh up # apply the gateway config
./demo.sh verify # 16/16, proves the access model without Muse
verify.py is the one to run while iterating. It speaks the MCP handshake
directly, so it costs nothing and catches every configuration mistake.
For the agent runs:
./demo.sh muse-config # writes per-identity configs, prints the commands
Test the wiring for free before spending a model call:
XDG_CONFIG_HOME=/tmp/muse-investigator muse exec --provider echo "ping"
The echo provider starts a session and connects every mode: required MCP
server, but never calls the model.
What verify.py asserts
anonymous 401, no tool list
investigator 7 tools; rollback-deployment absent from tools/list;
403 if called anyway; create-incident succeeds
operator 8 tools; rollback-deployment com



