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/SVG Export
Section titled “PNG/SVG Export”PNG and SVG export is built-in — no browser or external dependencies needed. Both local and Worker deployments use the same pipeline:
- linkedom (pure JS DOM shim) runs Excalidraw’s
exportToSvg()server-side - SVG: The SVG string is returned directly
- PNG: The SVG is passed to PlutoSVG WASM (
svgToPng) which renders at 2x retina resolution
Fonts (Virgil, Assistant) are embedded in the WASM binary via @embedFile.
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.