MCP · Model Context Protocol

What is an MCP server for diagramming?

An MCP server for diagramming lets AI agents like Claude, Codex, and Cursor make, change, and lay out architecture diagrams. ArchDraw has one. The agent does not only describe the diagram. It adds nodes, connects edges, calculates the layout, and validates the graph through MCP tools. You can connect to the hosted server, or run it locally with npx.

The Model Context Protocol (MCP) is an open standard for giving AI models access to tools and data. An MCP server for diagramming exposes diagram operations as tools an AI client can call, so the model can work with a real, structured canvas instead of producing text you have to translate back into a drawing.

From description to real canvas

The AI calls tools to inspect current nodes, add components, and rewire connections — the diagram is edited directly, not recreated.

Remote or local

Connect to the hosted server at /api/mcp with no installation. Or run the server locally over stdio with npx.

Preview links

Each new diagram gets a preview link that you can open and share. Links expire after 7 days. Tell the agent to keep a diagram private if you do not want a link.

Works with your workflow

Connect from Claude Code, the Claude apps, Codex, Cursor, VS Code, Gemini CLI, or OpenCode. The same tools make, lay out, validate, and export diagrams.

What can the ArchDraw MCP server do?

The server exposes diagram operations as named tools. These cover the full edit loop an AI needs to build and refine an architecture diagram:

read_meGives the reference guide for the agent. The agent calls it first.
generate_diagramMakes a diagram from Mermaid text or from nodes and edges.
update_diagramAdds, removes, or changes nodes and edges in the current diagram.
get_diagram_stateGives the nodes and edges of the current diagram.
validate_diagramFinds structural problems and gives recommendations.
fix_layoutCalculates the layout again with the ArchDraw editor pipeline.
apply_template / list_templatesLoads an architecture template, or gives the list of templates.
list_node_typesGives the list of component types in the ArchDraw library.
save_checkpoint / load_checkpointSaves the current diagram with a name, and restores it.
export_diagramExports the diagram as JSON, PNG, or SVG.

How to connect it

The connection guide gives the steps for each client. It also tells you how to make sure that the tools loaded.

Open the coding agent setup guide Read the connection steps for all clients

For background on the implementation, see the engineering blog.

FAQ

Which AI assistants can use the ArchDraw MCP server?

All MCP clients. This includes Claude Code, the Claude apps, Codex, Cursor, VS Code, Gemini CLI, and OpenCode. Clients that support remote servers connect to https://archdraw.hiabhee.online/api/mcp. Other clients run the local server with npx.

Is the MCP server secure?

The tools send only the diagram content that the agent gives them: component names, labels, connections, and Mermaid text. They do not read your source files. Preview links expire after 7 days. Do not put secrets in diagram labels. Read the privacy policy before you connect.

Do I need ArchDraw’s cloud service to use the MCP server?

Yes. The remote server is the hosted ArchDraw service. The local server also uses the hosted ArchDraw API for layout and preview links. For a self-hosted deployment, use https://<your-domain>/api/mcp, or set API_BASE_URL to your domain.

Why would an AI want to edit a diagram instead of just describing it?

Describing a diagram still leaves you to do the layout. With an MCP server the AI can inspect the actual canvas, place nodes, wire edges, and run layout — so the result is a real, editable diagram you can refine instead of starting from scratch.