feat(mcp): add support for MCP Apps#15041
Merged
Merged
Conversation
lgrammel
reviewed
May 7, 2026
| @@ -0,0 +1,101 @@ | |||
| import { useEffect, useState } from 'react'; | |||
Collaborator
There was a problem hiding this comment.
files name are not conform to our standard
Collaborator
There was a problem hiding this comment.
also what would be the best possible name for this class?
Collaborator
Author
There was a problem hiding this comment.
hmm i thought MCPAppRenderer might be appropriate since it's only specific to that for now
Collaborator
There was a problem hiding this comment.
then shouldnt this be mcp-app-renderer.tsx
lgrammel
reviewed
May 7, 2026
lgrammel
reviewed
May 7, 2026
lgrammel
reviewed
May 7, 2026
gr2m
approved these changes
May 7, 2026
Contributor
|
🚀 Published in:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
#12053
#11651
The MCP spec allows connecting hosts to MCP apps (which offer a specialised UI along with tool calls) https://apps.extensions.modelcontextprotocol.io/api/index.html
Summary
mcp-client.tsin the example creates a client withmcpAppClientCapabilities. That capability is added inpackages/mcp/src/tool/mcp-apps.tsclient.listTools(), thensplitMCPAppTools(), then passes only modelVisible tools to streamText. This keeps app-only tools away from the modelpackages/mcp/src/tool/mcp-client.tsnow preserves MCP App metadata on converted AI SDK tools undermetadata.mcp.apppage.tsxpasses tool UI parts toMCPAppRenderer. The renderer reads part.callProviderMetadata.mcp.app, loads the resource through the host route, then renders it via a sandbox iframepackages/react/src/mcp-apps/bridge.tshandles ui/initialize, tool input/result notifications, tools/call, resources/read, display mode requests, logs etc. this exists for the host to communicate with the mcp serverManual Verification
http://localhost:3000/chat/mcp-appsChecklist
pnpm changesetin the project root)Related Issues
fixes #11651 and #12053