Model Context Protocol (MCP) server for Cloudcraft.co — list, read, export, create, update, and delete cloud architecture blueprints from Claude Desktop and other MCP clients.
Project description
cloudcraft-mcp
Model Context Protocol (MCP) server for Cloudcraft.co — list, read, export, and build cloud-architecture blueprints from Claude Desktop and other MCP clients.
Features
Nine tools exposed to the MCP host:
| Tool | Description |
|---|---|
whoami |
Return the Cloudcraft user profile for the configured key. |
list_blueprints |
List every blueprint in the account. |
get_blueprint |
Fetch a blueprint's full node / edge JSON. |
create_blueprint |
Create a new blueprint from a JSON payload. |
update_blueprint |
Replace an existing blueprint's payload. |
delete_blueprint |
Delete a blueprint (irreversible). |
export_blueprint_image |
Render a blueprint to PNG / SVG / PDF / mxgraph on disk. |
list_aws_accounts |
List AWS accounts connected for live-scan snapshots. |
snapshot_aws |
Take a live-scan snapshot of one AWS service. |
Requirements
- Python 3.10+
- uv (
brew install uv) - Cloudcraft API key — generate one at https://app.cloudcraft.co/ → User settings → API keys
Install
Clone the repo and let uv resolve dependencies on first run — no explicit install step required.
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
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent on your platform:
{
"mcpServers": {
"cloudcraft": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/cloudcraft-mcp",
"run",
"cloudcraft-mcp"
],
"env": {
"CLOUDCRAFT_API_KEY": "your-key-here"
}
}
}
}
Restart Claude Desktop. The Developer tab should show cloudcraft as connected.
Environment variables
| Name | Required | Default | Purpose |
|---|---|---|---|
CLOUDCRAFT_API_KEY |
yes | — | API key (Bearer). Generated in Cloudcraft User settings. |
CLOUDCRAFT_BASE_URL |
no | https://api.cloudcraft.co |
Override for proxies or future API versions. |
CLOUDCRAFT_LOG_LEVEL |
no | WARNING |
Stderr log verbosity (DEBUG / INFO / WARNING / ERROR). |
CLOUDCRAFT_EXPORT_DIR |
no | system temp dir | Directory that export_blueprint_image may write under. |
Usage examples (in Claude)
Once the server is connected, ask Claude things like:
"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-2for my connected AWS account."
Blueprint payload shape
create_blueprint / update_blueprint accept the full Cloudcraft data object. A minimal 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
}
Refer to Cloudcraft's API docs for the full node-type catalog and service-specific fields.
Development
uv sync --extra dev
uv run pytest # unit tests (no network)
uv run ruff check . # lint
uv run mypy src # type check
Tests mock the HTTP layer with respx so no API key is required.
Coverage
CI uploads coverage.xml from the Python 3.12 matrix cell to
Codecov. The project gate
is 80% or higher — a PR that drops overall or patch coverage by more
than 1 percentage point below that line fails the Codecov check
(codecov.yml).
Run the same report locally:
uv run pytest --cov=cloudcraft_mcp --cov-report=term-missing --cov-report=xml
Project layout
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 notes
- Transport / logic split.
client.pyis a plain async HTTP client you can import from scripts or CLI tools without pulling the MCP runtime.server.pyonly owns the MCP tool surface. - Bearer-token auth. Cloudcraft's API expects
Authorization: Bearer <key>(notApikey). The client sets this automatically. - No secrets in process args. The API key is read from
CLOUDCRAFT_API_KEY; never pass it on the command line. - Error surface. Non-2xx responses raise
CloudcraftErrorwith status and body preserved, re-wrapped asRuntimeErrorat the MCP boundary so Claude sees a readable message.
Security
- API keys grant full read / write over your Cloudcraft account. Treat them as secrets and rotate regularly.
- MCP tool annotations mark read-only tools and mutating/destructive tools so compatible hosts can present better approval prompts. These annotations are hints, not an enforcement layer.
- The server does not implement its own approval workflow for
create_blueprint,update_blueprint, ordelete_blueprint; those calls rely on the MCP host's tool approval UX and the permissions onCLOUDCRAFT_API_KEY. delete_blueprintis irreversible — when asking Claude to delete, be explicit about the target id.export_blueprint_imagewrites are sandboxed underCLOUDCRAFT_EXPORT_DIR(system temp dir by default) and refuse to overwrite existing files unlessoverwrite=True.- For read-heavy setups, create a dedicated Cloudcraft user with read-only scope (if/when Cloudcraft adds scoped keys) and use that key for MCP.
Contributing
Issues and PRs welcome at https://github.com/hypark5540/cloudcraft-mcp. Please run ruff, mypy, and pytest before submitting.
License
MIT — see LICENSE.
Related
- Cloudcraft API documentation
- Model Context Protocol specification
- awslabs/mcp — AWS's collection of MCP servers
- modelcontextprotocol/servers — reference MCP server implementations
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cloudcraft_mcp-0.1.5.tar.gz.
File metadata
- Download URL: cloudcraft_mcp-0.1.5.tar.gz
- Upload date:
- Size: 102.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1428320c0bb337adf624f73897f578847248e00ac6a2f421fa266b46fff768b
|
|
| MD5 |
9a098d89dbb80c496942cc0f293bd2de
|
|
| BLAKE2b-256 |
469b0587b463db7e75fc69562e294d39645b06a2bc39aaacab2c826604d85a67
|
File details
Details for the file cloudcraft_mcp-0.1.5-py3-none-any.whl.
File metadata
- Download URL: cloudcraft_mcp-0.1.5-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03cab6ec35e47b1c32ef6a90d796f653c1c2151ac259441be29dd21eb42c002f
|
|
| MD5 |
deb9de2eab10df1ec095f287a34268d7
|
|
| BLAKE2b-256 |
68e1838d0f49b7abecb5ba720c688166793f2e59c504d16958eafd42a48a6d8f
|