Skip to content

Conversation

@liady
Copy link
Collaborator

@liady liady commented Dec 18, 2025

This PR fixes the type of ui/message content from MCP Apps bridge to be ContentBlock[] (see discussion here )

There are lint fixes here (since we moved to eslint@9).
The actual content block fixes are two lines in adapter-runtime.js: https://github.com/MCP-UI-Org/mcp-ui/pull/166/changes#diff-dfbf3818886f740fd71a692dd96cf29550a2ff6c98b62670d7edf302f9bd608fL536-R578

aharvard added a commit to block/goose that referenced this pull request Jan 16, 2026
The MCP Apps draft spec (SEP-1865) has been in flux regarding the
ui/message params.content type. After discussion with the spec authors,
the agreed format is ContentBlock[] (array of content blocks) rather
than a single ContentBlock object.

This change:
- Updates McpMethodParams['ui/message'] to expect content as ContentBlock[]
- Adds ContentBlock type supporting text, image, and resource blocks
- Updates the handler to extract text from the first text block in the array
- Returns empty object {} on success per the spec

Related spec discussions:
- modelcontextprotocol/ext-apps#48
- modelcontextprotocol/ext-apps#119
- MCP-UI-Org/mcp-ui#166
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.

3 participants