-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: support UI in Tool responses #413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Formatting changes made it look a little bigger than what it is. As far as code changes go: |
|
This UI integration is a huge and necessary step forward. Before this, building any meaningful interactive flow with MCP meant hand-rolling custom DSLs (like JSONSchema-based forms) or hacking in notification systems. It was rigid, hard to expand, and required duplicating logic across tools and frontends just to support basic user input or feedback. The idea introduced by this PR changes that. By embedding UI components directly in tool responses, agents can finally guide users through complex flows, forms, tables, buttons, toasts, natively, without breaking the MCP contract. Excited to adopt this, an huge thanks for pushing it forward. |
|
Thanks for this PR. We're excited about the direction you are taking this project, and looking forward to seeing how it develops over the coming weeks. Right now, the Inspector is focussed on the core MCP libraries and primitives so we won't be merging this change at this time. We encourage you to maintain a fork, and if you have any ideas on how this (and other URI schemes/libraries) could be implemented as a secure plugin architecture we'd love to know! |
|
Thanks @evalstate. I forked it to |
|
I think this was the right call, but I just want to encourage @idosal here. Awesome work! |
This PR adds support for UI components using the mcp-ui library. Under the hood, the SDK enables any MCP server to respond with an Embedded Resource with a "ui://" or "ui-app://" URI. The client SDK allows the Inspector to render it in a supported method (currently raw HTML or external app). More methods will be added in the coming days (RSC and other options were suggested).
Motivation and Context
Currently, AI interactions are limited to text, images, and audio. The UI approach enriches the experience with rich web functionality.
How Has This Been Tested?
Tested manually with
https://remote-mcp-server-authless.idosalomon.workers.dev/mcp (HTTP Streaming). The
mcp-uilibrary is covered by unit tests.Breaking Changes
None.
Types of changes
Checklist
Additional context
Follows up on https://github.com/orgs/modelcontextprotocol/discussions/287#discussioncomment-13019812