Repository navigation
Bind front-component tools to MCP Apps - #32463
Draft
FelixMalfait wants to merge 3 commits into
Draft
FelixMalfait wants to merge 3 commits into
FelixMalfait wants to merge 3 commits into
Conversation
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 was referenced Dec 5, 2026
…ix/wizardly-sagan-upeo1x-mcp-app-tools
…ults from tool metadata
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 legacyui/resourceUrikey, so MCP Apps hosts render the component instead of the raw result.structuredContentis 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
FrontComponentApplicationVariablesService, so both paths share it.https://claude.ai/code/session_01BC19MT31DvLYvxzeBBUKWi
Generated by Claude Code