Skip to content

core: add AppInfo + extractAppInfo() to core/mcp/apps.ts #1556

Description

@cliffhall

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).

Metadata

Metadata

Assignees

Labels

v2Issues and PRs for v2

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions