Repository navigation
Conversation
MCP Apps hosts that declare io.modelcontextprotocol/ui now list the UI tools of the caller's imported MCP servers, read their ui:// resources through the caller's account, and send view calls through the normal invocation with approvals. Executor's own tools are model-only. Release-note: Feature: MCP clients that support MCP Apps now show the interactive views of imported MCP servers, with reads and calls made through your linked account.
A rendered view calls its server's tools by name, including tools without _meta.ui. Accept those calls, unlisted, when one app with UI tools has a tool of that name.
dnevzorov
marked this pull request as ready for review
November 27, 2026 15:57
Servers built for the OpenAI Apps SDK, such as Trello, also name the widget in openai/outputTemplate. Rewrite it like ui.resourceUri when it names the same resource.
A view cannot choose an account. The listed tool takes an optional executorAccount; without it, a call or widget read uses the account the caller last used with that app, else the first linked one.
Claude Code and Codex render MCP Apps from tool _meta but do not declare io.modelcontextprotocol/ui. X-Executor-MCP-Apps: 1 lists the UI tools for such a client; other clients keep the six tools.
This branch has not been deployed
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.
Renders upstream MCP Apps (SEP-1865) from imported remote MCP servers in MCP Apps hosts, as the issue linked below proposes. Before this, an imported server's tools worked through Executor, but its widget never reached the client:
_meta.uiwas not listed, and Executor did not proxyresources/read.Part of #2584 (not all of it; see the gaps below). It adds only the
ui://part of the upstreamresources/readthat #2603 proposes, and does not close that issue: noreadResourcecode-mode tool, noresource_linkreads, noresources/list.What it does
io.modelcontextprotocol/ui(mimeTypes: ["text/html;profile=mcp-app"]), because servers can omit_meta.uifor a client without it. The MCP catalog cache key moves tomcp-catalog-v4, so catalogs read before the change are read again once.tools/listadds each tool of the caller's apps that has_meta.ui, under its upstream name, so the rendered view can call it by that name._meta.ui.resourceUribecomesui://executor/<app slug>/<upstream path>.openai/outputTemplate(OpenAI Apps SDK servers, such as Trello) gets the same URI when it names the same resource.visibilityand other_metapass through unchanged; the host keepsvisibility: ["app"]tools away from the model. The upstreamoutputSchemais not listed, because Executor's describes the whole result object. A client without the extension still sees exactly the six Executor tools.resources/readonui://executor/<app>/…reads the upstream resource through the app's own connection and the caller's account. Contents,mimeTypeand_meta.ui(CSP, permissions,prefersBorder) are returned unchanged; onlyuriis rewritten. Only aui://resource that one of the app's listed tools declares is read. Any other URI is-32002and never reaches the upstream server._meta.uiis handled the same way._meta.ui. Those are accepted, but not listed, when exactly one app with UI tools has a tool of that name. Atools/callfor a UI tool runs ascalldoes: same catalog, accounts, policies and invocation. Destructive tools useaskapprovals (never the nativecallauto-accept). A client with form elicitation gets the approval prompt. A client without it gets anisErrorresult, and the pending interaction is discarded._meta.ui.visibility: ["model"].structuredContent. A view call puts one JSON text block back when that leavescontentempty, because MCP Apps hosts and models readcontent.How
apps/mcp:mcpClient.read(uri)sendsresources/readover the same connection, timeout and failure mapping ascall. EverymcpRouterresolves, but never lists, aresources/readoperation (mcpUiResourceTool). It reads only declaredui://URIs, so it is reached through the normal tool invocation, with accounts and approvals. MCP tool names have no/, so it never shadows an upstream tool.[email protected]addsMcpServer.toolCatalog({ list, call })andMcpServer.resourceCatalog({ read }), per-request hooks like the existingskillCatalog(patches/effect-mcp-request-catalogs.md).packages/telemetryrecords the newprovider.mcp.readspan name.packages/mcp/src/implementation/mcp-apps.tsimplements both catalogs overMcpBackend.accountRoutertools take{ accountId, input }; the UI tool is listed with the caller's one account's input schema and wraps the view's arguments.Security
visibility: ["model"]on Executor's tools keeps a view away fromexecuteandcallonly in hosts that enforcevisibility, as the spec requires.resources/readreads onlyui://URIs that the app's listed tools declare. The mcpRouter operation checks this again, so a direct REST call cannot read other resources either.Known gaps
_meta.uifails when two apps with UI tools both have a tool of that name.callorexecutereturn the data, but no widget.executorAccount. Without it, a call or a widget read uses the account the caller last used with that app (kept in memory per server process), else the first linked one. A view cannot pick an account itself.io.modelcontextprotocol/uionly when its host setsCLAUDE_CODE_MCP_APPS_HOST, and Codex 0.172 never declares it, although both render MCP Apps from tool_meta. Such a client opts in with the headerX-Executor-MCP-Apps: 1in its MCP server config. Without the extension or the header, a client keeps the six Executor tools.notifications/tools/list_changed. It is not sent when imports or accounts change. The host sees new UI tools on its nexttools/list._meta.uiis listed to an MCP Apps client. Some servers mark nearly all their tools: on one install, PostHog alone added about 80, and the list grew from 6 to 111 tools. Per-app control of which UI tools are listed may be worth adding.tools/listand each view call read the caller's catalog of every app. Cached catalogs are reused, and listing is bounded to 5 s, after which UI tools are left out with a warning.appsframework (such as beta.148) has noresources/readoperation, so its widgets list but do not load until it is redeployed with this framework.renameToolsapps are not handled.resources/readoperation, grants that restrict tools are checked only by the product's normalcallTool.bun run pr:checkand the description check do not run in the public mirror: it has nomainhistory and no.github/workflows.Tests
mcp-apps.spec.tsimports a sample upstream MCP App server in the shape Executor generates for an OAuth import (accountRouter+withApprovals+mcpRouter), with a key account. The server shows_meta.uionly to a client that declares the extension. The scenario checks that:X-Executor-MCP-Apps: 1lists the UI tools;show_boardand the app-onlymove_cardwith rewrittenresourceUriandvisibilitykept;_metaunchanged;ui://URI is refused without an upstream request, through MCP and through the REST tool call;_meta.ui, reach upstream with the caller's token;executorAccount, an explicit choice is used, and the next view call and widget read reuse it;Tested locally on self-host with Node 24:
mcp-apps.spec.ts, plus 10 neighbor scenarios inmcp-direct-calls,mcp-catalog,mcp-skills-extension,mcp-protocol-versionsandmcp-tool-input(all pass).bun run e2e:effect-mcp(6 pass) andbun run check(19 steps) pass. The Rust telemetry collector was not built (no cargo here).Also checked by hand on a self-host install running this branch, with real imported apps: in T3 Code, both a Claude session and a Codex session (Codex sending
X-Executor-MCP-Apps: 1) listed the Trello and Superhuman UI tools, and directtrelloReadCardandget_draftcalls returned data. An MCP Apps client read Trello's 679 KB widget throughui://executor/trello/widget/trello-widget.htmlwith its CSP intact. After redeploying 19 imported MCP apps on this framework, an MCP Apps client listed 127 tools and read all 45 of their widgets (Trello, Superhuman, Atlassian, Datadog, Clerk, CodeRabbit, Fastmail, PostHog), and T3 Code rendered Datadog's dataviz widget from a call through Executor.