Repository navigation
fix(mcp): offer the frame preview card only to clients that embed it - #548
Merged
Merged
Conversation
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com> (cherry picked from commit 4f17042505ffd2043ca8ce06d83db974a6751f26)
[Medium impact] The PR appears safe to merge. SummaryPreview cards are now offered only to named ChatGPT and Claude clients, while tool results and existing card resources stay unchanged.
kgoedecke intentionally excludes unlisted hosts and Codex until embedding is confirmed. kgoedecke also notes that Claude Desktop embedding is assumed and live-client checks were not run. Reviews (1) · Last reviewed commit: "fix(mcp): offer the frame preview card o..." · Reviewed by Greptile |
VTalleyrand
pushed a commit
to VTalleyrand/doop
that referenced
this pull request
Nov 20, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit fcf7f645f5893206df763545c0ef33115088462b)
kgoedecke
added a commit
that referenced
this pull request
Nov 21, 2026
…579) withPreview attached the ChatGPT card's data as structuredContent on six tools for every client. Claude Code, opencode and Codex read structuredContent in place of content, so get_canvas came back as the card (frame ids, sizes, image URLs) with no pages, pageId, positions, approval, components, tokens or notes, and the write tools lost their HUMAN FEEDBACK and component notes. Agents filed about 40 reports of it in three days. #548 stopped offering the card to those clients but still sent its data; now only a client embedsPreview names gets it. Refs #526 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
A user on the Pi agent reported that starting a task opens their browser on a Doop sign-in screen. Pi supports MCP Apps but runs in a terminal, so its adapter opens every preview card as a local browser tab (
MCP UI - doop / get_canvas): one perget_canvas, edit and screenshot. The card's "Open in Doop" button then lands a signed-out browser on the sign-in page.The card was built for ChatGPT and Claude, but its
_metalink was advertised to every client.What changes
embedsPreview(clientName)inserver/chatgptApp.ts: an allowlist of clients known to show the card inside the conversation. Only those get the_metalink on the preview tools; every other client gets the same tools and the same text results without it.openai-mcp, OAuth applicationChatGPT) and Claude (Anthropic/ClaudeAI,claude-ai, OAuth applicationsClaudeandDoop for Claude Desktop). Both names are needed: the server uses the name frominitializewhen it remembers it and falls back to the OAuth application's name after a restart or token refresh.codex-mcp-clientandopenai-mcp (Codex).Port of the same change from the hosted repository; the only difference is that the hosted-only
import_psdtool is not part of it.Not verified
tests/mcp-tools.test.ts.claude-ai/Doop for Claude Desktop(the desktop extension through mcp-remote) is assumed to embed the card like claude.ai does.openai-mcp (Codex)embeds cards is unknown; it stays off until someone checks.EMBEDDING_CLIENTS.Testing
bun run typecheckbunx vitest run tests/mcp-tools.test.ts tests/access.test.ts(39 passed)🤖 Generated with Claude Code