diagrams-mcp

v0.3.1
diagrams-mcp Checked 4 days ago Published 1 month ago

MCP server that lets agents read, draw and edit Diagrams in the open editor tab.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_diagrams List diagrams

Lists every saved Diagram, most recently edited first, with its id. Marks the one open in the editor.

open_diagram Open diagram

Shows a Diagram in the editor tab, so the user sees it.

ParameterTypeDescription
id *string

create_diagram Create diagram

Creates an empty Flow diagram and opens it in the editor. Prefer draw_flow to create one with content.

ParameterTypeDescription
name *stringShown in the Library; blank means Untitled.

rename_diagram Rename diagram

Renames a Diagram.

ParameterTypeDescription
name *stringShown in the Library; blank means Untitled.
idstringId from list_diagrams. Leave out for the Diagram open in the editor.

read_diagram Read diagram

Describes a Diagram as text: its Shapes, Connectors and Layouts with ids, labels and positions, and what the user has selected. Read before editing a Diagram you did not just create.

ParameterTypeDescription
idstringId from list_diagrams. Leave out for the Diagram open in the editor.

draw_flow Draw flow

Creates a new Diagram from steps and links and opens it. The editor places every Shape, so give no coordinates. Add lanes for a swimlane diagram of who does what. Check the result with screenshot.

ParameterTypeDescription
name *stringShown in the Library; blank means Untitled.
steps *array
directionstringWhich way the flow runs from its first steps to its last.
lanesarrayDraws a swimlane Grid. Every step must be in exactly one Lane. Leave out for a free flow.
linksarray

edit_diagram Edit diagram

Applies a batch of edits to a Diagram, opened in the editor, as one undo step. Either every edit applies or none does. New Shapes without x and y are placed by their Connectors, next to the existing content. Returns the ids of new items by key.

ParameterTypeDescription
edits *array
directionstringHow to place new Shapes without x and y. Default down.
idstringId from list_diagrams. Leave out for the Diagram open in the editor.

screenshot Screenshot diagram

Returns a PNG of a Diagram, opened in the editor, as exported. Use it to check layout and labels after drawing or editing.

ParameterTypeDescription
idstringId from list_diagrams. Leave out for the Diagram open in the editor.
shapesarrayOnly these Shape ids and the Connectors between them.