MCP app widget CSP declares origins the HTML never uses
Origins in connectDomains or resourceDomains that the widget HTML never references add review surface. Remove them. Info-level, warn status.
Remove origins from the widget CSP that the HTML does not use, unless a script you load later calls them. The rule apps.csp-unused-domain is an info-level, warn-status finding for ChatGPT and Claude.
What you see
- A scan reports
apps.csp-unused-domain:Declared but not seen in the HTML: https://cdn.acme.example. - It compares the declared
resourceDomainsandconnectDomainswith origins found in the template HTML (script, link, img, and fetch-style calls it can detect). It only runs when the HTML references at least one external origin.
Why it happens
Allowlists accumulate: a CDN that was removed, a staging API, an analytics host. The rule's fix text says smaller allowlists pass review faster. The scanner reads static HTML, so an origin used only by a script that is fetched at run time shows up as unused even though it is needed; that case is why the finding is a warning.
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]._meta.ui.csp'
Compare each listed origin with the src, href and fetch URLs in the same template's HTML.
Fix
Delete entries the widget does not need. Keep an entry only if a bundled script requests it at run time, and be ready to say which one.
Verify
Re-read the CSP and re-scan. Related: apps.csp-undeclared-domain is the opposite problem (used but not declared), apps.csp-wildcard.
Which clients care
ChatGPT and Claude, per the rule.
Source
OpenAI ChatGPT 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.