Created
March 21, 2026 23:13
-
-
Save AbhimanyuAryan/043116a56123df0dcfd0487331483363 to your computer and use it in GitHub Desktop.
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
| #!/bin/bash | |
| # Start Excalidraw MCP Server Wrapper | |
| # Set environment | |
| export EXPRESS_SERVER_URL="${EXPRESS_SERVER_URL:-http://localhost:3000}" | |
| export ENABLE_CANVAS_SYNC="${ENABLE_CANVAS_SYNC:-true}" | |
| export PORT="${PORT:-3000}" | |
| # Start canvas server in background | |
| # Redirect output to log file to keep stdio clean for MCP communication | |
| (cd $(dirname "$0") && node dist/server.js > /tmp/excalidraw-canvas.log 2>&1) & | |
| CANVAS_PID=$! | |
| # Wait for canvas server to initialize | |
| sleep 3 | |
| # Set up cleanup trap | |
| trap "kill $CANVAS_PID" EXIT | |
| # Start MCP server | |
| # This process will communicate via stdio with the client | |
| cd $(dirname "$0") && node dist/index.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment