Skip to content

[FEATURE]: Add Support for MCP Apps in the desktop app #10884

Open

Description

@NourEldin-Osama

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

With the Model Context Protocol (MCP) specification reaching stability for Apps (v2026-01-26), I suggest that OpenCode implements support for hosting and rendering MCP Apps.

While OpenCode is already a powerful terminal and Desktop APP, adding "MCP Apps" capabilities would allow it to launch and manage rich, interactive GUI applications. Instead of relying solely on text or Markdown, the agent could render a full React-based interface directly on the user's desktop app.

MCP Apps

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 27, 2026
  2. github-actions commented on Jan 27, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if this doesn't address your specific case.

  3. JReinhold commented on Jan 31, 2026

    @JReinhold

    The announcement of the stabel release of the MCP Apps spec lists other clients' support, and it would be great to see Opencode in this list.

    • VSCode
    • Claude Desktop
    • ChatGPT

    https://blog.modelcontextprotocol.io/posts/2026-01-26-mcp-apps/

  4. JairajSustained commented on Feb 13, 2026

    @JairajSustained

    If this gets implemented, we could use excelidraw mcp server visually.

  5. MarcSkovMadsen commented on Mar 2, 2026

    @MarcSkovMadsen
  6. tristan-stahnke-GPS commented on Mar 4, 2026

    @tristan-stahnke-GPS

    @MarcSkovMadsen @JairajSustained : Can you see if my PR works for your use case?

  7. vvcb commented on Mar 31, 2026

    @vvcb

    Prefect are working on Prefab (https://prefab.prefect.io/docs/welcome) which looks fabulous and is worth investigating for integration here.

  8. removed
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    webRelates to opencode on web / desktop
    on May 3, 2026
  9. ilyes-i-ben commented on May 7, 2026

    @ilyes-i-ben

    +1

  10. takeseem commented on Jun 3, 2026

    @takeseem

    玩呢,还没支持 mcp

  11. MaxiWeissenbacher commented on Jun 10, 2026

    @MaxiWeissenbacher

    +1

  12. amirsaam commented on Jun 25, 2026

    @amirsaam

    +1

  13. adrian-pattz commented on Aug 4, 2026

    @adrian-pattz

    +1, this is a big missing feature

  14. iwiznia commented on Aug 24, 2026

    @iwiznia

    +1, this is a complete deal breaker for the desktop app.

  15. sofianbll commented on Oct 20, 2026

    @sofianbll

    Hi @adamdotdevin (cc @jlongster for #53514) — following up on this issue and on @thdxr's request in #15926 to port MCP Apps to V2.

    Before opening anything, I'd like design feedback on a small engine-only first increment. I built it as a throwaway local proof against dev (6bac3b9) so the discussion has something concrete behind it:

    Proposed engine contract (no iframe/UI code in the engine)

    1. Preserve MCP Apps data on the terminal tool part under state.metadata.mcp (toolMeta, resultMeta, structuredContent, and ui: { resourceUri, mimeType, html, meta }). Model lowering reads state.content, so the UI payload never reaches the model; embedded ui:// HTML is removed from model-visible content.
    2. Resolve the app only for ui:// URIs with text/html;profile=mcp-app, via the same server connection, behind the existing opencode_read_mcp_resource permission.
    3. A session-scoped callback POST /api/session/:sessionID/mcp/call ({ server, tool, arguments, messageID }) that reuses permission.assert with the originating message's agent — no raw Mcp.Service.callTool bypass; denial → 403, never a silent call.

    What the local proof shows (patches + reproducible CI): a model tool call renders an MCP App (an OpenUI counter) in a patched OpenChamber client, a click calls the server back through (3), a visible permission prompt can deny (no MCP call reaches the server) or approve, and the host CSP blocks undeclared network access — on web (Playwright CI) and once on macOS Electron.
    Proof, patches and full proposal: https://github.com/sofianbll/opencode-standards-proof (see PROOF.md and proposals/opencode-mcp-apps-v2.md).

    Not claimed: this is not a released API, not full MCP Apps conformance, callback results are not persisted to history yet, and app-only tool visibility is not handled.

    Questions

    Happy to adapt or drop this — I won't open a PR without a go-ahead per CONTRIBUTING.

  16. opencodejr commented on Oct 29, 2026

    @opencodejr
    Contributor

    Thanks for the request! You're asking for the OpenCode desktop app to host and render MCP Apps: interactive UIs that MCP servers provide through ui:// resources, shown in the app instead of only text or Markdown.

    The current v2 code doesn't support this yet. It also can't be added as a plugin right now, because plugins can't render UI in the desktop app or read resources from MCP servers. Maintainers will consider it.

    Related issues and PRs:

  17. balabommablock-cpu commented on Nov 1, 2026

    @balabommablock-cpu

    @sofianbll's engine-first split looks right to me: engine keeps the data and the permission check, clients decide how to draw it. A few product calls that are cheap to make now and painful to change later:

    1. The same session in the TUI. OpenCode is terminal-first, and one session gets opened from TUI, desktop and web. A tool with an app still returns normal text content, so the TUI shows that, plus one line: Interactive view available: open in desktop or web. Nobody should open a session in the terminal and find a blank tool part.

    2. Don't save the HTML, save the pointer. The proposal stores ui.html in state.metadata.mcp. I'd keep resourceUri and the tool result, and fetch the HTML again when the part is drawn. Saved HTML grows every session file and goes stale when the server updates. If the server isn't connected later, show the text result and Excalidraw app unavailable (server not connected).

    3. Say who's asking. Callback (3) reuses permission.assert, which is good. The prompt should also say the call came from the app, not the model: Excalidraw app wants to run export_scene. Same rules, different sentence. Otherwise a click inside an app looks like the agent going off on its own.

    4. Nothing reaches the model quietly. Apps can send messages and update the model's context. For v1 I'd either skip those, or show each one in the thread (From Excalidraw app: …) before the model sees it. A third-party iframe adding hidden context is the kind of thing that's hard to take back once people rely on it.

    5. Smallest v1: render inline in desktop and web with a height cap and a "pop out" button, app tool calls through the existing permission check, TUI fallback line. Later: preloading, streaming tool input into the app, app messages.

    None of this changes your engine contract much. Mostly it's point 2 (pointer instead of HTML) and an origin: "app" field on the callback so point 3 is possible.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions