Skip to main content
Glama

cloudcraft-mcp

CI License: MIT Python 3.10+

Cloudcraft.co 用のModel Context Protocol (MCP) サーバー — Claude Desktopやその他のMCPクライアントから、クラウドアーキテクチャの設計図をリスト表示、読み取り、エクスポート、構築できます。

機能

MCPホストに公開される9つのツール:

ツール

説明

whoami

設定されたキーのCloudcraftユーザープロファイルを返します。

list_blueprints

アカウント内のすべての設計図をリスト表示します。

get_blueprint

設計図の完全なノード/エッジJSONを取得します。

create_blueprint

JSONペイロードから新しい設計図を作成します。

update_blueprint

既存の設計図のペイロードを置き換えます。

delete_blueprint

設計図を削除します(元に戻せません)。

export_blueprint_image

設計図をPNG / SVG / PDF / mxgraphとしてディスクにレンダリングします。

list_aws_accounts

ライブスキャン・スナップショット用に接続されたAWSアカウントをリスト表示します。

snapshot_aws

1つのAWSサービスのライブスキャン・スナップショットを取得します。

Related MCP server: AWS MCP Server

要件

  • Python 3.10+

  • uv (brew install uv)

  • Cloudcraft APIキー — https://app.cloudcraft.co/ → User settings → API keys から生成してください

インストール

リポジトリをクローンし、初回実行時に uv が依存関係を解決するようにします。明示的なインストール手順は不要です。

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との統合

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) またはお使いのプラットフォームの同等のファイルを編集します:

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

Claude Desktopを再起動します。Developerタブに cloudcraft が接続済みとして表示されるはずです。

環境変数

名前

必須

デフォルト

目的

CLOUDCRAFT_API_KEY

はい

—

APIキー (Bearer)。Cloudcraftのユーザー設定で生成。

CLOUDCRAFT_BASE_URL

いいえ

https://api.cloudcraft.co

プロキシや将来のAPIバージョン用の上書き。

CLOUDCRAFT_LOG_LEVEL

いいえ

WARNING

Stderrログの冗長性 (DEBUG / INFO / WARNING / ERROR)。

使用例 (Claude内)

サーバーが接続されたら、Claudeに以下のように尋ねてみてください:

"Cloudcraftの設計図をリストアップして、それぞれが何を表しているか要約して。"

"設計図 f0086b32-... をPNGとしてエクスポートしてデスクトップに保存して。"

"私が今設計したアーキテクチャを使って、『Prod 2026』という名前の新しいCloudcraft設計図を作成して。"

"接続されているAWSアカウントの ap-northeast-2 にあるEC2インスタンスのスナップショットを撮って。"

設計図のペイロード形式

create_blueprint / update_blueprint は、Cloudcraftの完全な data オブジェクトを受け入れます。最小限のペイロード:

{
  "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
}

ノードタイプのカタログやサービス固有のフィールドの詳細については、CloudcraftのAPIドキュメントを参照してください。

開発

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

テストは respx を使用してHTTPレイヤーをモックするため、APIキーは不要です。

プロジェクト構成

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

設計上の注意

  • トランスポートとロジックの分離。 client.py は、MCPランタイムを読み込まずにスクリプトやCLIツールからインポートできるシンプルな非同期HTTPクライアントです。server.py はMCPツールのインターフェースのみを担当します。

  • Bearerトークン認証。 CloudcraftのAPIは Authorization: Bearer <key> (Apikeyではない) を期待します。クライアントはこれを自動的に設定します。

  • プロセス引数にシークレットを含めない。 APIキーは CLOUDCRAFT_API_KEY から読み込まれます。コマンドラインで渡さないでください。

  • エラーの表面化。 2xx以外のレスポンスは、ステータスとボディを保持したまま CloudcraftError を発生させ、MCP境界で RuntimeError として再ラップされるため、Claudeは読み取り可能なメッセージを確認できます。

セキュリティ

  • APIキーはCloudcraftアカウントに対する完全な読み取り/書き込み権限を付与します。シークレットとして扱い、定期的にローテーションしてください。

  • delete_blueprint は元に戻せません。Claudeに削除を依頼する際は、対象のIDを明示してください。

  • 読み取りが中心のセットアップの場合は、読み取り専用スコープを持つ専用のCloudcraftユーザーを作成し(Cloudcraftがスコープ付きキーを追加した場合)、そのキーをMCPに使用してください。

コントリビューション

IssueやPRは https://github.com/hypark5540/cloudcraft-mcp で歓迎します。提出前に ruff、mypy、pytest を実行してください。

ライセンス

MIT — LICENSE を参照してください。

関連

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