MCP Server

Generate diagrams with AI, save them to CanvasKeep

Connect Claude Code or any MCP client to your CanvasKeep workspace. Describe what you want in plain English and get a properly laid-out Excalidraw diagram in seconds.

One prompt in Claude Code: a new workspace and a full labeled diagram, saved to CanvasKeep.

Set up in under a minute

Four steps from zero to generating diagrams with AI.

  1. Step 1

    Create a CanvasKeep account

    Sign up at canvaskeep.com with Google or email. It's completely free.

  2. Step 2

    Copy your two keys

    In your profile menu (top right), open API Keys and generate a key. Then open Encryption and copy the MCP key (not the recovery key). It appears after you open any diagram once and set your passphrase.

  3. Step 3

    Add the MCP server

    Run one command in your terminal to connect CanvasKeep to Claude Code.

  4. Step 4

    Start generating diagrams

    Ask Claude to draw architecture diagrams, flowcharts, or any system design. Diagrams appear in your CanvasKeep workspace.

Installation

Why two keys?

  • CANVASKEEP_API_KEY lets the MCP server sign in to CanvasKeep as you. Get it from API Keys in your profile menu.
  • CANVASKEEP_MASTER_KEY decrypts your diagrams. Diagrams drawn in the browser are end-to-end encrypted, so CanvasKeep's servers only store scrambled data, and the MCP server needs this key to read or edit any diagram you've opened in the app. Diagrams the MCP server creates are currently stored without encryption. Get it from Encryption in your profile menu, under MCP key. Your recovery key is different and stays with you.

Keep both private. Together they can read all your diagrams, so never commit them to a repository.

Claude Code

One command registers the MCP server. Replace ck_your_key_here with your API key and your_encryption_key with the MCP key from the Encryption page.

claude mcp add canvaskeep \
  -e CANVASKEEP_API_KEY=ck_your_key_here \
  -e CANVASKEEP_MASTER_KEY=your_encryption_key \
  -- npx canvaskeep-mcp

Other MCP clients (Codex, Cursor, etc.)

Add this to your MCP configuration file:

{
  "mcpServers": {
    "canvaskeep": {
      "command": "npx",
      "args": ["canvaskeep-mcp"],
      "env": {
        "CANVASKEEP_API_KEY": "ck_your_key_here",
        "CANVASKEEP_MASTER_KEY": "your_encryption_key"
      }
    }
  }
}

What you can ask

Talk to Claude naturally. It figures out the nodes and edges for you.

  • “Draw an architecture diagram of a web app with a React frontend, Node API, PostgreSQL, and Redis cache”
  • “Create a flowchart for user signup with email verification”
  • “Diagram the AWS S3 system design with storage tiers and replication”
  • “Map out a CI/CD pipeline from git push to production deploy”
  • “Show the data flow in an e-commerce checkout process”
  • “Draw a microservices architecture for a food delivery app”

Available tools

The MCP server exposes these tools to AI clients.

ToolDescription
list_workspacesList all your workspaces
create_workspaceCreate a new workspace
list_foldersList folders in a workspace
create_folderCreate a new folder, optionally nested
list_diagramsList diagrams in a workspace
create_diagramCreate a diagram, optionally inside a folder
update_diagramRename a diagram
delete_diagramPermanently delete a diagram
get_diagram_summaryGet diagram metadata and element count
generate_diagramGenerate a diagram from nodes and edges with auto-layout
get_diagram_sceneRead the raw Excalidraw elements of a diagram
save_diagram_sceneWrite edited elements back for precise, manual layout

Frequently asked questions

What is MCP?
MCP (Model Context Protocol) is an open standard that lets AI tools like Claude Code interact with external services. CanvasKeep's MCP server lets AI generate Excalidraw diagrams directly in your workspace.
Do I need to pay for the MCP server?
No. The MCP server is free and open source. You only need a free CanvasKeep account and an API key.
Which AI tools work with this?
Any MCP-compatible client works: Claude Code, Codex, Cursor, and others. Claude Code has the simplest setup with a single command.
What kinds of diagrams can AI generate?
Architecture diagrams, flowcharts, system design diagrams, ERDs, network topologies, and any graph-shaped diagram with labeled boxes and arrows.
Can AI edit an existing diagram, not just generate new ones?
Yes. The get_diagram_scene tool gives your AI the raw Excalidraw elements of a diagram, and save_diagram_scene writes its changes back. That lets it move boxes, fix labels, restyle shapes, or match a reference layout exactly. It needs CANVASKEEP_MASTER_KEY set to read or change diagrams you've opened in CanvasKeep.
Why does the MCP server need my encryption key?
Diagrams you draw in the browser are end-to-end encrypted: they're encrypted in your browser, and the server only stores scrambled data. Diagrams the MCP server creates are currently stored without encryption. Your API key lets the MCP server sign in as you, but it can't unscramble anything. CANVASKEEP_MASTER_KEY is the key that decrypts your diagrams, so the MCP server can read and edit them on your machine. Copy it from Encryption in your profile menu, and keep it private: together with your API key it can read all your diagrams.

Ready to generate diagrams with AI?

Create a free account, grab an API key, and start drawing with Claude in under a minute.