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, session-isolated state, zero setup.

Connect Your Agent

The DrawIt MCP server is hosted at https://www.chamuka.ai/api/mcp. Pick your client below to get a personalised config snippet.

Your Session

Endpoint
https://www.chamuka.ai/api/mcp

No diagram yet — connect an agent to start.

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

Session ID = your capability token. Keep it private.

Session Behaviour

Session-isolated
Each session ID gets a private, independent diagram workspace.
Persistent state
Your diagram persists for 7 days after the last access.
Zero setup
No server to run. Just add the config snippet and start prompting.
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.

Tool Reference (60+)

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

Canvas & Navigation
get_canvas_infoset_canvaszoom_to_fitget_diagram_stateswitch_pageadd_pagerename_page
Elements
create_elementadd_elementsedit_elementupdate_elementdelete_elementmove_elementsduplicate_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_textstyle_from_imageset_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_snapshotget_undo_historyundoredo
Export
export_diagramexport_as_mermaidexport_as_dotexport_to_pngexport_to_drive
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.

Every tool call is scoped to your session — concurrent sessions do not interfere with each other. The diagram state is stored server-side and any agent or browser tab sharing the same session ID sees the same live canvas.

To view the current state of your diagram in the browser, open /design/<your-session-id> in the web app.