Summary
Implement support for MCP Apps — the official MCP extension (spec version 2026-01-26) that enables tools to return interactive UI components rendered in sandboxed iframes by MCP hosts.
This will allow the kubernetes-mcp-server to provide rich, interactive experiences such as:
- Interactive resource tables with sorting, filtering, and actions
- Visual dashboards for cluster metrics and status
- Forms for resource creation/editing
- Topology visualizations for workloads and networking
This is an opt-in feature, disabled by default, controlled by the apps_enabled configuration flag / --apps CLI flag.
Background
MCP Apps extend the Model Context Protocol by letting tools declare UI resources:
- Tool definition — Tools declare a
_meta.ui.resourceUri field pointing to a ui:// resource
- Tool call — LLM invokes the tool on the server
- Host renders — Host fetches the HTML resource via
resources/read and displays it in a sandboxed iframe
- Bidirectional communication — Host passes tool data via
postMessage notifications; UI can call other server tools via JSON-RPC over postMessage
Supported hosts: VS Code (Insiders + Stable), Claude (web/desktop), ChatGPT, Goose, Postman, MCPJam.
References
Research and Implementation Plan
Detailed research document with all findings, architectural decisions, and implementation guidance:
docs/mcp-apps-research.md (on branch feat/mcp-apps)
Key decisions
| Decision |
Choice |
Rationale |
| Opt-in |
apps_enabled config / --apps CLI |
Zero overhead when disabled |
| Frontend |
Preact + HTM + Signals-core (~19 KB) |
Smaller than Alpine.js, component model fits widgets |
| Build step |
None |
Libraries inlined in HTML |
| ext-apps SDK |
Not used — protocol implemented directly |
SDK is 314 KB. Protocol is ~100 lines |
| Airgap support |
Vendored JS committed to repo |
make vendor-js for updates |
| HTML |
Single generic viewer |
Adapts per tool via hostContext.toolInfo.tool.name |
| Meta injection |
Centralized in registerTool() |
No changes to individual toolset files |
Acceptance Criteria
Summary
Implement support for MCP Apps — the official MCP extension (spec version 2026-01-26) that enables tools to return interactive UI components rendered in sandboxed iframes by MCP hosts.
This will allow the kubernetes-mcp-server to provide rich, interactive experiences such as:
This is an opt-in feature, disabled by default, controlled by the
apps_enabledconfiguration flag /--appsCLI flag.Background
MCP Apps extend the Model Context Protocol by letting tools declare UI resources:
_meta.ui.resourceUrifield pointing to aui://resourceresources/readand displays it in a sandboxed iframepostMessagenotifications; UI can call other server tools via JSON-RPC overpostMessageSupported hosts: VS Code (Insiders + Stable), Claude (web/desktop), ChatGPT, Goose, Postman, MCPJam.
References
Research and Implementation Plan
Detailed research document with all findings, architectural decisions, and implementation guidance:
docs/mcp-apps-research.md(on branchfeat/mcp-apps)Key decisions
apps_enabledconfig /--appsCLImake vendor-jsfor updateshostContext.toolInfo.tool.nameregisterTool()Acceptance Criteria
apps_enabledconfig /--appsflag (disabled by default)apps_enabled = false