Skip to content

Bind front-component tools to MCP Apps - #32463

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

FelixMalfait wants to merge 3 commits into
felix/wizardly-sagan-upeo1x-mcp-app-resourcesfrom
felix/wizardly-sagan-upeo1x-mcp-app-tools

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

A logic-function tool that displays a front component now lists _meta.ui.resourceUri, plus the legacy ui/resourceUri key, so MCP Apps hosts render the component instead of the raw result. structuredContent is added to the results of these tools only; other tools keep a single payload.

Sessions

The view reaches Twenty through get_front_component_session, an app-only tool (visibility: ["app"], so hosts keep its credentials away from the model). It mints the component application's token (a 30-minute token whose access is the application's role intersected with the user's) and its public variables for the caller, as the in-app renderer does.

Security note: who can open a session

Only callers that act as a signed-in member can open a session: user sessions, impersonated sessions, and OAuth clients with a user. API keys and user-less OAuth clients keep plain tools, because their view could not reach Twenty. An OAuth client with a user can therefore get a short-lived application token scoped to that user; that is the same reach the user already granted the client, narrowed by the application's role. Please confirm this is the trust model we want.

Also

  • The public-variables lookup moves out of the resolver into FrontComponentApplicationVariablesService, so both paths share it.
  • Headless components are never bound.

https://claude.ai/code/session_01BC19MT31DvLYvxzeBBUKWi


Generated by Claude Code

A logic-function tool that displays a front component now lists
`_meta.ui.resourceUri` (and the legacy `ui/resourceUri` key), so MCP
Apps hosts render the component in place of the raw result. The view
reads its tool input and result from the call, and `structuredContent`
is added to the results of these tools only, so other tools keep a
single payload.

The view reaches Twenty through `get_front_component_session`, an
app-only tool (`visibility: ["app"]`) that mints the component
application's token and public variables for the caller, as the
in-app renderer does. Only callers that act as a signed-in member can
open one: user sessions, impersonated ones, and OAuth clients with a
user. Other callers keep plain tools, since their view could not reach
Twenty. Headless components are never bound.

The public variables lookup moves out of the resolver into
`FrontComponentApplicationVariablesService` so both paths share it.

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