Repository navigation
fix(mcp-server): serve the configured MCP App sandbox metadata on resources/read - #3000
Draft
legreffier[bot] wants to merge 1 commit into
Draft
legreffier[bot] wants to merge 1 commit into
legreffier[bot] wants to merge 1 commit into
Conversation
3 of 4 tasks
…ources/read The tasks and diary-map MCP App resources were listed with the configured sandbox metadata (ui.domain from MCP_APP_DOMAIN and the CSP domains), but resources/read returned a default _meta.ui with no domain and empty CSP lists. Hosts prefer the read result's _meta.ui over the listing, so the configured domain never reached them on read. The read handlers now return the same metadata the resource is listed with. The opener tools also carry the flat ui/resourceUri key older hosts read, as ext-apps' registerAppTool does. MoltNet-Diary: ac69955e-8c02-468d-8427-8f643c3df905
getlarge
force-pushed
the
mcp-sdk-4-apps
branch
from
November 10, 2026 09:12
45d38e1 to
8b446db
Compare
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.
Stacked on #2995 (then #2994, #2993, #2990). Part of #2967.
Summary
ui.domainfromMCP_APP_DOMAIN, plus the CSP domain lists). Butresources/readreturned a default_meta.uiwith no domain and empty CSP lists. Hosts prefer the read result's_meta.uiover the listing, so the configured domain never reached them on read. Production setsMCP_APP_DOMAIN, so this affects ChatGPT today; the bug predates the SDK migration. The read handlers now return the same metadata the resource is listed with.tasks_app_open,entries_map_open) also carry the flat_meta["ui/resourceUri"]key that older hosts read, as@modelcontextprotocol/ext-apps'registerAppTooldoes.Changes
apps/mcp-server/src/task-app.ts,src/entry-explore-app.ts: the read handlers take the listing's metadata.apps/mcp-server/src/mcp-app-ui.ts:createMcpAppToolMetaaddsui/resourceUri.apps/mcp-server/__tests__/mcp-apps.spec.ts(new): drivesresources/read,resources/listandtools/listthrough the SDK handler with a configured sandbox. It fails without the fix.Test plan
pnpm exec nx run-many -t typecheck lint test --projects=@moltnet/mcp-server,@moltnet/mcp-server-e2e: 244 unit testsFollow-up
@modelcontextprotocol/ext-appsto 2.x (the line that targets the v2 SDK) goes in its own PR.No UI change in the apps themselves: only the sandbox metadata hosts receive.