feat: add onFallbackRequest handler to McpAppRenderer#7208
Merged
alexhancock merged 2 commits intomainfrom Feb 13, 2026
Merged
Conversation
Upgrade @mcp-ui/client from ^6.0.0 to ^6.1.0 to get the new onFallbackRequest prop on AppRenderer. Add a fallback request handler that catches unhandled MCP requests from the app iframe. This is a stub that logs the request method and returns success, with a todo to implement sampling/createMessage per #7039. Changes: - Upgrade @mcp-ui/client to ^6.1.0 - Import RequestHandlerExtra from @mcp-ui/client - Import JSONRPCRequest from @modelcontextprotocol/sdk/types.js - Add handleFallbackRequest async callback - Wire onFallbackRequest prop to AppRenderer
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an onFallbackRequest handler to the desktop UI’s McpAppRenderer so unhandled MCP JSON-RPC requests coming from the embedded app iframe are caught instead of bubbling as unhandled behavior.
Changes:
- Extends imports to include
RequestHandlerExtraand the SDK’sJSONRPCRequesttype. - Introduces an async
handleFallbackRequestcallback (currently stubbed). - Wires
handleFallbackRequestintoAppRenderervia theonFallbackRequestprop.
2148b19 to
dc41773
Compare
Update the handleFallbackRequest function to properly handle the 'sampling/createMessage' method. If the method is unrecognized, return an error status with a descriptive message. This improves error handling for unhandled JSON-RPC methods. Changes: - Implement specific handling for 'sampling/createMessage' - Return error status for unhandled methods
alexhancock
approved these changes
Feb 13, 2026
katzdave
added a commit
that referenced
this pull request
Feb 13, 2026
…ntext * 'main' of github.com:block/goose: feat: add onFallbackRequest handler to McpAppRenderer (#7208) feat: add streaming support for Claude Code CLI provider (#6833) fix: The detected filetype is PLAIN_TEXT, but the provided filetype was HTML (#6885) Add prompts (#7212) Add testing instructions for speech to text (#7185) Diagnostic files copying (#7209) fix: allow concurrent tool execution within the same MCP extension (#7202) fix: handle missing arguments in MCP tool calls to prevent GUI crash (#7143) Filter Apps page to only show standalone Goose Apps (#6811) opt: use static for Regex (#7205) nit: show dir in title, and less... jank (#7138) feat(gemini-cli): use stream-json output and re-use session (#7118) chore(deps): bump qs from 6.14.1 to 6.14.2 in /documentation (#7191) Switch jsonwebtoken to use aws-lc-rs (already used by rustls) (#7189) chore(deps): bump qs from 6.14.1 to 6.14.2 in /evals/open-model-gym/mcp-harness (#7184) Add SLSA build provenance attestations to release workflows (#7097) fix save and run recipe not working (#7186) Upgraded npm packages for latest security updates (#7183) docs: reasoning effort levels for Codex provider (#6798)
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.
Summary
Add a fallback request handler to
McpAppRendererthat catches unhandled MCP requests from the app iframe.This is a stub implementation that logs the request method and returns success, with a todo to implement
sampling/createMessageper #7039.Changes
RequestHandlerExtrafrom@mcp-ui/clientJSONRPCRequestfrom@modelcontextprotocol/sdk/types.jshandleFallbackRequestasync callback usinguseCallbackonFallbackRequestprop toAppRendererType fixes
The original snippet had several type issues that are fixed here:
JSONRPCRequest(correct SDK type) instead of non-existentMcpUiFallbackRequestrequest.urlaccess (JSONRPCRequesthasmethod, noturl)asyncto match expectedPromise<Record<string, unknown>>return typeuseCallbackdependency array (was[extra]which would be aReferenceError)