openwork icon indicating copy to clipboard operation
openwork copied to clipboard

[Bug]: MCP App tile fails with MCP_APP_RESOURCE_RESOLUTION_FAILED (unsupported_resource_permissions)

Open lucad87 opened this issue 2 months ago • 2 comments

Summary

An MCP App exposed by an OpenWork Cloud Connector never renders inline in the desktop chat. The host attempts the render but fails at resource-resolution with MCP_APP_RESOURCE_RESOLUTION_FAILED / unsupported_resource_permissions, because the app's HTML resource declares the _meta.ui.domain field (a dedicated sandbox origin), which OpenWork rejects per its documented rules. The normal tool result (raw JSON) is shown instead of the App tile.

To Reproduce

  1. In the OpenWork Cloud dashboard, add a Connector with Server URL https://mcp.draw.io/mcp (no authentication). "Test tools" passes.
  2. In desktop chat, ask the agent to call the connector tool create_diagram with {"mermaid": "flowchart TD\n A[Test] --> B[OK]"}.
  3. Observe the chat: no App tile is rendered.

Expected behavior

The MCP App tile renders inline in the chat, as documented in cloud/share-with-your-team/dashboards.mdx ("You can test it in chat first: ask the agent to call get_budget, and the tile renders inline").

Actual behavior

An error card is shown instead of the tile:

Interactive view unavailable. The normal tool result is still available. This OpenWork host slice does not grant device permissions or dedicated sandbox origins.

Code: MCP_APP_RESOURCE_RESOLUTION_FAILED Cause code: unsupported_resource_permissions Stage: resource-resolution Tool: drawio_create_diagram

Root cause verified server-side: resources/read on ui://drawio/mcp-app.html returns _meta.ui containing "domain": "5604f724840cf26674b8350fa1891c47.claudemcpcontent.com" (plus csp.resourceDomains / connectDomains, all HTTPS, within the 16-origin limit). Per the same docs page, OpenWork "rejects a resource containing either" permissions or domain — draw.io's official MCP App declares domain, so its tile can never render in OpenWork as-is.

Environment: OpenWork Desktop 0.18.49, Windows 11. Reproduced on 0.18.46 and 0.18.49 (after update and full restart). Everything else is compliant: the connector is registered as kind mcp_app, the tool passes the documented requirements (ui:// resourceUri, readOnlyHint, text/html;profile=mcp-app over HTTPS), and execute_capability succeeds — only the App UI resolution fails.

Possible fixes: support the domain field (dedicated sandbox origins), or coordinate with draw.io to omit it.

Screenshots (optional)

Image

OW version & Desktop info (optional)

0.18.46 and 0.18.49

Additional context (optional)

No response

lucad87 avatar Sep 22 '26 10:09 lucad87

Owner: @reachjalil — most commits on the touched files (Jalil 27, Omar 0)

What was reported

  • OpenWork Desktop 0.18.46 and 0.18.49 on Windows 11, reproduced after updating and fully restarting.
  • An OpenWork Cloud Connector points at the public draw.io MCP server (https://mcp.draw.io/mcp) with no authentication, and "Test tools" passes. When the desktop agent calls create_diagram, no App tile renders.
  • The error card shows: This OpenWork host slice does not grant device permissions or dedicated sandbox origins., Code: MCP_APP_RESOURCE_RESOLUTION_FAILED, Cause code: unsupported_resource_permissions, Stage: resource-resolution, Tool: drawio_create_diagram.
  • The reporter checked the server side: resources/read on ui://drawio/mcp-app.html returns _meta.ui.domain (a dedicated sandbox origin) plus HTTPS csp.resourceDomains/connectDomains within the 16-origin limit. They say everything else meets the requirements (kind mcp_app, ui:// resourceUri, text/html;profile=mcp-app, and execute_capability succeeds).
  • The reporter lists two options: support domain, or ask draw.io to omit it.

Where this lives in the code (dev @ e7d03dd43)

  • apps/server/src/mcp-app-host.ts:288-298: resourcePresentationMeta throws unsupported_resource_permissions with the exact reported message when _meta.ui.permissions has any key or _meta.ui.domain is defined. This matches the report: any resource that declares domain is rejected.
  • The same check runs on every resolution path:
    • readAppResource (:143-147), used by resolveConnectMcpAppResource (:848-915, the Cloud/Connect path)
    • resolveMcpAppResource (:814)
    • resolveSameServerMcpAppResource (:972)
  • packages/docs/cloud/share-with-your-team/dashboards.mdx:99 documents that permissions and domain are not supported and that OpenWork rejects a resource containing either. :216 is the "tile renders inline" sentence the reporter quotes.
  • apps/app/src/components/chat/mcp-app-frame.tsx:92 lists unsupported_resource_permissions as an actionable code, so the error card is shown. apps/app/src/react-app/domains/dashboard/mcp-app-tile.tsx:160 also handles this code for dashboard tiles.
  • No other code in apps/server/src, ee/apps/den-api/src or packages/*/src reads ui.domain.

How it fits

  • Area: MCP Apps host (desktop inline Apps and dashboard tiles) for Cloud Connector Apps.
  • Clusters:
    • MCP Apps resource-resolution failures, with #5055 (invalid_resource_csp) and #5102 (mcp_unreachable).
    • External MCP servers that reporters say work in other clients, with #5055, #5472 and #5514.
  • The permissions/domain rejection was added in #3700 (merged). No open or merged PR mentioning #5216 was found. Open PR #5515 (WebSocket CSP origins) changes the same file but not this check.

Not yet confirmed

  • I did not fetch the draw.io resource myself. The _meta.ui.domain value and its shape come from the report.
  • The report does not say whether the draw.io App renders in other hosts that support domain.

benjaminshafii avatar Oct 07 '26 05:10 benjaminshafii

Same failure on OpenWork 0.18.58 (Linux/Fedora 44) with the Excalidraw MCP App (https://mcp.excalidraw.com/mcp): MCP_APP_RESOURCE_RESOLUTION_FAILED / unsupported_resource_permissions, stage resource-resolution, message "This OpenWork host slice does not grant device permissions or dedicated sandbox origins."

Cause: the resource ui://excalidraw/mcp-app.html declares _meta.ui.permissions = {"clipboardWrite": {}}. tldraw's app fails too (declares its own domain/permissions).

aledl79 avatar Nov 04 '26 20:11 aledl79