Skip to content

Serve front components as MCP App resources - #32462

Draft
FelixMalfait wants to merge 3 commits into
felix/wizardly-sagan-upeo1xfrom
felix/wizardly-sagan-upeo1x-mcp-app-resources
Draft

FelixMalfait wants to merge 3 commits into
felix/wizardly-sagan-upeo1xfrom
felix/wizardly-sagan-upeo1x-mcp-app-resources

Conversation

@FelixMalfait

@FelixMalfait FelixMalfait commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

Stack (MCP Apps, Twenty as an MCP Apps server), merge in order: 1. runtime → 2. resources → 3. tool binding → 4. generic mode → 5. findMany through a view → 6. View Cards app.

What

Serves each front component as an MCP App resource at ui://front-components/{id}/{checksum} (text/html;profile=mcp-app), listed through resources/templates/list and read through resources/read.

How

  • Hosts forbid blob: and remote scripts, so the server links the component bundle, the SDK client, shared dependencies and the runtime from Setup Nest and React projects #1 in the stack into one inline module. It also inlines twenty-ui's stylesheet, as Twenty's own page does.
  • The checksum covers every input of the linked script, so hosts can cache by URI.
  • _meta.ui.csp declares the API origin as connect and resource domain.
  • If the caller cannot reach the component's application, the server returns the SDK's resource-not-found error (-32602 with the URI), as the 2026-07-28 revision requires, so the component's existence does not leak. Headless components are never served.

https://claude.ai/code/session_01BC19MT31DvLYvxzeBBUKWi


Generated by Claude Code

A front component is read at ui://front-components/{id}/{checksum}. The
server links its bundle, the SDK client and shared dependencies with the
MCP App runtime into one inline module, since hosts forbid blob: and
remote scripts, and inlines twenty-ui's stylesheet as Twenty's page does.

The checksum covers every input of the linked script so hosts can cache
by URI. Callers that cannot reach the component's application get the
SDK's resource not found error (-32602 with the URI), as the 2026-07-28
revision requires.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant