Diagrams MCP

v0.1.2
io.github.mskry/diagrams-mcp-server Checked 30 minutes ago Published 7 months ago

Generate cloud architecture diagrams, flowcharts, and sequence diagrams.

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

render_diagram

Render a mingrammer/diagrams Python snippet to PNG and return the image. The code must be a complete Python script using `from diagrams import ...` imports and a `with Diagram(...)` context manager block. Args: code: Full Python code using the diagrams library. filename: Output filename without extension. download_link: If True, store the image on the server and return a temporary download URL path (/images/{token}) instead of the inline image. The link expires after 15 minutes.

ParameterTypeDescription
code *string
download_linkboolean
filenamestring

list_providers

List all available diagram providers (aws, gcp, azure, k8s, onprem, etc.).

list_services

List service categories for a provider (e.g. 'aws' -> ['compute', 'database', ...]). Args: provider: Provider name from list_providers (e.g. 'aws', 'gcp', 'k8s').

ParameterTypeDescription
provider *string

list_nodes

List available node classes for a provider.service combo. Args: provider: Provider name (e.g. 'aws', 'gcp', 'k8s'). service: Service category (e.g. 'compute', 'database', 'network'). Returns: List of nodes with keys: name, import, alias_of (optional).

ParameterTypeDescription
provider *string
service *string

search_nodes

Search for diagram nodes by keyword across all providers and services. Args: query: Search term (case-insensitive substring match). Returns: List of matching nodes with keys: node, provider, service, import, alias_of (optional). Sorted by relevance: exact match first, then prefix, then substring.

ParameterTypeDescription
query *string

render_mermaid

Render a Mermaid diagram definition and return the image with metadata. The definition should be valid Mermaid syntax (e.g. flowchart, sequence, class, ER, state, or Gantt diagram). Returns a list of content blocks: the rendered image (SVG inline or PNG download link) plus a JSON text block with metadata including a mermaid.live edit link for opening the diagram in a browser editor. Args: definition: Mermaid diagram definition text. filename: Output filename without extension. download_link: If True, store the image on the server and return a temporary downloa…

ParameterTypeDescription
definition *string
download_linkboolean
filenamestring

render_plantuml

Render a PlantUML diagram definition to PNG and return the image. The definition should be valid PlantUML syntax wrapped in @startuml/@enduml (sequence, class, component, activity, state, deployment, etc.). Args: definition: PlantUML diagram definition text. filename: Output filename without extension. download_link: If True, store the image on the server and return a temporary download URL path (/images/{token}) instead of the inline image. The link expires after 15 minutes.

ParameterTypeDescription
definition *string
download_linkboolean
filenamestring

find_equivalent

Find cross-provider equivalents for a diagram node by infrastructure role. Given a node name (e.g. 'EC2', 'Lambda', 'ComputeEngine'), returns the infrastructure role category it belongs to and the equivalent nodes from other providers. Args: node: Node class name to look up (case-insensitive, e.g. 'EC2', 'lambda'). target_provider: Optional provider to filter equivalents to (e.g. 'gcp', 'azure', 'aws'). If omitted, all equivalents across all other providers are returned. Returns: A dict with keys: category (str): Infrastructure role category name.…

ParameterTypeDescription
node *string
target_provider

list_categories

List all infrastructure role categories with their mapped nodes. Returns a list of category dicts, each with: category (str): Category identifier (e.g. 'virtual_machine'). description (str): Human-readable description. providers (list[str]): Providers covered by this category. nodes (dict): Mapping of provider → list of node names in that category.