Skip to content

Embed Excalidraw MCP App via interactive iframe and emit excalidraw_view SSE#17

Open
Amer-alsayed wants to merge 1 commit intomasterfrom
codex/implement-excalidraw-mcp-in-my-app-gz1qpe
Open

Embed Excalidraw MCP App via interactive iframe and emit excalidraw_view SSE#17
Amer-alsayed wants to merge 1 commit intomasterfrom
codex/implement-excalidraw-mcp-in-my-app-gz1qpe

Conversation

@Amer-alsayed
Copy link
Owner

Motivation

  • The previous static/mock Excalidraw scene did not follow the Excalidraw MCP README and prevented interactive in-chat editing and fullscreen/open UX.
  • We need the server to emit an MCP app payload so clients that support MCP Apps can render a live Excalidraw canvas.
  • The UI should persist the app card in history and provide safe open/fullscreen controls for environments that allow iframes.

Description

  • Server: added isExcalidrawIntent, extractUserText, and buildExcalidrawEventPayload in api/chat.js and emit an excalidraw_view SSE event that contains an app payload with iframeUrl, openUrl, fallbackUrl, remoteServer, and prompt for Excalidraw MCP.
  • Client: updated assets/js/app.js to render an interactive Excalidraw MCP iframe card (with safeExternalUrl checks), Open and Fullscreen controls, handle incoming excalidraw_view SSE events during streaming, and persist excalidrawView in conversation history.
  • Styles: added card and fullscreen CSS in assets/css/style.css to style the embedded app container and fullscreen behavior.
  • Tests: added test/excalidraw-mcp-event.test.js to validate intent detection and the new MCP app iframe payload contract.

Testing

  • Ran the test suite with node --test and all tests passed.
  • Performed a local smoke run with node server.js to verify the app serves and the SSE path triggers UI rendering successfully.
  • Executed a Playwright rendering script that produced a screenshot artifact showing the iframe-based Excalidraw MCP card (artifact saved during the run and used to validate UI rendering).

Codex Task

@vercel
Copy link

vercel bot commented Feb 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chaqgpt Ready Ready Preview, Comment Feb 19, 2026 0:57am

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant