infrastructure-diagram-mcp-server
v0.0.4.3An MCP server that seamlessly creates infrastructure diagrams for any cloud provider using the Python diagrams package DSL
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
generate_diagram
Generate a diagram from Python code using the diagrams package. This tool accepts Python code as a string that uses the diagrams package DSL and generates both PNG and editable .drawio files. The code is executed with show=False to prevent automatic display. USAGE INSTRUCTIONS: Never import. Start writing code immediately with `with Diagram(` and use the icons you found with list_icons. 1. First use get_diagram_examples to understand the syntax and capabilities 2. Then use list_icons to discover all available icons. These are the only icons you can work with. 3. You MUST use icon names exact…
| Parameter | Type | Description |
|---|---|---|
code * | string | Python code using the diagrams package DSL. The runtime already imports everything needed so you can start immediately using `with Diagram(` |
filename | The filename to save the diagram to. If not provided, a random name will be generated. | |
timeout | integer | The timeout for diagram generation in seconds. Default is 90 seconds. |
workspace_dir | The user's current workspace directory. CRITICAL: Client must always send the current workspace directory when calling this tool! If provided, diagrams will be saved to a 'generated-diagrams' subdirec… |
get_diagram_examples
Get example code for different types of diagrams. This tool provides ready-to-use example code for various diagram types across all major cloud providers, on-premises, hybrid, and multi-cloud architectures. Use these examples to understand the syntax and capabilities of the diagrams package before creating your own custom diagrams. USAGE INSTRUCTIONS: 1. Select the diagram type you're interested in (or 'all' to see all examples) 2. Study the returned examples to understand the structure and syntax 3. Use these examples as templates for your own diagrams 4. When ready, modify an example or wr…
| Parameter | Type | Description |
|---|---|---|
diagram_type | Type of diagram example to return. Options: aws, gcp, azure, k8s, onprem, hybrid, multicloud, sequence, flow, class, custom, all |
list_icons
List available icons from the diagrams package, with optional filtering. This tool dynamically inspects the diagrams package to find available providers, services, and icons that can be used in diagrams. USAGE INSTRUCTIONS: 1. Call without filters to get a list of available providers 2. Call with provider_filter to get all services and icons for that provider 3. Call with both provider_filter and service_filter to get icons for a specific service Example workflow: - First call: list_icons() → Returns all available providers - Second call: list_icons(provider_filter="aws") → Returns all…
| Parameter | Type | Description |
|---|---|---|
provider_filter | Filter icons by provider name (e.g., "aws", "gcp", "k8s") | |
service_filter | Filter icons by service name (e.g., "compute", "database", "network") |
parse_k8s_manifest
Parse Kubernetes YAML manifests and extract resources and their relationships. This tool parses K8s manifests and returns structured data about resources and connections. After receiving the parsed data, use list_icons to find appropriate icons, then generate_diagram. SUPPORTED INPUTS: - Single YAML file path: "/path/to/deployment.yaml" - Directory path: "/path/to/k8s-manifests/" (parses all .yaml/.yml files) - Inline YAML content: Paste the YAML directly (supports multi-document with ---) SUPPORTED RESOURCES: - Workloads: Pod, Deployment, StatefulSet, DaemonSet, ReplicaSet, Job, CronJob -…
| Parameter | Type | Description |
|---|---|---|
input_source * | string | File path to YAML file/directory, OR inline YAML content (multi-document supported with --- separators) |
parse_helm_chart
Parse a Helm chart and extract K8s resources and their relationships. This tool parses Helm charts and returns structured data about resources and connections. After receiving the parsed data, use list_icons to find appropriate icons, then generate_diagram. INPUTS: - chart_path: Directory containing Chart.yaml, or path to .tgz packaged chart - values_file: Optional values.yaml override file - values_inline: Optional inline YAML values as a string HELM CLI: - If `helm` is available on PATH, uses `helm template` for accurate rendering - If unavailable, falls back to basic Go template parsing…
| Parameter | Type | Description |
|---|---|---|
chart_path * | string | Path to Helm chart directory (containing Chart.yaml) or .tgz file |
namespace | string | Target namespace for templating |
release_name | string | Helm release name for templating |
values_file | Path to values.yaml override file | |
values_inline | Inline YAML values to override chart defaults (as a YAML string) |
parse_terraform
Parse Terraform configurations and extract resources and their relationships. This tool parses Terraform HCL files and returns structured data about resources and connections. After receiving the parsed data, use list_icons to find appropriate icons, then generate_diagram. SUPPORTED INPUTS: - Single .tf file: "/path/to/main.tf" - Directory: "/path/to/terraform/" (parses all .tf files) - Inline HCL: Paste Terraform code directly SUPPORTED PROVIDERS: - AWS (aws_*): EC2, Lambda, S3, RDS, VPC, EKS, etc. - GCP (google_*): Compute Engine, Cloud Run, GKE, BigQuery, etc. - Azure (azurerm_*): VMs, A…
| Parameter | Type | Description |
|---|---|---|
input_source * | string | Path to .tf file, directory containing .tf files, OR inline HCL content |