anthropics / anthropics/claude-ai-mcp
MCP Apps UI never renders in Claude Desktop — iframe handshake not initiated after tool call
- Dominant language
- No language data
- Stars
- 471
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
### What happened?
After a tool with `_meta.ui.resourceUri` is called, Claude Desktop fetches the registered UI resource at initialization time (via `resources/read`) and the tool call returns successfully, but no iframe is ever created and the MCP Apps UI handshake (`ui/initialize` → `ui/notifications/initialized`) never occurs. The container stays hidden indefinitely.
Extensive logging in the UI app confirms that `app.connect()` hangs — the app sends `ui/initialize` via postMessage but receives no response from the host. No iframe-side activity is ever observed in MCP server logs after the tool call completes.
### What did you expect to happen?
After a successful tool call, Claude Desktop should render the registered HTML resource in a sandboxed iframe and complete the MCP Apps handshake, making the UI visible inline in the conversation.
### Steps to reproduce
1. Create an MCP server using @modelcontextprotocol/ext-apps v1.1.2 with registerAppTool and registerAppResource (stdio transport)
2. Register a minimal tool with _meta: { ui: { resourceUri: 'ui://test/mcp-app.html' } }
3. Register the corresponding resource serving HTML that calls app.connect()
4. Add the server to Claude Desktop via claude_desktop_config.json
5. Ask Claude to call the tool
Observed: Tool executes, resource is fetched at init, no UI appears. app.connect() hangs. MCP server log confirms: resources/read succeeds, tools/call succeeds, zero MCP messages after that.
### Area
Tool Discovery / Invocation
### MCP Server (if applicable)
Custom server using @modelcontextprotocol/ext-apps v1.1.2, @modelcontextprotocol/sdk v1.29.0, stdio transport
### Error messages or logs
```shell
No errors. Post tool-call MCP log is silent — no follow-up messages of any kind.
```
### Additional context
- Claude Desktop version: 1.1617.0 (8d6345), 2026-04-09
- macOS
- Claude Desktop correctly advertises MCP Apps capability during initialize: `"extensions":{"io.modelcontextprotocol/ui":{"mimeTypes":["text/html;profile=mcp-app"]}}`
- Claude Desktop correctly calls `resources/read` for registered UI resources
- Same implementation pattern as official `ext-apps` quickstart example
- Related: anthropics/claude-ai-mcp#149 (different root cause — that was HTTP transport; this is native stdio)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.