Cao MCP Apps
Agent Buildingcao-mcp-appsCao MCP Apps is an Agent Skill for agent building published in the awslabs/cli-agent-orchestrator repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Enable, operate, and extend CAO's MCP Apps surface — the sandboxed host-rendered fleet UI (SEP-1865) with the ui://cao/* views, the topology widget, the submit_command mutation choke point, SEP-2133 capability advertisement, and the default-off OAuth scope layer. Use whenever the user wants to turn on the MCP Apps UI, observe/steer a CAO fleet from inside an MCP App host (Claude / Claude Desktop, ChatGPT, VS Code GitHub Copilot, Microsoft 365 Copilot, Goose, Postman, MCPJam, Archestra.AI), debug why the views don't render, build the frontend bundles, or extend the surface (new view, tool, or command kind).
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/awslabs/cli-agent-orchestrator/blob/HEAD/skills/cao-mcp-apps/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/cao-mcp-apps, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
CAO MCP Apps
Operator + developer playbook for CAO's host-rendered fleet UI. Reference docs:
docs/mcp-apps.md; example: examples/mcp-apps/.
Authoritative spec & sources of truth:
MCP Apps Overview ·
Build an MCP App ·
capability negotiation ·
client matrix ·
stable spec 2026-01-26/apps.mdx
(SEP-1865, Status: Stable) ·
SDK @modelcontextprotocol/ext-apps v1.7.4
(API ref ·
repo) ·
provenance PR #1865.
Turn it on
The surface is default-off. Enable and run:
export CAO_MCP_APPS_ENABLED=true
uv run cao-server # :9889 (REST + SSE /events)
uv run cao-mcp-server # registers tools/resources via the mcp_apps plugin
It is packaged as the built-in mcp_apps plugin (cao.plugins entry-point). The
plugin's on_mcp_server hook registers the ui://cao/* resources, the five app
tools, the topology widget, and advertises the io.modelcontextprotocol/ui
capability — best-effort and default-off, so nothing changes when the flag is unset.
What the operator gets
ui://cao/dashboard— fleet overview + the mutation entry point.ui://cao/agent— one terminal's status, output tail, inbox, sub-agents.ui://cao/event-stream— live governance ticker (app-only).cao://widget/topology+/widgets/topology/— build-free live event view.
All mutations flow through submit_command(kind, payload) — kinds:
send_message, assign, create_session (standard); interrupt, pause,
resume (lifecycle); shutdown_session (destructive).
Full capability scope (what the views use)
Beyond tools/call, the views exercise the spec's bidirectional channel:
- Host-delegated open-link (
ui/open-link) — the dashboard shows "Open full Web UI ↗" →http://127.0.0.1:9889only when the host advertiseshostCapabilities.openLinks(gate onapp.canOpenLinks(); the sandbox forbidswindow.open). - Display modes (
ui/request-display-mode) — views declareavailableDisplayModes: ["inline","fullscreen"]atui/initialize. - Streamed tool input (
ui/notifications/tool-input/-partial) — render before the result lands. - Model-context notes (
ui/update-model-context) — body-free gesture summaries keep the agent aware without leaking message contents.
preferredFrameSize and requiredScopes are CAO additions, not spec
_meta.ui fields (the spec sizes via containerDimensions +
ui/notifications/size-changed); CAO requests no elevated permissions.
Troubleshooting
- Host doesn't offer the views → confirm
CAO_MCP_APPS_ENABLED=trueand thatinitializeadvertisesio.modelcontextprotocol/ui(the host must speak SEP-1865). Non-SEP-1865 hosts still get text-only tool results. - Views are blank / fail to load → the React bundles aren't built. Run
cd cao_mcp_apps && npm ci && npm run build:all. The topology widget needs no build and is the quickest smoke test (curl /widgets/topology/topology.html). - Mutations rejected with 403 → the auth layer is enabled and the token lacks
cao:write/cao:admin(cao:adminfordelete_session). UnsetAUTH0_DOMAIN/CAO_AUTH_JWKS_URIto disable enforcement. - Events don't stream → check
GET /events(SSE) directly; the bus is drop-on-slow, so a stalled consumer silently loses events — re-hydrate viacao_fetch_history.
Extending the surface
- Building or migrating an MCP App? Load the
mcp-apps-builderskill first. It equips the official ext-apps Agent Skills (create-mcp-app,add-app-to-server,migrate-oai-app,convert-web-app) and the build guide. Useadd-app-to-serverwhen adding a newui://cao/<name>view. - New command kind → add it to
submit_command's classifier + router inmcp_server/app_tools.py(map to a real Backplane HTTP endpoint; never bypass the HTTP-only boundary) and to the scope pre-check. - New view → add a
ui://cao/<name>resource inext_apps/apps.py+ an entry point undercao_mcp_apps/, build it, and tag the rendering tool withui_meta(...). - New host-delegated action → add a thin method on the
McpAppbridge (cao_mcp_apps/src/shared/mcpApp.ts) that issues the specui/*request (e.g.openLink→ui/open-link,requestDisplayMode→ui/request-display-mode); gate UI on the matchinghostCapabilitiesflag and cover it with amockHosttest. - Keep the boundary →
mcp_server/*must reach state only over HTTP; the AST guard test (test/test_http_only_boundary.py) enforces it. - Keep bundles JIT-free → no
eval/new Function(host CSP forbids it); the CI scan fails the build otherwise.