MCP app widget CSP uses wildcards: list exact origins
Wildcards in connectDomains or resourceDomains weaken the sandbox and can fail review. List the exact origins your widget needs.
Replace wildcard entries in the widget CSP with exact origins. The rule apps.csp-wildcard is a major finding for ChatGPT and Claude. It fails when any connectDomains, resourceDomains, frameDomains or baseUriDomains entry contains *.
What you see
- A scan reports
Wildcard entries: https://*.acme.example, https://*. - The widget may work in a test, then draw a question at submission. OpenAI's guide says "The plugin review process checks the declared policy against the UI behavior."
Why it happens
A wildcard is the quickest way to stop CSP errors during development, and it often survives into the first release. Subdomain wildcards feel safe because the domain is yours, but they also cover every subdomain that is ever created, including ones pointing at third-party services.
OpenAI's UI guide asks you to "Keep each allowlist as narrow as possible." It does not discuss wildcard syntax directly. The MCP Apps specification treats an empty or omitted list as the secure default and says hosts must not allow undeclared domains.
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'
Look for any value containing *.
Fix
- Open the widget in a browser with developer tools and collect the origins it actually requests.
- List each one exactly, for example
https://api.acme.exampleandhttps://cdn.acme.example. - Remove the wildcard entries, then re-test the widget.
- If you need many tenant subdomains, ask whether the widget can call one API origin that fans out on the server.
Related check: apps.csp-undeclared-domain (a missing origin). Also remove declared origins the HTML never uses, since smaller allowlists are easier to review.
Verify
The curl output contains no *, the widget has no CSP violations, and the re-scan passes.
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.