Skip to content

Thoughts about a mimeType equivalent to text/uri-list #318

Open

Description

@chrisbmatthews

Thanks for the well thought-out spec.
I know that for the MVP, the focus is on serving HTML via the text/html;profile=mcp-app mimeType.

And I know that you have left the spec open for extension later on ("other content types are reserved for future extensions").

MCP-UI supports: mimeType: 'text/uri-list' → Render in a sandboxed iframe using src

Do you envision that iframing a straight uri like this may ever be a post-MVP feature, or do you see technical or security reasons why that would never be advisable?

Btw, I did read the conversation here about the ability of a Host to pre-cache HTML-based resources, and that is a fairly good argument for why you've started with text/html:
#298

Thanks!

Activity

  1. added
    enhancement
    on Jan 21, 2026
  2. idosal commented on Jan 21, 2026

    @idosal
    Contributor

    Hey @chrisbmatthews, thanks for raising this. A few large hosts were unlikely to directly support this, which is why it was originally deferred. However, there are a few alternatives that have been accepted into the spec since then -

    1. Negotiate frameDomains in the CSP to render your iframe in the text/html;profile=mcp-app response.
    2. Fetch the HTML from the external URL (to be returned as text/html;profile=mcp-app). Negotiate baseUri in the CSP and rewrite the URLs with a <base> tag.
      Please note that the Host may reject CSP negotiation, and some Hosts (like ChatGPT) have declared frameDomain support will be limited to select apps.

    Do these answer your use case?

  3. chrisbmatthews commented on Jan 22, 2026

    @chrisbmatthews
    Author

    Thanks for the suggestion, @idosal

    I tried the first option (frameDomains)

    This indeed will work. I am building out a host app and exploring options for supporting iframed MCP Apps. Some local testing has verified that this can work, but I certainly see your point that not every host app will support this.

    Btw, I think this is what you meant:

    Host
      +- Sandbox iframe
        +- MCP App html blob (which happens to contain its own iframe in the html; the `frameDomains` for this resource allows me to iframe my final target)
          +- target iframe url
    

    ...that's a lot of iframes.

    It's worth pointing out that if your final target url is the "true" app that will be responding to protocol messages, the "MCP App html blob" above will need some JS to forward the messages between the Sandbox <-> target iframe url.

    I'll continue to explore what my other options are as well. I had tried your 2nd option earlier, but didn't notice the baseUriDomains section in the CSP section, so I'll revisit that attempt.

    The most ideal solution would be one that most host apps will support, and your 2nd option may do that

    Thanks again for your help!

  4. idosal commented on Jan 25, 2026

    @idosal
    Contributor

    @chrisbmatthews if it helps, I added an example that uses baseUri. It's a little complex because I had to resolve some import issues with a domain I don't control, but it should point you in the right direction.

  5. self-assigned this
    on Jan 25, 2026
  6. chrisbmatthews commented on Jan 26, 2026

    @chrisbmatthews
    Author

    @idosal congrats to you and your colleagues on the 1.0.0 release!

    Thanks for the very helpful example. I've been able to wire-up your example to my host app. This was a great exercise because it showed me where my CSP implementation was lacking.

    And I believe I can use this as direction for attempting option 2 for MCP Apps within our org

    Thanks again!

  7. idosal commented on Jan 26, 2026

    @idosal
    Contributor

    @chrisbmatthews amazing, glad to hear it! Please share any insights here. This is something we should be able to support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions