AWS Diagram MCP Server

AWS Diagram MCP Server

AWS Diagram MCP Server is a specialized component in the AWS MCP Servers suite that enables LLM-powered applications and AI coding assistants to generate architecture diagrams and technical illustrations for AWS-based solutions. It bridges the gap between conversational requests and technical diagram generation, empowering users to quickly visualize AWS infrastructure from plain text, code, or specifications.

Author: awslabs


View Protocol

What is AWS Diagram MCP Server?

AWS Diagram MCP Server is a lightweight program implementing the Model Context Protocol (MCP) that exposes diagram generation capabilities focused on AWS architectures. It allows LLMs and developer tools to programmatically produce architecture diagrams, technical illustrations, or workflow visuals based on project descriptions, code snippets, or infrastructure definitions such as CDK, Terraform, or CloudFormation. The server automates and standardizes the creation of diagrams, making technical documentation and infrastructure planning more efficient and visually intuitive.

How to Configure

  1. Install requirements:
    • Ensure Python is installed (recommend version 3.10+).
    • Install the Astral uv package manager.
  2. Install the server:
    • Add the AWS Diagram MCP Server as an MCP server in your desired client’s configuration file (e.g., mcp.json, cline_mcp_settings.json, etc.).
    • Example snippet:
      {
        "mcpServers": {
          "awslabs.aws-diagram-mcp-server": {
            "command": "uvx",
            "args": ["awslabs.aws-diagram-mcp-server@latest"],
            "env": {
              "FASTMCP_LOG_LEVEL": "ERROR"
            }
          }
        }
      }
      
  3. Set up environment (if needed):
    • No AWS credentials are required unless you use other integrated services.
    • Optionally, set environment variables for logging or advanced configuration.
  4. Enable in client:
    • Make sure the server is enabled (not "disabled": true).
    • Restart or reload your MCP client to register the new server.

How to Use

  1. In your AI development tool, IDE, or chat client, ensure AWS Diagram MCP Server shows up as an available MCP server/tool.
  2. Write a conversational prompt or code request, e.g., “Generate an architecture diagram based on this CDK code…” or “Show me a diagram for a VPC with 2 public subnets and 1 private subnet...”
  3. The LLM, via the client, invokes the diagram generation tool exposed by the MCP server, which returns a diagram (usually as SVG, PNG, or a diagram markup like PlantUML).
  4. The tool can be explicitly called or automatically triggered if your assistant recognizes a request for a diagram.
  5. Save, edit, or export the diagram as needed within your workflow.

Key Features

  • Automated Diagram Generation: Converts plain text, code, or infrastructure descriptions into AWS architecture diagrams on demand.
  • Supports Multiple Input Types: Accepts infrastructure as code (e.g., CDK, CloudFormation, Terraform), architecture specs, or high-level descriptions.
  • Integration with AI Assistants: Easily connects with coding assistants (e.g., Amazon Q, Cursor, Cline, Claude) and chat bots for seamless workflow.
  • High-Quality Visual Output: Produces clear technical diagrams, often leveraging popular diagramming standards or formats (e.g., PlantUML, Mermaid).
  • Customizability: Allows for parameter adjustments, diagram styling, and output format selection.
  • Fast and Stateless: Lightweight server suitable for both AI-driven and manual workflows.
  • Secure and Local Execution: No sensitive AWS credentials needed for diagram generation.

Use Cases

  • Technical Documentation: Instantly create infrastructure diagrams for Wiki pages, README documentation, or architecture reviews.
  • Cloud Architecture Visualization: Visualize IaC resources (Terraform, CDK, CloudFormation) during code reviews or design sessions.
  • Solution Proposals: Generate and share solution architecture diagrams for project pitches or design meetings.
  • DevOps Automation: Integrate into CI/CD pipelines to auto-generate up-to-date system diagrams.
  • Onboarding and Training: Help new team members understand project architectures via auto-generated visuals.
  • Conversational Diagramming: Let non-experts request diagrams in plain English via AI assistants.

FAQ

1. What input formats does the AWS Diagram MCP Server support?

The server can process infrastructure code (CDK, Terraform, CloudFormation), architectural descriptions, and even natural language prompts describing AWS environments. It parses and renders the appropriate visual representation.

2. What output formats are available for the diagrams?

The server typically returns diagrams as SVG, PNG, or text-based markup such as PlantUML, mermaid, or similar diagramming languages, depending on client capabilities and parameters.

3. Is AWS authentication required to use the AWS Diagram MCP Server?

No AWS authentication is required unless you want to access private code or AWS resources. For most architectural diagram generation, only local input is necessary.

4. Can I customize the style or contents of the generated diagrams?

Yes, you can often specify diagram style, layout, or detail level through tool parameters or input options, depending on the MCP client and exposed capabilities.

5. How does this integrate with my coding assistant or IDE?

Once the AWS Diagram MCP Server is configured, your AI coding assistant or IDE will recognize it as a tool. You can trigger diagram creation via conversational requests, code comments, or explicit tool use, and review/edit the diagrams within your IDE or chat interface.

6. Is my code or diagram data sent to any external server?

No, the MCP server can run entirely locally, keeping your code and data private. If you use cloud-based clients, verify their handling of data, but the MCP server itself is designed for secure, local operation.