Skip to content

Conversation

@idosal
Copy link
Contributor

@idosal idosal commented May 16, 2025

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).

image

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-ui library is covered by unit tests.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Follows up on https://github.com/orgs/modelcontextprotocol/discussions/287#discussioncomment-13019812

@idosal
Copy link
Contributor Author

idosal commented May 17, 2025

Formatting changes made it look a little bigger than what it is. As far as code changes go:

(item.resource?.mimeType === "text/html" ? (
                    <HtmlResource
                      resource={item.resource}
                      style={{ minHeight: "500px" }}
                    />

@AdirD
Copy link

AdirD commented May 17, 2025

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.

@evalstate
Copy link
Member

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!

@evalstate evalstate closed this May 19, 2025
@idosal
Copy link
Contributor Author

idosal commented May 20, 2025

Thanks @evalstate. I forked it to ui-inspector. I hope we'll be able to merge it back soon!

@kentcdodds
Copy link
Contributor

I think this was the right call, but I just want to encourage @idosal here. Awesome work!

@cliffhall
Copy link
Member

cliffhall commented Jan 26, 2026

Bringing this full circle, #1044 adds MCP Apps support to the Inspector a day after it became the official first MCP Extension. @idosal really had great vision here and in less than a year managed to get both OpenAI (with its Apps SDK) and MCP deeply invested in that vision. Kudos, sir. 🫡

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.

5 participants