modelcontextprotocol / modelcontextprotocol/ext-apps
CSP: Clarify/Allow '*' and scheme-based policies
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 387
- Avg merge
- 3h 21m
- Merged PRs (30d)
- 6
Description
Is your feature request related to a problem? Please describe.
We have a b2b SaaS that allows customers/tenants to load non-script resources from customer-managed domains. Listing the domains all up-front in a CSP policy is not practical as there are many (hundreds or more) and they are dynamic (customers
can change them).
The HTTP Content-Security-Policy header supports:
connect-src https:— allow connections to any HTTPS originconnect-src *— allow connections to any origin
Neither is explicitly denied by this spec, but nor are they mentioned as supported. Current host implementations (Claude, ChatGPT) silently drop them.
Describe the solution you'd like
The spec should clarify what values are valid in connectDomains, resourceDomains, etc. The CSP construction template in the spec joins values directly into the header string, implying any valid CSP source expression should work. But hosts are silently rejecting anything that isn't an origin URL.
Specifically, the spec should:
- Define the set of allowed source expressions (origins, scheme-sources like
https:, wildcards likehttps://*.example.com,*) - Require hosts to support at least scheme-sources (
https:) inconnectDomains, since this is a standard CSP feature and the only practical way to allow connections to a dynamic set of domains.
Describe alternatives you've considered
Proxying all requests through our own domain. This is inefficient and expensive.
Additional context
Relevant spec section: "CSP Construction from Metadata" — the TypeScript template joins domain arrays as-is, which suggests scheme-sources should work.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the spec section “CSP Construction from Metadata” and inspect the TypeScript template that joins domain arrays into the header. Compare the requested origins, scheme-sources, and wildcards with the stated metadata fields. Done means the spec explicitly defines valid source expressions and requires the requested scheme-source support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100