-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: mcp UI sidecar (WIP) #4268
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
|
ok looks interesting, testing it out:
I wasn't able to close it (top right) and think need to think about the flow for if you want things always in sidecar, or not, vs case by case. If a broke it out once - then it would't show the next visualisation until I clicked the breckout arrow again (which did work, but was confusing). @Kvadratni if you pull this, turn on autoviz and you can have an easy way to try this self contained that we should ensure it works coherently with cc @aharvard |
9cb8e97 to
c055607
Compare
|
864b61d
working on upgrading the resizing logic when the sidecar opens to reduce the visual glitching |
|
getting there! - at the moment it for me defaulted to showing it in the size car with autovisualiser - is that intended, and has a header that says "MCP-sidecar" which I assume we don't need? (and when I closed sidecar, it didn't put the visualisation back in the chat) |
|
@thisispete want to resolve that conflict so it is updated? (or I can if you like) |
|
(updated to main, hopefully is still ok) |
aharvard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if this PR suggests that all MCP-UI should be shown in a sidecar. I just want to make sure we're not assuming too much about what the MCP server author intended. Please let me know if I'm mistaken!
I would like to suggest that we consider using a configuration object that allows the MCP server author to decide where and how rendering occurs.
The MCP UI server SDK gives us a solution via uiMetadata. I pulled this metadata configuration example from mcpui.dev as an example:
// Example 8: Using uiMetadata for client-side configuration
const resourceWithUIMetadata = createUIResource({
uri: 'ui://chart/interactive',
content: { type: 'externalUrl', iframeUrl: 'https://charts.example.com/widget' },
encoding: 'text',
uiMetadata: {
'preferred-frame-size': ['800px', '600px'],
'initial-render-data': {
theme: 'dark',
chartType: 'bar',
dataSet: 'quarterly-sales'
},
}
});
console.log('Resource with UI metadata:', JSON.stringify(resourceWithUIMetadata, null, 2));
/* Output includes:
{
"type": "resource",
"resource": {
"uri": "ui://chart/interactive",
"mimeType": "text/uri-list",
"text": "https://charts.example.com/widget",
"_meta": {
"mcpui.dev/ui-preferred-frame-size": ["800px", "600px"],
"mcpui.dev/ui-initial-render-data": {
"theme": "dark",
"chartType": "bar",
"dataSet": "quarterly-sales"
},
}
}
}
*/Stuff that gets added to uiMetadata will get processed by the SDK. It will get prefixed with mcpui.dev/ui- and placed in the embedded resources _meta field.
So I think the best plan for this work is for us to look up the value of some resource._meta.mcpui.dev/ui-<WE-NEED-TO-LAND-A-PROP-NAME-FOR-GOOSE> and then conditionally render the MCP UI inline or in a sidecar.
Now, what do we want MCP server authors to provide under uiMetadata?
uiMetadata.preferred-frame-location: "sidecard" | "inline"uiMetadata.initial-render-data.location: "sidecard" | "inline"
FYI - The Rust SDK (RMCP) fails to return _meta currently. We will need to fix that upstream before this PR can land, leveraging a _meta approach.
@michaelneale, as the author of the autovisualiser tool, I assume that you get to own where the MCP UI should render. What's your take? Only show inline? Only show in sidecar? Show inline but allow user to "cast" into sidecar and back to inline? (Generally speaking, I think Goose needs to defer to tool authors and not assume too much.) |
|
@aharvard about the prop name -
So maybe createUIResource({
...
metadata: {
'preferred-flow-location': 'inline' | 'persistent'
}
})? |
|
@aharvard sidecar! I would pick that. |
|
modelcontextprotocol/rust-sdk#386 was merged yesterday and should fix the issue where Goose would not pass After the next RMCP release, we should be able to update Goose and get inline/sidecar positioning preference from servers. In the meantime, we need to land the property name we want to look for and document for server authors to manage rendering position. |
|
per @liady, let's assume servers should createUIResource({
...
metadata: {
'some-goose-property-name': 'some-value'
}
})We'll then be able to pull from |
|
As soon as #4523 merges, @michaelneale and I discussed strategy around property naming as it relates to whether MCP UI should appear {
"type": "resource",
"resource": {
"uri": "ui://mcp-aharvard/weather-card",
"mimeType": "text/html",
"text": "<style>body { background: black; color: white; }</style><div>UI metadata demo</div>",
"_meta": {
"target": "sidecar"
}
}
}Proposal
Goose can default to Alternative Idea@liady @idosal — we could add a new |
…le toolcall card; sidecar toggle logic
…ing; sidecar toggle logic
7a44668 to
1bfff0f
Compare
I agree, Goose namespacing sounds too limiting. The proposal to place a generic layout hint prop under Regarding the alternative - we need to give more thought to what the |
|
@aharvard in addition - recall that originally we had a In a 3rd party scenario (which can be the common one) - the server doesn't have any information about the client, so we'd probably want to keep the terms as generic as possible. So we need to find a way to answer these two slightly different needs -
|
|
housekeeping: converting to draft just a signal to know when I should take a harder run at it (when you think it is ready please to change status) |
|
hey @Kvadratni @aharvard might close this for now - can we move this to a discussion pointing to this branch until ready? Open again when ready to go or have time (I don't at the moment) |

Add MCP UI sidecar panel for interactive tool interfaces
This PR introduces a collapsible sidecar panel that displays MCP UI resources alongside the main chat interface. When tools return UI resources (like forms, visualizations, or interactive components), users can open them in a dedicated side panel for better interaction.
Key Features:
Technical Implementation:
mcp-ui-sidecar-compressed.mp4