MCP app widget resource cannot be read: resources/read fails for the ui:// template
A widget tool points at a resource the server cannot return. Register the exact URI from _meta.ui.resourceUri so resources/read returns the HTML.
Register the resource at the exact URI named in the tool's _meta.ui.resourceUri (or openai/outputTemplate) so that resources/read returns the HTML. The rule apps.template-missing is a blocker for ChatGPT and Claude.
What you see
- A scan reports
apps.template-missingwith the URI and the failure: "resources/read failed (<reason>)". - In a client, the tool may run but no widget appears. The exact client behaviour is not verified here.
Why it happens
The scan lists tools, collects every template URI that a tool references (plus any ui:// resource in resources/list), then calls resources/read on each. The read fails when:
- The URI in the tool metadata differs from the registered one by a character, version suffix or trailing slash.
- The server does not serve
resources/readat all (no resource handler registered). Whether a missingresourcescapability alone causes this is not verified here. - The resource handler throws, for example because a build artefact is not bundled into the deployed function.
- Authentication blocks
resources/readwhiletools/listworks.
OpenAI's UI guide treats the template URI as a cache key: to ship a new version you publish a new URI and update every tool that references it. A rename on one side but not the other produces this error.
Check it yourself
curl -s -X POST https://mcp.acme.example/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H "Authorization: Bearer $TOKEN" \
-d '{"jsonrpc":"2.0","id":1,"method":"resources/read","params":{"uri":"ui://widget/orders.html"}}' | jq '.result.contents[0] | {uri, mimeType, bytes: (.text | length)}'
Use the URI from the tool's _meta. An error or an empty body confirms the problem. Compare it with tools/list: jq '.result.tools[] | {name, ui: ._meta.ui}'.
Fix
- Copy the URI from the tool metadata into the resource registration, or the reverse. They must be identical.
- Register a resource handler, and declare the
resourcescapability so clients that check it will look. - Make sure the HTML is included in the deployment bundle and read at request time from that location.
- Serve
resources/readwith the same authentication astools/list.
Verify
The curl call returns HTML and mimeType text/html;profile=mcp-app. Re-scan. Then check apps.mime-type and apps.csp-missing.
Which clients care
ChatGPT and Claude, per the rule.
Source
OpenAI UI guide: https://developers.openai.com/plugins/build/chatgpt-ui
Run a free scan at https://mcpshipyard.com/scan to check every rule at once.
Check every rule at once
A free scan runs this check and the other 152 against your live URL.