Skip to content

Add MCP Apps provider foundation for Dynamic Artifacts - #3689

Merged
reachjalil merged 2 commits into
devfrom
codex/dynamic-artifact-mcp-apps
Aug 12, 2026
Merged

reachjalil merged 2 commits into
devfrom
codex/dynamic-artifact-mcp-apps

Conversation

@reachjalil

@reachjalil reachjalil commented Aug 11, 2026 •

Copy link
Copy Markdown
Member

Summary

  • add the standards-based MCP Apps provider foundation for saved Code Mode Script snapshots
  • expose a read-only render_dynamic_artifact tool with versioned structured content and complete Markdown fallback
  • serve a self-contained Preview/Data/Lineage resource at ui://openwork/dynamic-artifact/v1/view.html
  • keep execution boundaries explicit: manual runs and Automations refresh immutable data snapshots; the MCP App only reads and presents them

Standards alignment

The agent MCP endpoint uses the official @modelcontextprotocol/ext-apps server helpers and advertises the io.modelcontextprotocol/ui extension:

  • text/html;profile=mcp-app resource delivery through resources/read
  • tool linkage through _meta.ui.resourceUri and its compatibility alias
  • the 2026-01-26 initialize, initialized, tool-input/result, host-context, size-change, cancellation, and teardown lifecycle
  • closed network, frame, resource, and base-URI permissions
  • DOM text rendering with no caller-provided HTML, external scripts, or network requests

References: MCP Apps overview and 2026-01-26 specification.

Product and security behavior

The renderer reuses the existing organization membership, team grants, and saved-Script authorization path. A caller supplies only a Script ID, optional exact receipt, and optional freshness threshold. Missing, failed, deleted, unreadable, or unauthorized snapshots fail closed without exposing internal details.

Common result shapes render as bounded tables or metric cards; the Data and Lineage views retain the full structured result and immutable receipt/version/source/digest facts. Unsupported MCP Apps clients receive the same artifact as Markdown.

Scope boundary

This PR is the provider half of the vertical. It does not add an MCP Apps host to the OpenWork desktop conversation surface. Until that follow-up lands, desktop users continue to receive the Markdown fallback. The host remains a separate implementation because it must preserve MCP metadata and structured results through the OpenCode boundary, resolve and validate resources, and enforce an opaque sandbox/bridge lifecycle generically for upstream MCP servers.

Verification

Exact base/head at publication:

  • base: bf689dfbea3f5d87b866fe600b2ebc555dbfdb90
  • head: 149ece5c5

Passed locally:

  • pnpm --filter @openwork-ee/den-api exec bun test test/mcp-dynamic-artifact-app.test.ts — 5 passed, 27 assertions
  • pnpm --filter @openwork-ee/den-api exec tsc -p tsconfig.json --noEmit --pretty false
  • pnpm evals:typecheck
  • prior unchanged provider proof: Den build, focused agent initialization, and frozen-lockfile validation

The opt-in saved-Script/Automation testkit journey is extended and typechecked but has not run in the required Den/model environment. No real iframe-host proof is claimed in this provider-only PR.

@vercel

vercel Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-app Ready Ready Preview Aug 11, 2026 4:07pm
openwork-den Ready Ready Preview Aug 11, 2026 4:07pm
openwork-den-worker-proxy Ready Ready Preview Aug 11, 2026 4:07pm
openwork-diagnostics Ready Ready Preview Aug 11, 2026 4:07pm
openwork-landing Ready Ready Preview, v0 Aug 11, 2026 4:07pm

Comment thread ee/apps/den-api/src/mcp/agent.ts Resolved
diff-warden[bot]
diff-warden Bot previously approved these changes Aug 11, 2026

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (b1ffd5cb7c7fd4ac441c2851ee67d8716bde74c4). 1 advisory desktop↔den sync note(s) were posted as review comments; they do not affect clearance. Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (149ece5c5a16a8a51a45a693dbaac943544a5f10). 1 advisory desktop↔den sync note(s) were posted as review comments; they do not affect clearance. Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@reachjalil
reachjalil merged commit 5110b2f into dev Aug 12, 2026
30 checks passed

This branch was successfully deployed

5 active deployments
Preview – openwork-den — 149ece5c Deployed Aug 11, 2026 by vercel[bot]
Preview – openwork-den-worker-proxy — 149ece5c Deployed Aug 11, 2026 by vercel[bot]
Preview – openwork-landing — 149ece5c Deployed Aug 11, 2026 by vercel[bot]
Preview – openwork-app — 149ece5c Deployed Aug 11, 2026 by vercel[bot]
Preview – openwork-diagnostics — 149ece5c Deployed Aug 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants