Back to Docs
MCP Server

DrawIt MCP Server

Connect Claude, GPT-4, Cursor, or any MCP-compatible AI agent to a private diagram workspace. 60+ design tools, authenticated via a dashboard API key.

Connect Your Agent

The DrawIt MCP server is hosted at https://chamuka.ai/api/mcp. Authentication uses a personal API key from your dashboard. No session ID required.

Connect with API Key

  1. Sign in and open the dashboard.
  2. Under Developer Tools, click Generate and copy your sk_drawit_live_... key (shown once).
  3. Paste the key into your agent's MCP config as Authorization: Bearer sk_drawit_live_....
Endpoint
https://chamuka.ai/api/mcp

Add to .mcp.json in your project root, or run claude mcp add.

{
  "chamuka-drawit": {
    "type": "http",
    "url": "https://chamuka.ai/api/mcp",
    "headers": {
      "Authorization": "Bearer sk_drawit_live_YOUR_KEY_HERE"
    }
  }
}

Replace sk_drawit_live_YOUR_KEY_HERE with your key from the dashboard. Keep your API key private.

How It Works

API key auth
Your dashboard key identifies your account, set once in MCP client config.
Real designs
Agents create named designs in your account. Open them in the full /design editor.
Persistent state
Designs save to your account and sync live via PartyKit.
60+ tools
Full diagramming API: create, edit, style, layout, export.
AI images
Generate images via Pollinations and embed them in elements.
Export formats
PNG, SVG, Mermaid, DOT, directly from the agent.

Start with create_design({ name }) for a new diagram, then get_canvas_url() to share the live /design/ editor link with the user.

Advanced: Multiple Workspaces

By default, all tool calls use your account's default workspace. To target a specific canvas, pass an optional session identifier:

  • mcp-session-id header on the HTTP connection
  • _session argument on any tool call

Claude.ai OAuth

The Claude.ai MCP connector uses OAuth instead of a dashboard API key. When prompted, sign in with your Chamuka account. The connector discovers auth endpoints via /.well-known/oauth-protected-resource.

For Claude Code, Cursor, Hermes, and other HTTP MCP clients, use a dashboard API key as described above. OAuth is not required.

Tool Reference (60+)

All tools are available over the JSON-RPC 2.0 MCP protocol. Below is the full list grouped by category.

Designs & Sessions
create_designlist_designsopen_designget_canvas_urlget_canvas_info
Canvas & Navigation
set_canvaszoom_to_fitget_diagram_stateswitch_pageadd_pagerename_pagecopy_page
Elements
create_elementadd_elementsedit_elementdelete_elementmove_elementsduplicate_elementsgroup_elementsungroup_elementsget_elementfind_elements
Frames & Components
create_framedefine_componentadd_componentinstantiate_componentapply_variantset_instance_prop
Layout & Alignment
align_elementsauto_layoutsmart_arrangeboolean_opget_bounding_boxmeasure_distance
Styling
apply_themeformat_textset_style_batchset_tokenswitch_token_mode
Spatial Queries
query_spatialquery_neighborsquery_overlaps
Diagrams (Mermaid & Templates)
create_from_mermaidcreate_from_templategenerate_diagramget_diagram_templatesget_diagram_guide
Annotations & Interactions
create_annotationset_interaction
Selection
get_selection
Snapshots & History
create_snapshotlist_snapshotsrestore_snapshotdelete_snapshotdiff_snapshotverify_editget_undo_historyundoredo
Quality & Accessibility
critique_diagramaudit_diagram
Export
export_diagramexport_as_mermaidexport_as_dotexport_to_pngexport_to_pptxexport_to_pdfexport_to_driveexport_batch
AI Images
generate_image
Scene & Icons
describe_scenesearch_iconsget_fonts
Utility
scaffold_diagramclear_diagramlist_commandsget_recent_filesadd_recent_fileclear_recent_filesclear_conversationscreenshot_url

Run Locally

Prefer to run the MCP server locally? Install the CLI and use drawit serve.

# Install the CLI
npm install -g @chamuka-labs/drawit-cli

# Start the HTTP MCP server on port 3847
drawit serve

# Claude Desktop (stdio transport)
drawit serve --stdio

# Custom port
drawit serve --port 4000

Then configure your agent to point at http://localhost:3847:

{
  "chamuka-drawit": {
    "type": "http",
    "url": "http://localhost:3847"
  }
}

Capabilities

The DrawIt MCP server implements the Model Context Protocol (MCP) over streamable HTTP. It is compatible with any MCP-capable client including Claude Code, Claude Desktop, Cursor, and custom agent frameworks.

Authentication is handled via your dashboard API key in the MCP client config. Call create_design before mutations on a fresh session, then get_canvas_url() to open the live design editor in the browser.