Add Excalidraw MCP integration with inline diagram app rendering#18
Open
Amer-alsayed wants to merge 1 commit intomasterfrom
Open
Add Excalidraw MCP integration with inline diagram app rendering#18Amer-alsayed wants to merge 1 commit intomasterfrom
Amer-alsayed wants to merge 1 commit intomasterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Motivation
Description
api/lib/mcp-client.jsto spawn MCP servers, frame/unframeContent-LengthJSON-RPC, send requests/notifications and capture stderr.api/lib/excalidraw-mcp.jsthat initializes MCP sessions, discovers/selects diagram tools (create_view/create_diagramfallback), calls the tool with a prompt, and normalizes returned app payloads (URL or HTML) for the frontend.create_excalidraw_diagraminapi/lib/tools.jsand wire its executor to call the Excalidraw adapter viacreateExcalidrawDiagram.api/chat.jsto allow the new tool, instruct models to use it for diagram/flowchart requests, collect returned MCP app payloads, and emit them to clients via an SSE eventmcp_appalongsidesources/quality_metrics.assets/js/app.jsto parsemcp_appSSE events, persistmcpAppsin chat history, and render inline MCP app cards/iframes (with safe URL sanitization andsrcdocfallback).assets/css/style.cssand document setup/env variables inREADME.md(EXCALIDRAW_MCP_COMMAND,EXCALIDRAW_MCP_ARGS).Testing
npm testwhich passed (17 tests, all ok).node -conapi/chat.js,api/lib/tools.js,api/lib/excalidraw-mcp.js,api/lib/mcp-client.js, andassets/js/app.jswhich reported no syntax errors.EXCALIDRAW_MCP_COMMAND/EXCALIDRAW_MCP_ARGSconfiguration) were exercised during local runs; automated test suite remained green.Codex Task