Ask Claude, Cursor, or Codex to diagram your cloud. ArchLex validates AWS, GCP, Kubernetes, and Cloudflare — then renders official-icon SVG you can read, diff, and share.
npx skills add baires/archlexclaude mcp add --transport http archlex https://mcp.archlex.dev/mcpThen ask:
Diagram a serverless API on AWS with API Gateway, Lambda, and DynamoDB.
You get a validated diagram, the exact ArchLex source, and a playground link. No API key.
More clients: Use with AI agents.
direction LR
provider aws
api-gateway -[invokes]-> lambda -[writes]-> dynamodb
direction LR
provider aws
account global-core {
region us-east-1 {
vpc primary-vpc {
subnet app-subnet-1 {
app_primary: ecs
db_primary: rds
cache_primary: elasticache
app_primary > cache_primary
app_primary > db_primary
}
}
}
region us-west-2 {
vpc failover-vpc {
subnet app-subnet-2 {
app_secondary: ecs
db_replica: rds
app_secondary > db_replica
}
}
}
}
global_dns: route53
global_dns -[routes]->|primary| app_primary
global_dns -[routes]->|failover| app_secondary
db_primary -[replicates]-> db_replica
The source stays reviewable. The renderer stays deterministic.
direction LR
provider aws
vpc production {
subnet public {
api-gateway["API Gateway"] > lambda["Auth Service"]
}
subnet private {
lambda["Auth Service"] -[writes]->|SQL| dynamodb["Users Table"]
}
}
- Directives:
provider aws|cloudflare|gcp|k8s,direction LR|RL|TB|BT,validation normal|strict|off,theme light|dark - Resources:
rds,primary: rds,primary: rds["Primary DB"] - Edges:
a > b,a -> b,a -[writes]-> b,a -[writes]->|SQL| b
Language specification · Playground
Remote server: https://mcp.archlex.dev/mcp
| Client | Setup |
|---|---|
| Claude Code | claude mcp add --transport http archlex https://mcp.archlex.dev/mcp |
| Codex | codex mcp add archlex --url https://mcp.archlex.dev/mcp |
| Cursor | { "mcpServers": { "archlex": { "url": "https://mcp.archlex.dev/mcp" } } } |
Tools: render_diagram, validate_diagram, get_cloud_catalog,
generate_playground_url.
npm install @archlex/core @archlex/aws @archlex/cloudflare @archlex/gcp @archlex/k8simport {
awsProvider,
cloudflareProvider,
createArchLex,
gcpProvider,
k8sProvider,
} from "@archlex/core";
const archlex = createArchLex({
providers: [
awsProvider(),
cloudflareProvider(),
gcpProvider(),
k8sProvider(),
],
});
const result = await archlex.render(`
direction LR
provider aws
alb -[routes]-> ecs
ecs -[writes]-> rds
`);
console.log(result.svg);The same setup also renders Cloudflare source:
direction LR
provider cloudflare
validation normal
api: workers["Application entry"]
objects: r2["Application objects"]
api -[reads]-> objects
Cloudflare includes 92 resources with bundled artwork and explicit containment
validation. It does not verify runtime connectivity or policy effectiveness.
Use root/account placement and qualified kinds such as cloudflare.workers when
combining providers. See the Cloudflare pack guide
for aliases, connectors, flow labels and mixed-provider examples.
| Provider | ID | Package | Example resources |
|---|---|---|---|
| AWS | aws |
@archlex/aws |
Lambda, ECS, RDS, S3 |
| Cloudflare | cloudflare |
@archlex/cloudflare |
Workers, R2, DNS, Tunnel |
| Google Cloud | gcp |
@archlex/gcp |
Cloud Run, GKE, Cloud SQL, BigQuery |
| Kubernetes | k8s |
@archlex/k8s |
Deployment, Service, Ingress, StatefulSet |
- Use with AI agents
- Language specification
- MCP server
- AWS · GCP · Kubernetes · Cloudflare
- Error reference
ArchLex software is MIT licensed. Icons from AWS, Google Cloud, and Kubernetes. Cloudflare artwork uses the project's CC BY 4.0 attribution and provenance basis; Cloudflare trademarks remain with their owners and ArchLex is not endorsed by Cloudflare. Layout by ELK.

