Deployment
Local (stdio)
Section titled “Local (stdio)”For Claude Code, Claude Desktop, and Cursor — the MCP server communicates over stdio:
npx drawmode --stdioConfigure your client:
{ "mcpServers": { "drawmode": { "command": "npx", "args": ["drawmode", "--stdio"] } }}Local (HTTP)
Section titled “Local (HTTP)”Streamable HTTP server on port 3001:
npx drawmodeUseful for development and testing with HTTP-based MCP clients.
Cloudflare Workers
Section titled “Cloudflare Workers”Deploy the worker/ directory to Cloudflare Workers for remote MCP access:
Manual Deployment
Section titled “Manual Deployment”cd workernpx wrangler deployWorker Requirements
Section titled “Worker Requirements”The Worker requires these compatibility flags in wrangler.toml:
nodejs_compat— Node.js API compatibilityunsafe_eval— required fornew Function()code execution
PNG Export on Workers
Section titled “PNG Export on Workers”The Worker supports PNG export via Cloudflare Browser Rendering — headless Chromium on the edge renders pixel-perfect PNGs using the Excalidraw renderer.
- Free tier includes 10 minutes/day of browser rendering time
- For local dev with browser rendering:
cd worker && npx wrangler dev --remote
PNG/SVG Export (Local)
Section titled “PNG/SVG Export (Local)”Local PNG and SVG export requires puppeteer:
npm install puppeteerpuppeteer is listed in optionalDependencies — if not installed, PNG/SVG export gracefully fails and other formats continue to work.
The export pipeline:
- Launches headless Chrome via puppeteer
- Loads
@excalidraw/excalidraw@0.17.6from CDN - Calls
ExcalidrawLib.exportToSvg()with the diagram elements - PNG: Renders SVG to canvas at 2x resolution, exports as PNG
- SVG: Serializes the SVG element directly
Publishing
Section titled “Publishing”npm publishUsers install via npx drawmode.
MCP Registry
Section titled “MCP Registry”Publish to registry.modelcontextprotocol.io for auto-indexing by PulseMCP and Smithery.