Skip to main content
Glama

cloudcraft-mcp

CI License: MIT Python 3.10+

Model Context Protocol (MCP)-Server für Cloudcraft.co — Auflisten, Lesen, Exportieren und Erstellen von Cloud-Architektur-Blueprints über Claude Desktop und andere MCP-Clients.

Funktionen

Neun Tools, die dem MCP-Host zur Verfügung gestellt werden:

Tool

Beschreibung

whoami

Gibt das Cloudcraft-Benutzerprofil für den konfigurierten Schlüssel zurück.

list_blueprints

Listet alle Blueprints im Konto auf.

get_blueprint

Ruft das vollständige Knoten-/Kanten-JSON eines Blueprints ab.

create_blueprint

Erstellt einen neuen Blueprint aus einem JSON-Payload.

update_blueprint

Ersetzt den Payload eines bestehenden Blueprints.

delete_blueprint

Löscht einen Blueprint (nicht umkehrbar).

export_blueprint_image

Rendert einen Blueprint als PNG / SVG / PDF / mxgraph auf die Festplatte.

list_aws_accounts

Listet AWS-Konten auf, die für Live-Scan-Snapshots verbunden sind.

snapshot_aws

Erstellt einen Live-Scan-Snapshot eines AWS-Dienstes.

Related MCP server: AWS MCP Server

Anforderungen

  • Python 3.10+

  • uv (brew install uv)

  • Cloudcraft API-Schlüssel — generieren Sie einen unter https://app.cloudcraft.co/ → User settings → API keys

Installation

Klonen Sie das Repo und lassen Sie uv die Abhängigkeiten beim ersten Ausführen auflösen — kein expliziter Installationsschritt erforderlich.

git clone https://github.com/hypark5540/cloudcraft-mcp.git
cd cloudcraft-mcp
export CLOUDCRAFT_API_KEY='your-key-here'
uv run cloudcraft-mcp   # smoke test — Ctrl+C to exit

Claude Desktop-Integration

Bearbeiten Sie ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) oder das Äquivalent auf Ihrer Plattform:

{
  "mcpServers": {
    "cloudcraft": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/cloudcraft-mcp",
        "run",
        "cloudcraft-mcp"
      ],
      "env": {
        "CLOUDCRAFT_API_KEY": "your-key-here"
      }
    }
  }
}

Starten Sie Claude Desktop neu. Der Entwickler-Tab sollte cloudcraft als verbunden anzeigen.

Umgebungsvariablen

Name

Erforderlich

Standard

Zweck

CLOUDCRAFT_API_KEY

ja

—

API-Schlüssel (Bearer). Generiert in den Cloudcraft-Benutzereinstellungen.

CLOUDCRAFT_BASE_URL

nein

https://api.cloudcraft.co

Überschreibung für Proxys oder zukünftige API-Versionen.

CLOUDCRAFT_LOG_LEVEL

nein

WARNING

Stderr-Log-Ausführlichkeit (DEBUG / INFO / WARNING / ERROR).

Nutzungsbeispiele (in Claude)

Sobald der Server verbunden ist, können Sie Claude Dinge fragen wie:

"List my Cloudcraft blueprints and summarize what each represents."

"Export blueprint f0086b32-... as PNG and save it to my Desktop."

"Take the architecture I just designed and create a new Cloudcraft blueprint called 'Prod 2026'."

"Snapshot the EC2 instances in ap-northeast-2 for my connected AWS account."

Blueprint-Payload-Struktur

create_blueprint / update_blueprint akzeptieren das vollständige Cloudcraft data-Objekt. Ein minimaler Payload:

{
  "grid": "infinite",
  "projection": "isometric",
  "theme": {"base": "light"},
  "version": 6,
  "nodes": [
    {"id": "...", "type": "ec2", "mapPos": [3, 3], "region": "ap-northeast-2",
     "instanceType": "m7g", "instanceSize": "large", "platform": "linux"},
    {"id": "...", "type": "s3",  "mapPos": [1, 8], "region": "ap-northeast-2",
     "volumeType": "Standard", "dataGb": 100}
  ],
  "edges": [
    {"from": "...ec2-id...", "to": "...s3-id...", "type": "edge",
     "width": 2, "dashed": false, "endCap": "arrow"}
  ],
  "groups": [], "surfaces": [], "text": [], "icons": [],
  "connectors": [], "images": [], "disabledLayers": [],
  "shareDocs": false
}

Informationen zum vollständigen Knotentyp-Katalog und dienstspezifischen Feldern finden Sie in der Cloudcraft API-Dokumentation.

Entwicklung

uv sync --extra dev
uv run pytest            # unit tests (no network)
uv run ruff check .      # lint
uv run mypy src          # type check

Tests simulieren die HTTP-Ebene mit respx, sodass kein API-Schlüssel erforderlich ist.

Projektlayout

cloudcraft-mcp/
├── src/cloudcraft_mcp/
│   ├── __init__.py
│   ├── __main__.py         # python -m cloudcraft_mcp
│   ├── server.py           # MCP tool definitions (FastMCP)
│   ├── client.py           # CloudcraftClient — async httpx wrapper
│   ├── types.py            # TypedDicts for blueprint payloads
│   └── py.typed
├── tests/
│   └── test_client.py
├── server.py               # back-compat shim -> cloudcraft_mcp.server:main
├── pyproject.toml
├── LICENSE
└── README.md

Design-Hinweise

  • Transport-/Logik-Trennung. client.py ist ein einfacher asynchroner HTTP-Client, den Sie aus Skripten oder CLI-Tools importieren können, ohne die MCP-Laufzeitumgebung zu laden. server.py verwaltet nur die MCP-Tool-Oberfläche.

  • Bearer-Token-Authentifizierung. Die API von Cloudcraft erwartet Authorization: Bearer <key> (nicht Apikey). Der Client setzt dies automatisch.

  • Keine Geheimnisse in Prozessargumenten. Der API-Schlüssel wird aus CLOUDCRAFT_API_KEY gelesen; übergeben Sie ihn niemals über die Befehlszeile.

  • Fehlerbehandlung. Nicht-2xx-Antworten lösen einen CloudcraftError aus, wobei Status und Body erhalten bleiben und an der MCP-Grenze als RuntimeError neu verpackt werden, damit Claude eine lesbare Nachricht erhält.

Sicherheit

  • API-Schlüssel gewähren vollen Lese-/Schreibzugriff auf Ihr Cloudcraft-Konto. Behandeln Sie sie als Geheimnisse und rotieren Sie sie regelmäßig.

  • delete_blueprint ist nicht umkehrbar — wenn Sie Claude bitten, etwas zu löschen, seien Sie präzise bezüglich der Ziel-ID.

  • Erstellen Sie für leseintensive Setups einen dedizierten Cloudcraft-Benutzer mit schreibgeschütztem Bereich (falls/sobald Cloudcraft bereichsbezogene Schlüssel hinzufügt) und verwenden Sie diesen Schlüssel für MCP.

Mitwirken

Issues und PRs sind willkommen unter https://github.com/hypark5540/cloudcraft-mcp. Bitte führen Sie ruff, mypy und pytest aus, bevor Sie etwas einreichen.

Lizenz

MIT — siehe LICENSE.

Verwandtes

Available Tools

13 tools
create_blueprintB

Create a new Cloudcraft blueprint.

Args: name: Display name for the new blueprint. data: Full blueprint payload (nodes, edges, groups, surfaces, text, icons, connectors, theme, projection, etc.). See README for a minimal example.

Returns the created blueprint metadata including the assigned id.

Inputs: data (required), name (required). Returns: object

delete_blueprintA
Destructive

Delete a Cloudcraft blueprint after exact-id confirmation.

Args: blueprint_id: Blueprint UUID. confirm_blueprint_id: Repeat the exact UUID to acknowledge the irreversible operation.

Inputs: blueprint_id (required), confirm_blueprint_id (required). Returns: object

export_blueprint_budgetA
Destructive

Export a blueprint's cost estimate (budget) to a CSV or XLSX file on disk.

Same write sandbox as :func:export_blueprint_image.

Args: blueprint_id: Blueprint UUID. format: csv or xlsx. Default csv. output_path: Absolute path under the export directory. Default: <export_dir>/cloudcraft_<uuid>_budget.<ext>. currency: ISO 4217 code — USD (default), AUD, CHF, EUR, GBP, HKD, JPY, NOK, NZD, SEK, ZAR. period: h hourly, d daily, w weekly, m monthly (default), y yearly. rate: effective (default, includes upfront fees) or stated. overwrite: Set True to replace an existing file.

Returns: {"path": <saved_path>, "bytes": <size>, "format": <fmt>}

Inputs: blueprint_id (required), rate, format, period, +3 more. Returns: object

export_blueprint_imageA
Destructive

Render a Cloudcraft blueprint to an image file on disk.

Writes are restricted to CLOUDCRAFT_EXPORT_DIR (default: system temp directory). Set CLOUDCRAFT_EXPORT_DIR=/path/to/dir in the MCP server environment to allow saving under a different directory.

Args: blueprint_id: Blueprint UUID. format: One of png, svg, pdf, mxgraph. Default png. output_path: Absolute path to save to, must resolve under the export directory. Default: <export_dir>/cloudcraft_<uuid>.<ext>. scale: Optional PNG render scale (e.g. 1.0, 2.0). PNG only. transparent: PNG transparent background (bool). PNG only. overwrite: Set True to replace an existing file at output_path. Default False — existing files are preserved.

Returns: {"path": <saved_path>, "bytes": <size>, "format": <fmt>}

Inputs: blueprint_id (required), scale, format, overwrite, +2 more. Returns: object

get_blueprintA
Read-only

Fetch the full blueprint payload (nodes, edges, groups, layout).

Args: blueprint_id: Blueprint UUID from :func:list_blueprints.

Inputs: blueprint_id (required). Returns: object

list_aws_accountsA
Read-only

List AWS accounts registered with Cloudcraft for live-scan snapshots.

Inputs: no named parameters. Returns: object

list_azure_accountsA
Read-only

List Azure accounts registered with Cloudcraft for live-scan snapshots.

Inputs: no named parameters. Returns: object

list_blueprintsA
Read-only

List every Cloudcraft blueprint (diagram) in the authenticated account.

Returns a compact summary per blueprint (id, name, tags, updatedAt). Use :func:get_blueprint afterwards to pull the full node / edge JSON.

Inputs: no named parameters. Returns: object

list_teamsB
Read-only

List the teams linked to the Cloudcraft account (id, name, members).

Inputs: no named parameters. Returns: object

snapshot_awsB
Idempotent

Scan one AWS region into a blueprint JSON via Cloudcraft live-scan.

Inputs: region (required), account_id (required), filter, exclude. Returns: object

snapshot_azureC
Idempotent

Scan one Azure region into a blueprint JSON via Cloudcraft live-scan.

Inputs: region (required), account_id (required), filter, exclude. Returns: object

update_blueprintA
DestructiveIdempotent

Replace the full data payload of an existing blueprint.

Args: blueprint_id: Blueprint UUID. data: Full blueprint payload (same shape as :func:create_blueprint).

Inputs: data (required), blueprint_id (required). Returns: object

whoamiA
Read-only

Return the Cloudcraft user profile for the current API key.

Useful as a sanity check after configuring a new key.

Inputs: no named parameters. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 13 tools

    Disambiguation5/5

    Each tool maps to a distinct resource/action pair: team/profile read, blueprint CRUD, two clearly separated export formats (image vs budget), and account listing vs region snapshots. The only near-overlap, export_blueprint_image vs export_blueprint_budget, is made unambiguous by explicit format and output descriptions.

    Naming Consistency4/5

    Almost everything follows a clean verb_noun snake_case pattern (list_*, get_*, create_*, update_*, delete_*, export_*, snapshot_*). The lone deviation is `whoami`, which breaks the pattern but is idiomatic and unambiguous.

    Tool Count5/5

    13 tools is well within the ideal 3-15 range and each earns its place: 5 blueprint CRUD tools, 2 exports, 2 account listers, 2 snapshotters, plus team/profile reads. No filler tools.

    Completeness4/5

    Blueprint lifecycle is fully covered (list/get/create/update/delete plus image and budget export), and both AWS and Azure snapshot paths exist. Minor gaps: no account-level get/registration tools, no team management, and update_blueprint replaces the whole payload so rename/metadata edits are awkward — all workaroundable.

    Maintenance

    ActivityMaintained
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables Claude to interact with core AWS services like S3, EC2, RDS, and CloudWatch, along with a generic SDK wrapper for any AWS operation. It also supports cost monitoring and optional vector store capabilities for document ingestion and search.
      10
      3
      -
    • A
      license
      B
      quality
      D
      maintenance
      Enables Claude Desktop to interact with 57 AWS services using over 200 tools and local machine profiles. It supports multi-profile configurations and features a read-only safe mode by default to manage infrastructure like EC2, S3, and Lambda securely.
      100
      BSD 3-Clause
    • A
      license
      A
      quality
      D
      maintenance
      Enables browsing S3 buckets and objects, and generating secure presigned URLs for downloads and uploads, through natural language commands in MCP clients like Claude Desktop.
      3
      4
      MIT