Skip to content

feat: add MCP Apps extension (io.modelcontextprotocol/ui) support#281

Draft
chr-hertel wants to merge 1 commit intomainfrom
feat/mcp-apps-extension
Draft

feat: add MCP Apps extension (io.modelcontextprotocol/ui) support#281
chr-hertel wants to merge 1 commit intomainfrom
feat/mcp-apps-extension

Conversation

@chr-hertel
Copy link
Copy Markdown
Member

Summary

  • Add typed schema classes under Mcp\Schema\Extension\Apps\ for the MCP Apps extension (io.modelcontextprotocol/ui, spec 2026-01-26)
  • Add extensions field to both ServerCapabilities and ClientCapabilities for extension negotiation
  • Add ToolVisibility enum (model/app)
  • Add weather dashboard example in examples/server/mcp-apps/ demonstrating UI resources and tool-UI linkage
  • Add 34 new tests covering all schema classes, serialization, and capabilities backward compatibility

Details

The MCP Apps extension enables servers to expose interactive HTML UI applications as MCP resources. This PR adds server-side support:

  • Schema classes: McpApps (constants/helpers), UiResourceCsp, UiResourcePermissions, UiResourceContentMeta, UiToolMeta — all with fromArray()/jsonSerialize() and toMetaArray() helpers for embedding in _meta
  • Capabilities: extensions parameter on both capability classes (backward-compatible, defaults to null)
  • No new JSON-RPC methods — the extension uses existing resources/list, resources/read, tools/list, tools/call
  • Out of scope: View-Host protocol (ui/initialize, ui/open-link, etc.) which runs between the rendered HTML and the host application

Test plan

  • make cs — coding standards pass
  • make phpstan — static analysis passes (0 errors)
  • make unit-tests — all 754 tests pass (34 new)
  • Manual: npx @modelcontextprotocol/inspector php examples/server/mcp-apps/server.php

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant