Excalidraw MCP with Claude: Draw Diagrams from a Prompt

Published:

Updated:

excalidraw mcp with claude

Disclaimer

As an affiliate, we may earn a commission from qualifying purchases. We get commissions for purchases made through links on this website from Amazon and other third parties.

Part of our AI Tools guides

Excalidraw MCP with Claude turns a plain-language request into an editable diagram, and it suits teams that need a fast visual draft. MCP lets Claude call diagram tools, so you can shape AI-generated visuals without drawing every part by hand.

A flowchart can show a process more clearly than a long note. The best setup depends on whether you want a quick chat result or a canvas you can revisit. Use it to get a first draft, then check the result before sharing it.

Key Takeaways

  • MCP lets Claude call tools that create and edit diagrams.
  • A hosted chat tool suits quick, one-time diagram requests.
  • A local canvas helps when you expect repeated edits.
  • Clear labels and steps help Claude make a useful draft.
  • Review the saved editable drawing before you share it.

What Claude Can Do with Excalidraw

Claude uses MCP to call Excalidraw tools instead of stopping at a written description. Model Context Protocol (MCP) is a standard that lets an AI client call tools provided by another service.

Those tools can create, inspect, update, or export a diagram, depending on the connected server. An LLM can use Excalidraw by turning natural-language instructions into tool calls, rather than only describing a picture in text. The server’s tools decide what Claude can do.

The MCP specification explains that tools have names and schemas, which help models find and call them. The Model Context Protocol tool rules also support human oversight of tool calls.

Claude can make flowcharts, architecture maps, sequence diagrams, state diagrams, ER diagrams, class diagrams, and mind maps. It can add shapes, text, and arrows to show how each part connects. The server you connect determines whether Claude creates a one-time result or can keep editing a canvas.

Choose an Excalidraw MCP Server for Your Workflow

Choose a hosted connection for a quick diagram and a local canvas when you need to refine work over time. The right mcp server depends on whether your task ends with one draft or needs ongoing edits.

Do not choose a one-shot workflow when your team needs an editable canvas it can revisit. Excalidraw GitHub projects offer quick-start and local-canvas approaches. Some community servers also support Cursor, so teams can work from a coding client.

Option Best fit What it provides
Official Excalidraw chat widget One quick diagram One-shot prompt-to-diagram chat
Excalidraw+ MCP Workspace diagrams Hosted tools with workspace access
mcp-excalidraw-server Repeated edits Persistent canvas and 27 MCP tools in v2.2
yctimlin’s mcp_excalidraw Local canvas work Real-time canvas sync

Hosted tools connect from a chat or workspace

The official Excalidraw MCP chat widget turns one prompt into a diagram. It suits a fast sketch when you do not need to keep working on the same canvas.

Excalidraw+ MCP connects to a workspace. The @scofieldfree/excalidraw-mcp tools include diagram creation, element edits, Mermaid conversion, session management, and PNG, SVG, or JSON export. Its setup needs Node.js 18 or later. Developers need pnpm 9 or later.

Local tools keep a working canvas available

The mcp-excalidraw-server project keeps a canvas available for element-level edits and screenshot-based review. Its v2.2 release line offers 27 tools over stdio, plus a command-line tool, agent skill, and REST API.

yctimlin’s mcp_excalidraw supports a local canvas with real-time sync. This suits project work that changes as you review it. Pick the workflow first, then follow setup instructions for that specific server.

Set Up Excalidraw MCP with Claude Code

The remote connection takes one Claude Code command, while a local canvas needs its project’s setup steps. Choose the path that matches your work before you run a connector command.

As of 2026, add the remote Excalidraw MCP server to Claude Code with this command:

claude mcp add –transport http excalidraw https://mcp.excalidraw.com

Connect the hosted server with HTTP

Run the command in the terminal where you use Claude Code. Complete any browser sign-in prompt, then confirm the connection in Claude Code.

The server URL uses HTTP transport, so a custom connector is not needed for this command. If Claude Code asks you to authorize access, use the browser window it opens.

Set up a local canvas for ongoing edits

Local setup varies by project. The mcp-excalidraw-server core drawing setup needs Node.js 20 or later. Its Claude Code skill installs with the install-skill command.

For the manual renderer setup, run uv sync and uv run playwright install chromium from the project’s references directory. The yctimlin canvas server can run in Docker on port 3000, and Docker can register its MCP server with Claude Code.

  1. Check the Node.js requirement for your chosen local project.
  2. Install its skill or register its MCP server.
  3. Start the canvas, or confirm that it is running.
  4. Ask Claude Code to create a small test diagram.

The test can be a basic flowchart with two steps and one arrow. This confirms that the tools can reach the canvas and make a visible change. Confirm Claude Code can see the chosen tools before using the connection for team work.

Choose OAuth or an API Key for Claude

A computer screen shows an Excalidraw workspace login interface with colorful diagrams, flowcharts, and graphics for OAuth connections and API keys. Drawing tools, notebooks, and a potted plant sit on the desk, with a window overlooking trees and suburban houses.
Choose OAuth or an API key to connect Claude with Excalidraw, then turn prompts into diagrams and flowcharts.

Use OAuth when your client supports browser sign-in, and choose an API key when you need permission-based access for a script or a client without that sign-in. Both methods can connect to Excalidraw+ over Streamable HTTP.

Grant only the permissions your connection needs. OAuth uses the signed-in user’s workspace role. An API key uses the permissions set for that key.

Access method How you authorize Best fit
OAuth Sign in through a browser Clients with browser sign-in
API key Use a key with set permissions Scripts or clients without sign-in
Local core drawing Run local tools Local drawing without workspace access

One Excalidraw+ MCP connection reaches one workspace. Connect again when you need to use another workspace. Check the workspace name before you grant access, especially when work and personal accounts use the same browser.

The drawing-only endpoint is https://api.excalidraw.com/api/v1/mcp?toolsets=drawing. It hides workspace administration tools and starts each session with fewer tokens. That narrower set can help when Claude only needs drawing tools.

An API key also helps when a script needs access without a person signing in each time. Keep its permissions limited to the task. Check which workspace the connection will reach before authorizing it.

Create and Refine a Diagram with Claude

A useful prompt names the diagram’s purpose, its parts, and how those parts connect. Clear instructions help Claude make a diagram that fits your audience and task.

Using an AI agent with Excalidraw works best as a draft-and-review loop, not as a reason to skip visual checks. Ask for a small first version, inspect the canvas, then request focused edits.

Give Claude a clear diagram brief

Include these details in your prompt:

  • Purpose and audience, such as onboarding new support staff.
  • Diagram type and direction, such as a left-to-right flowchart.
  • Exact labels and steps, including the start and end points.
  • Visual limits, such as groups, colors, or needed icons.

A brief can name each step and the condition that sends work down a new path. That detail helps Claude choose shapes and arrows that match the process. For a written procedure, pair the visual flow with SOP software for operations teams when you need steps, approvals, and version history in one place.

Review the canvas and request targeted edits

A screenshot can reveal clipped labels, overlapping shapes, and arrows that point the wrong way. The mcp-excalidraw-server project lets an agent describe and screenshot its canvas, then refine individual elements.

The excalidraw-diagram-skill project uses Playwright to render diagrams so an agent can spot layout issues and revise its work. You can ask Claude to move one label, shorten one line, or reroute one arrow.

Avoid asking for a vague “cleaner” diagram when you see one clear fault. Name the fault and its location, such as “move the approval box below the review step.” Ask Claude to fix the most important layout issue, then inspect the revised canvas again.

Export, Render, and Secure Your Diagrams

A computer screen shows an editable, colorful Excalidraw diagram with shapes and arrows beside a PNG export preview. Sketching tools and a doodled notepad sit nearby, with a bookshelf, houseplants, and a window in the home office.
Exporting a diagram as a PNG preserves a shareable view, while the editable Excalidraw scene keeps shapes and arrows ready for further changes.

Save an editable scene when you expect the diagram to change, and export an image when you need a fixed preview. The scene keeps its elements editable; PNG and SVG files are easier to share as images.

Keep a local canvas bound to localhost unless you have network-level access controls in place. The yctimlin canvas API has no built-in authentication when exposed on another network interface.

Save editable scenes and export images

The mcp-excalidraw-server project can import and export `.excalidraw` files. It also supports named snapshots, Mermaid conversion, and layout tools for aligning or spacing elements.

You can render a committed `.excalidraw` file offline with its `render` command, without starting a canvas server. The v2.2 release can embed a scene inside a PNG, but that option is off by default.

Its headless renderer offers PNG settings for dark mode, scale from 1 to 4, padding, selected element IDs, frame IDs, and font embedding. These controls belong to that renderer, not every export tool.

The separate excalidraw-export-mcp project needs Node.js 18 or later and uses Playwright with Chromium. It supports batch PNG and SVG export, plus metadata such as element counts, types, bounds, and file size. Its PNG scale choices are 1, 2, or 3, with 2 as the default. It can also use a background or dark mode.

Keep a local canvas private

A saved scene is useful when you need to revise labels or move shapes later. A PNG or SVG gives readers a fixed view, but it does not work like the editable source.

Use named snapshots when you want to keep clear versions of a changing diagram. When a preview needs a dark background or larger size, pick the export tool’s settings for that specific file.

Do not expose the yctimlin canvas API on a network without access controls. Keep a local canvas bound to localhost unless you have network-level access controls in place.

Fix Common Connection and Diagram Problems

Start by checking the endpoint and the type of error Claude reports. The error often points to a wrong URL, failed sign-in, or a tool permission issue.

A 405 response can mean the client used GET instead of POST for the stateless Excalidraw+ endpoint. That endpoint accepts POST requests only.

  • Verify the endpoint and transport match the server you chose.
  • Refresh or repeat browser sign-in when credentials fail.
  • Check API-key permissions when a tool is missing.
  • Ask Claude for one focused repair when labels overlap or arrows look unclear.

Excalidraw+ returns 401 when an API key is missing, invalid, or expired. A 500 error means the server cannot check a key. An OAuth client that cannot use Client ID Metadata Documents needs an API key instead.

A missing tool can mean the API key lacks permission for the route behind that tool. Update the key’s access, then reconnect so Claude can load the changed tool list.

For a diagram fault, name the item and the change you want. For example, ask Claude to shorten a label that crosses an arrow, rather than requesting a full redraw. Reconnect after changing key permissions so the client can load the updated tools.

Conclusion

Choose the connection that matches how often you expect to revisit the diagram. A hosted connection fits a quick draft, while a persistent local canvas fits work that needs ongoing edits.

Both options can help you turn technical communication into a visual draft that is easier to review. Your next step is to connect the option that matches your work and test it with one small, specific diagram request.

Start with one small diagram, check the result, and save the editable scene if you expect to update it.

FAQ

Can Claude edit an Excalidraw diagram after it creates one?

Yes, Claude can edit a diagram when the connected server supports editing. A persistent canvas can let Claude update individual elements instead of starting over. You can ask for a single change, such as moving a shape or changing a label. The server’s available tools set the limits, so some connections may only create a one-time result.

Does Claude need an API key to connect to Excalidraw?

No, Claude does not always need an API key to connect to Excalidraw. OAuth works when the client supports the required browser sign-in. An API key is an alternative for clients without that sign-in, and it can suit scripts or shared integrations. Set key permissions to cover only the work the connection needs.

Can I connect Claude to more than one Excalidraw+ workspace?

Yes, you can connect Claude to more than one Excalidraw+ workspace. Each MCP connection reaches one workspace, so create another connection to use a different one. This gives you a clear boundary between workspaces. Check the account and workspace shown during authorization before you approve a connection.

Can I use Excalidraw MCP with Claude Desktop?

Yes, you can use Excalidraw MCP with Claude Desktop through a compatible remote MCP connector over HTTP. The connection must support the server’s transport. Complete browser authorization if Claude Desktop prompts you to sign in. The tools that appear depend on the server and the access granted to that connection.

Can Claude save a diagram as a file in my project?

Yes, a local workflow can export an editable `.excalidraw` file that you can keep with project files. This scene preserves editable diagram elements, unlike a PNG preview. You can use the file as a working source and export a fresh image after changes. Check that your chosen server supports file export.

Can I render an Excalidraw file without starting the canvas?

Yes, the mcp-excalidraw-server `render` command can render a committed `.excalidraw` file offline. You do not need a running canvas server for that command. This works well when you need a preview from a saved project file. The available output settings depend on the renderer you use.

About the author

Latest Posts