Get the FREE Ultimate OpenClaw Setup Guide →

diagram

An MCP server that seamlessly creates infrastructure diagrams for AWS, Azure, GCP, Kubernetes and more

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio andrewmoshu-diagram-mcp-server uvx infrastructure-diagram-mcp-server \
  --env FASTMCP_LOG_LEVEL="ERROR"

How to use

This MCP server generates infrastructure diagrams from natural language prompts by leveraging the Python diagrams package. It supports multi-cloud and hybrid architectures (AWS, GCP, Azure, Kubernetes, on-premises) and can parse IaC inputs such as Kubernetes manifests, Helm charts, and Terraform configurations to extract infrastructure details for diagram generation. When used with Claude Desktop or compatible MCP clients, the server produces diagrams in PNG format for immediate viewing and also exports editable .drawio files for further customization. The toolset enables you to discover available icons, render multiple diagram types (infrastructure, sequences, flows, class diagrams), and tailor styling, colors, and layouts to your needs. It also includes safeguards like code scanning to help ensure secure diagram generation. The output is rendered inline in the client and saved to your workspace alongside a .drawio file for diagrams.net editing.

How to install

Prerequisites:

  • GraphViz with development headers (required for diagram generation and .drawio export).
  • Python environment and the uv runtime/CLI (Astral uv).
  • Optional: Helm for full Helm chart parsing.

Installation steps:

  1. Install GraphViz (choose the method for your OS):

    • macOS (Homebrew): brew install graphviz
    • Ubuntu/Debian: sudo apt-get install graphviz graphviz-dev
    • Windows (Chocolatey): choco install graphviz (or download from graphviz.org)
  2. Install uv (Astral) runtime:

    • Ensure Python 3.8+ is installed.
    • Install uv (example using pipx): python3 -m pip install --user uv

      or via pipx if you have it installed:

      pipx install uv
  3. Install the MCP server package (as applicable, from PyPI or source):

    • If installing via PyPI (example): pip install infrastructure-diagram-mcp-server
  4. Verify installation by running the MCP server command from your client config (see mcp_config example if needed). This server is designed to be run via the uvx launcher with the module name infrastructure-diagram-mcp-server.

Notes:

  • If you plan to use Docker, you can build and run the container as described in the README, and configure the MCP client to point to the container image.

Additional notes

Tips and considerations:

  • Ensure GraphViz development headers are installed on your system to enable pygraphviz-based diagram rendering.
  • For macOS Apple Silicon, set CFLAGS and LDFLAGS to the proper Homebrew include/lib paths if you encounter build issues (the README provides examples for Claude Desktop configuration).
  • The MCP server supports multiple diagram types and can parse IaC sources (Kubernetes manifests, Helm charts, Terraform) to automatically extract resources and relationships.
  • When using Docker, remember to pass through FASTMCP_LOG_LEVEL and any required environment variables; the example configuration shows how to set an inline environment variable per container run.
  • If you need to customize the output, you can adjust diagram styling, colors, layouts, and export formats (PNG for immediate viewing, .drawio for editing in diagrams.net).
  • If you encounter permissions or path issues on Windows, ensure GraphViz include and lib directories are correctly provided via INCLUDE and LIB in your MCP client configuration.

Related MCP Servers

Sponsor this space

Reach thousands of developers