awslabs.aws-diagram-mcp-server


Nameawslabs.aws-diagram-mcp-server JSON
Version 1.0.11 PyPI version JSON
download
home_pageNone
SummaryAn MCP server that seamlessly creates diagrams using the Python diagrams package DSL
upload_time2025-10-22 17:35:34
maintainerNone
docs_urlNone
authorAmazon Web Services
requires_python>=3.12
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AWS Diagram MCP Server

Model Context Protocol (MCP) server for AWS Diagrams

This MCP server that seamlessly creates [diagrams](https://diagrams.mingrammer.com/) using the Python diagrams package DSL. This server allows you to generate AWS diagrams, sequence diagrams, flow diagrams, and class diagrams using Python code.

[![Tests](https://img.shields.io/badge/tests-passing-brightgreen.svg)](https://github.com/awslabs/mcp/blob/main/src/aws-diagram-mcp-server/tests/)

## Prerequisites

1. Install `uv` from [Astral](https://docs.astral.sh/uv/getting-started/installation/) or the [GitHub README](https://github.com/astral-sh/uv#installation)
2. Install Python using `uv python install 3.10`
3. Install GraphViz https://www.graphviz.org/

## Installation

| Cursor | VS Code |
|:------:|:-------:|
| [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/en/install-mcp?name=awslabs.aws-diagram-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMuYXdzLWRpYWdyYW0tbWNwLXNlcnZlciIsImVudiI6eyJGQVNUTUNQX0xPR19MRVZFTCI6IkVSUk9SIn0sImF1dG9BcHByb3ZlIjpbXSwiZGlzYWJsZWQiOmZhbHNlfQ%3D%3D) | [![Install on VS Code](https://img.shields.io/badge/Install_on-VS_Code-FF9900?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=AWS%20Diagram%20MCP%20Server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.aws-diagram-mcp-server%22%5D%2C%22env%22%3A%7B%22FASTMCP_LOG_LEVEL%22%3A%22ERROR%22%7D%2C%22autoApprove%22%3A%5B%5D%2C%22disabled%22%3Afalse%7D) |

Configure the MCP server in your MCP client configuration (e.g., for Amazon Q Developer CLI, edit `~/.aws/amazonq/mcp.json`):

```json
{
  "mcpServers": {
    "awslabs.aws-diagram-mcp-server": {
      "command": "uvx",
      "args": ["awslabs.aws-diagram-mcp-server"],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR"
      },
      "autoApprove": [],
      "disabled": false
    }
  }
}
```
### Windows Installation

For Windows users, the MCP server configuration format is slightly different:

```json
{
  "mcpServers": {
    "awslabs.aws-diagram-mcp-server": {
      "disabled": false,
      "timeout": 60,
      "type": "stdio",
      "command": "uv",
      "args": [
        "tool",
        "run",
        "--from",
        "awslabs.aws-diagram-mcp-server@latest",
        "awslabs.aws-diagram-mcp-server.exe"
      ],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR",
        "AWS_PROFILE": "your-aws-profile",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}
```


or docker after a successful `docker build -t awslabs/aws-diagram-mcp-server .`:

```json
  {
    "mcpServers": {
      "awslabs.aws-diagram-mcp-server": {
        "command": "docker",
        "args": [
          "run",
          "--rm",
          "--interactive",
          "--env",
          "FASTMCP_LOG_LEVEL=ERROR",
          "awslabs/aws-diagram-mcp-server:latest"
        ],
        "env": {},
        "disabled": false,
        "autoApprove": []
      }
    }
  }
```

## Features

The Diagrams MCP Server provides the following capabilities:

1. **Generate Diagrams**: Create professional diagrams using Python code
2. **Multiple Diagram Types**: Support for AWS architecture, sequence diagrams, flow charts, class diagrams, and more
3. **Customization**: Customize diagram appearance, layout, and styling
4. **Security**: Code scanning to ensure secure diagram generation

## Quick Example

```python
from diagrams import Diagram
from diagrams.aws.compute import Lambda
from diagrams.aws.database import Dynamodb
from diagrams.aws.network import APIGateway

with Diagram("Serverless Application", show=False):
    api = APIGateway("API Gateway")
    function = Lambda("Function")
    database = Dynamodb("DynamoDB")

    api >> function >> database
```

## Development

### Testing

The project includes a comprehensive test suite to ensure the functionality of the MCP server. The tests are organized by module and cover all aspects of the server's functionality.

To run the tests, use the provided script:

```bash
./run_tests.sh
```

This script will automatically install pytest and its dependencies if they're not already installed.

Or run pytest directly (if you have pytest installed):

```bash
pytest -xvs tests/
```

To run with coverage:

```bash
pytest --cov=awslabs.aws_diagram_mcp_server --cov-report=term-missing tests/
```

For more information about the tests, see the [tests README](https://github.com/awslabs/mcp/blob/main/src/aws-diagram-mcp-server/tests/README.md).

### Development Dependencies

To set up the development environment, install the development dependencies:

```bash
uv pip install -e ".[dev]"
```

This will install the required dependencies for development, including pytest, pytest-asyncio, and pytest-cov.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "awslabs.aws-diagram-mcp-server",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": null,
    "author": "Amazon Web Services",
    "author_email": "AWSLabs MCP <203918161+awslabs-mcp@users.noreply.github.com>",
    "download_url": "https://files.pythonhosted.org/packages/c9/ff/1a41604874eeedeb409e30c5f63bc3847609d5af8a885adfe7820ef38aad/awslabs_aws_diagram_mcp_server-1.0.11.tar.gz",
    "platform": null,
    "description": "# AWS Diagram MCP Server\n\nModel Context Protocol (MCP) server for AWS Diagrams\n\nThis MCP server that seamlessly creates [diagrams](https://diagrams.mingrammer.com/) using the Python diagrams package DSL. This server allows you to generate AWS diagrams, sequence diagrams, flow diagrams, and class diagrams using Python code.\n\n[![Tests](https://img.shields.io/badge/tests-passing-brightgreen.svg)](https://github.com/awslabs/mcp/blob/main/src/aws-diagram-mcp-server/tests/)\n\n## Prerequisites\n\n1. Install `uv` from [Astral](https://docs.astral.sh/uv/getting-started/installation/) or the [GitHub README](https://github.com/astral-sh/uv#installation)\n2. Install Python using `uv python install 3.10`\n3. Install GraphViz https://www.graphviz.org/\n\n## Installation\n\n| Cursor | VS Code |\n|:------:|:-------:|\n| [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/en/install-mcp?name=awslabs.aws-diagram-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMuYXdzLWRpYWdyYW0tbWNwLXNlcnZlciIsImVudiI6eyJGQVNUTUNQX0xPR19MRVZFTCI6IkVSUk9SIn0sImF1dG9BcHByb3ZlIjpbXSwiZGlzYWJsZWQiOmZhbHNlfQ%3D%3D) | [![Install on VS Code](https://img.shields.io/badge/Install_on-VS_Code-FF9900?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=AWS%20Diagram%20MCP%20Server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.aws-diagram-mcp-server%22%5D%2C%22env%22%3A%7B%22FASTMCP_LOG_LEVEL%22%3A%22ERROR%22%7D%2C%22autoApprove%22%3A%5B%5D%2C%22disabled%22%3Afalse%7D) |\n\nConfigure the MCP server in your MCP client configuration (e.g., for Amazon Q Developer CLI, edit `~/.aws/amazonq/mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"awslabs.aws-diagram-mcp-server\": {\n      \"command\": \"uvx\",\n      \"args\": [\"awslabs.aws-diagram-mcp-server\"],\n      \"env\": {\n        \"FASTMCP_LOG_LEVEL\": \"ERROR\"\n      },\n      \"autoApprove\": [],\n      \"disabled\": false\n    }\n  }\n}\n```\n### Windows Installation\n\nFor Windows users, the MCP server configuration format is slightly different:\n\n```json\n{\n  \"mcpServers\": {\n    \"awslabs.aws-diagram-mcp-server\": {\n      \"disabled\": false,\n      \"timeout\": 60,\n      \"type\": \"stdio\",\n      \"command\": \"uv\",\n      \"args\": [\n        \"tool\",\n        \"run\",\n        \"--from\",\n        \"awslabs.aws-diagram-mcp-server@latest\",\n        \"awslabs.aws-diagram-mcp-server.exe\"\n      ],\n      \"env\": {\n        \"FASTMCP_LOG_LEVEL\": \"ERROR\",\n        \"AWS_PROFILE\": \"your-aws-profile\",\n        \"AWS_REGION\": \"us-east-1\"\n      }\n    }\n  }\n}\n```\n\n\nor docker after a successful `docker build -t awslabs/aws-diagram-mcp-server .`:\n\n```json\n  {\n    \"mcpServers\": {\n      \"awslabs.aws-diagram-mcp-server\": {\n        \"command\": \"docker\",\n        \"args\": [\n          \"run\",\n          \"--rm\",\n          \"--interactive\",\n          \"--env\",\n          \"FASTMCP_LOG_LEVEL=ERROR\",\n          \"awslabs/aws-diagram-mcp-server:latest\"\n        ],\n        \"env\": {},\n        \"disabled\": false,\n        \"autoApprove\": []\n      }\n    }\n  }\n```\n\n## Features\n\nThe Diagrams MCP Server provides the following capabilities:\n\n1. **Generate Diagrams**: Create professional diagrams using Python code\n2. **Multiple Diagram Types**: Support for AWS architecture, sequence diagrams, flow charts, class diagrams, and more\n3. **Customization**: Customize diagram appearance, layout, and styling\n4. **Security**: Code scanning to ensure secure diagram generation\n\n## Quick Example\n\n```python\nfrom diagrams import Diagram\nfrom diagrams.aws.compute import Lambda\nfrom diagrams.aws.database import Dynamodb\nfrom diagrams.aws.network import APIGateway\n\nwith Diagram(\"Serverless Application\", show=False):\n    api = APIGateway(\"API Gateway\")\n    function = Lambda(\"Function\")\n    database = Dynamodb(\"DynamoDB\")\n\n    api >> function >> database\n```\n\n## Development\n\n### Testing\n\nThe project includes a comprehensive test suite to ensure the functionality of the MCP server. The tests are organized by module and cover all aspects of the server's functionality.\n\nTo run the tests, use the provided script:\n\n```bash\n./run_tests.sh\n```\n\nThis script will automatically install pytest and its dependencies if they're not already installed.\n\nOr run pytest directly (if you have pytest installed):\n\n```bash\npytest -xvs tests/\n```\n\nTo run with coverage:\n\n```bash\npytest --cov=awslabs.aws_diagram_mcp_server --cov-report=term-missing tests/\n```\n\nFor more information about the tests, see the [tests README](https://github.com/awslabs/mcp/blob/main/src/aws-diagram-mcp-server/tests/README.md).\n\n### Development Dependencies\n\nTo set up the development environment, install the development dependencies:\n\n```bash\nuv pip install -e \".[dev]\"\n```\n\nThis will install the required dependencies for development, including pytest, pytest-asyncio, and pytest-cov.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "An MCP server that seamlessly creates diagrams using the Python diagrams package DSL",
    "version": "1.0.11",
    "project_urls": {
        "Bug Tracker": "https://github.com/awslabs/mcp/issues",
        "Changelog": "https://github.com/awslabs/mcp/blob/main/src/aws-diagram-mcp-server/CHANGELOG.md",
        "Documentation": "https://awslabs.github.io/mcp/servers/aws-diagram-mcp-server/",
        "Homepage": "https://awslabs.github.io/mcp/",
        "Source": "https://github.com/awslabs/mcp.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "13c5cf4cbc23c505ebbcdd5727a09f0214c14c394469615dadd1a2d84bb9971a",
                "md5": "bc86136ba53e73ea414e1a66aba3adc9",
                "sha256": "e3e52407a5c32dd439cbd2c120c9c18bdab02da0edccb177cf775b8ec00f77bc"
            },
            "downloads": -1,
            "filename": "awslabs_aws_diagram_mcp_server-1.0.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bc86136ba53e73ea414e1a66aba3adc9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 25705,
            "upload_time": "2025-10-22T17:35:32",
            "upload_time_iso_8601": "2025-10-22T17:35:32.789379Z",
            "url": "https://files.pythonhosted.org/packages/13/c5/cf4cbc23c505ebbcdd5727a09f0214c14c394469615dadd1a2d84bb9971a/awslabs_aws_diagram_mcp_server-1.0.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c9ff1a41604874eeedeb409e30c5f63bc3847609d5af8a885adfe7820ef38aad",
                "md5": "8ef42a09b352eff4442e80b3d7d74541",
                "sha256": "4d997318a23fa90e98207a36baac488c146c0cc6caca38e0a713f38b99cbe6e4"
            },
            "downloads": -1,
            "filename": "awslabs_aws_diagram_mcp_server-1.0.11.tar.gz",
            "has_sig": false,
            "md5_digest": "8ef42a09b352eff4442e80b3d7d74541",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 89651,
            "upload_time": "2025-10-22T17:35:34",
            "upload_time_iso_8601": "2025-10-22T17:35:34.474239Z",
            "url": "https://files.pythonhosted.org/packages/c9/ff/1a41604874eeedeb409e30c5f63bc3847609d5af8a885adfe7820ef38aad/awslabs_aws_diagram_mcp_server-1.0.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-22 17:35:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "awslabs",
    "github_project": "mcp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "awslabs.aws-diagram-mcp-server"
}
        
Elapsed time: 1.98085s