Metadata-Version: 2.4
Name: scp-diagram-mcp-server
Version: 1.0.2
Summary: An MCP server that seamlessly creates diagrams using the Python diagrams package DSL
Author: Samsung SDS Corp.
License: Apache-2.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: bandit>=1.7.5
Requires-Dist: diagrams>=0.24.4
Requires-Dist: mcp[cli]>=1.6.0
Requires-Dist: pydantic>=2.10.6
Description-Content-Type: text/markdown

# SCP Diagram MCP Server

An MCP server that generates SCP (Samsung Cloud Platform) architecture diagrams and
Terraform IaC reference code using the Python [`diagrams`](https://diagrams.mingrammer.com/)
package.

## Features

- Generate professional SCP architecture diagrams
- Support for multiple diagram types (SCP, sequence, flow, class, k8s, onprem, custom)
- List available SCP icons and services
- Get diagram examples and templates
- Query SCP Terraform provider documentation (resources, data-sources)

The SCP icon provider is bundled inside this package, so no post-install icon
generation step is required.

## Prerequisites

Two things must be available on the machine that runs the MCP client:

1. **[uv](https://docs.astral.sh/uv/)** — used to download and run the server.
   - Windows: `irm https://astral.sh/uv/install.ps1 | iex`
   - macOS/Linux: `curl -LsSf https://astral.sh/uv/install.sh | sh`
2. **[Graphviz](https://graphviz.org/download/)** — the `diagrams` package shells out
   to the Graphviz `dot` executable to render PNGs. It is a native program and must be
   installed separately and available on `PATH`.
   - Windows: install from graphviz.org (or `winget install Graphviz.Graphviz`) and
     ensure the `bin` directory is on `PATH`
   - macOS: `brew install graphviz`
   - Linux (Debian/Ubuntu): `sudo apt-get install graphviz`

`uvx` installs the Python dependencies (`diagrams`, `mcp`, `pydantic`, `bandit`)
automatically; you do not need to `pip install` anything yourself.

## Usage

### Register with an MCP client

Once the package is published, add it to your MCP client configuration. `uvx`
downloads and runs it on demand — no manual install:

```json
{
  "mcpServers": {
    "scp-diagram": {
      "command": "uvx",
      "args": ["scp-diagram-mcp-server"]
    }
  }
}
```

### Run locally from source (development)

```bash
uv run python -m scp_diagram_mcp_server.server
```

## Tools

| Tool | Purpose |
|------|---------|
| `list_icons` | Discover available providers/services/icons (use `provider_filter="scp"`) |
| `get_diagram_examples` | Get example diagram code by type |
| `generate_diagram` | Render a PNG from `diagrams` DSL code |
| `list_terraform_resources` | List SCP Terraform resource/data-source types |
| `get_terraform_examples` | Get example HCL + attribute schema for SCP resources |

## Regenerating the bundled SCP provider

The provider under `scp_diagram_mcp_server/scp/` is generated from the SCP icon
asset package and committed to the repo. Only re-run this when the icons change:

```bash
python scripts/generate_scp_provider.py [icon_source_dir]
```

## License

Apache-2.0
