modelcontextprotocol / modelcontextprotocol/ext-apps

[Proposal] Support web workers (`worker-src`) via `workerDomains` on `McpUiResourceCsp`

Open
#566 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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.

MCP apps can load several file types via resourceDomains ( img-src, script-src, style-src, font-src, media-src ), but it cannot load web-workers

Describe the solution you'd like

I'd like to set a new property workerDomains on the McpUiResourceCsp interface , and use this to list permitted domains (or the inlined blob: option) for serving web-worker code.

Describe alternatives you've considered

  • We could render our own iframe inside the main iframe
  • We avoid using features that use web-workers
  • We could add worker-src to the list of resources supported by resourceDomains, but web-workers are complex enough from a security perspective that hosts that don't want to support them should be able to reject this type without impacting the other static resource types.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the McpUiResourceCsp interface in src/spec.types.ts, especially the existing resourceDomains fields and the worker-src CSP behavior described in the issue. Trace where these CSP resource settings are consumed. Done means hosts can independently accept or reject workerDomains, including permitted domains and the inlined blob: option, without changing other resource types.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
security
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.