name: mcpjam-ui-testing description: "This skill should be used when the user wants to validate an MCP-UI or MCP Apps implementation — checking widget rendering in the Inspector, verifying ui:// resource contracts, testing structuredContent, or running MCP Apps conformance checks. Triggers include: "why isn't my MCP widget rendering", "test my MCP-UI implementation", "check if my tool passes MCP Apps conformance", "verify the ui:// resource contract", "debug my Inspector view". Does not apply for general MCP tool smoke-testing (use mcporter for that)."
MCPJam UI Testing
Use this skill to prove an MCP-UI surface works at the protocol and rendered-widget layers. Prefer MCPJam CLI for deterministic checks, then MCPJam Inspector for visual/rendering behavior.
Workflow
Identify the target transport.
- HTTP: use
--url http://host:port/mcp. - stdio: use
--command <binary> --args <args...> --cwd <repo>. - If the server requires auth, include the MCPJam auth/header flags supported by the installed CLI version; run
mcpjam <command> --helpbefore guessing.
- HTTP: use
Run server health first.
mcpjam server doctor ...- Fix connectivity, auth, protocol version, or transport errors before testing UI.
Run app conformance.
mcpjam apps conformance ...- Treat failures here as contract bugs unless the CLI output clearly indicates an unsupported host/transport feature.
Manually verify the wire shape.
mcpjam tools list ...- UI-capable tools must advertise
_meta.ui.resourceUri. - The URI should be stable and use
ui://.... - Non-UI catch-all tools should not advertise UI metadata unless every call should render that UI.
Verify resource discovery and content.
mcpjam resources list ...mcpjam resources read --resource-uri ui://... ...- The UI resource must use
text/html;profile=mcp-app. resources/readshould return exactly one HTML text/blob payload for the referenced UI URI.- Resource
_meta.uishould declare CSP/permissions when the app needs them; prefer locked-down empty arrays/objects for self-contained widgets.
Verify the tool call payload.
mcpjam tools call --name <tool> --arguments '{}' ...- Prefer
structuredContentfor data the widget consumes. - Keep model-readable
contentuseful, but do not make the widget scrape human text when structured JSON is available.
Test rendering in Inspector.
- Start or open Inspector with
mcpjam inspector startormcpjam inspector open. - Then call the UI tool with the CLI's UI rendering flag if available (
mcpjam tools call ... --ui). - A pass means the Inspector reports/render-displays the app, not merely that
resources/readreturns HTML.
- Start or open Inspector with
Axon Pattern
For Axon, the expected UI contract is:
- UI tool:
axon_status_dashboard - UI resource:
ui://axon/status-dashboard - MIME type:
text/html;profile=mcp-app - Generic routed tool:
axonshould not carry dashboard UI metadata - Tool call:
axon_status_dashboardshould returnstructuredContentwith status payload data
Run focused checks:
mcpjam server doctor --url http://127.0.0.1:8001/mcp
mcpjam apps conformance --url http://127.0.0.1:8001/mcp
mcpjam tools list --url http://127.0.0.1:8001/mcp
mcpjam resources list --url http://127.0.0.1:8001/mcp
mcpjam resources read --url http://127.0.0.1:8001/mcp --resource-uri ui://axon/status-dashboard
mcpjam tools call --url http://127.0.0.1:8001/mcp --name axon_status_dashboard --arguments '{}'
For stdio Axon:
mcpjam server doctor --command ./target/debug/axon --args mcp --cwd /home/jmagar/workspace/axon
Debugging Failures
tools/listmissing_meta.ui.resourceUri: fix tool metadata, not resource serving.resources/listmissing the URI: register the UI resource.resources/readwrong MIME: settext/html;profile=mcp-appon the returned resource contents.- Conformance passes but UI does not render: use Inspector and check HTML runtime errors, sandbox/CSP metadata, and whether the tool result contains structured data.
- Inspector skipped/no active client: open/start Inspector first, then rerun
tools call --ui. - HTTP
406or SSE errors: ensure the client sendsAccept: application/json, text/event-stream; MCPJam normally handles this. - Auth errors: verify bearer/OAuth config before debugging UI.
References
Load references/commands.md when exact MCPJam commands or expected outputs are needed.