Summary
Add a machine-readable app summary to core/mcp/apps.ts: an AppInfo interface plus an extractAppInfo() function that merges a tool's _meta.ui (resourceUri, visibility) with the linked resource's _meta.ui (csp, permissions, domain, prefersBorder), so any client can report an MCP App's security posture without rendering it.
Why
Shared plumbing for the programmatic-review path. The CLI --app-info mode (follow-up issue) and integration tests need one canonical answer to "does this tool have an app, and what does it ask for?" — today that logic doesn't exist outside the web renderer.
Reference implementation (PR #1510)
Re-implement informed by these changes at 33fac3f:
Depends on
Nothing — Wave 1 foundation, parallel-safe. Unblocks the mcp_app_demo test-server preset and CLI --app-info.
Notes
- Coverage gate: ≥90 on all four dimensions for
core/mcp/apps.ts (measured by the web suite; test at clients/web/src/test/core/apps.test.ts).
- No
any types — the PR's version uses concrete interfaces; keep that.
Part of the PR #1510 decomposition (see tracking issue).
Summary
Add a machine-readable app summary to
core/mcp/apps.ts: anAppInfointerface plus anextractAppInfo()function that merges a tool's_meta.ui(resourceUri, visibility) with the linked resource's_meta.ui(csp, permissions, domain, prefersBorder), so any client can report an MCP App's security posture without rendering it.Why
Shared plumbing for the programmatic-review path. The CLI
--app-infomode (follow-up issue) and integration tests need one canonical answer to "does this tool have an app, and what does it ask for?" — today that logic doesn't exist outside the web renderer.Reference implementation (PR #1510)
Re-implement informed by these changes at
33fac3f:AppInfointerface,extractAppInfo(), helpersreadUiMeta(),normalizeResourceUri(),findResourceContent()(+123 lines)Depends on
Nothing — Wave 1 foundation, parallel-safe. Unblocks the
mcp_app_demotest-server preset and CLI--app-info.Notes
core/mcp/apps.ts(measured by the web suite; test atclients/web/src/test/core/apps.test.ts).anytypes — the PR's version uses concrete interfaces; keep that.Part of the PR #1510 decomposition (see tracking issue).