Skip to content

Deployment

For Claude Code, Claude Desktop, and Cursor — the MCP server communicates over stdio:

Terminal window
npx drawmode --stdio

Configure your client:

{
"mcpServers": {
"drawmode": {
"command": "npx",
"args": ["drawmode", "--stdio"]
}
}
}

Streamable HTTP server on port 3001:

Terminal window
npx drawmode

Useful for development and testing with HTTP-based MCP clients.

Deploy the worker/ directory to Cloudflare Workers for remote MCP access:

Deploy to Cloudflare

Terminal window
cd worker
npx wrangler deploy

The Worker requires these compatibility flags in wrangler.toml:

  • nodejs_compat — Node.js API compatibility
  • unsafe_eval — required for new Function() code execution

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

Local PNG and SVG export requires puppeteer:

Terminal window
npm install puppeteer

puppeteer is listed in optionalDependencies — if not installed, PNG/SVG export gracefully fails and other formats continue to work.

The export pipeline:

  1. Launches headless Chrome via puppeteer
  2. Loads @excalidraw/excalidraw@0.17.6 from CDN
  3. Calls ExcalidrawLib.exportToSvg() with the diagram elements
  4. PNG: Renders SVG to canvas at 2x resolution, exports as PNG
  5. SVG: Serializes the SVG element directly
Terminal window
npm publish

Users install via npx drawmode.

Publish to registry.modelcontextprotocol.io for auto-indexing by PulseMCP and Smithery.