Ask Claude, Cursor, or Codex to diagram your cloud. ArchLex validates AWS, GCP, and Kubernetes — 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|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/gcp @archlex/k8simport {
awsProvider,
createArchLex,
gcpProvider,
k8sProvider,
} from "@archlex/core";
const archlex = createArchLex({
providers: [awsProvider(), gcpProvider(), k8sProvider()],
});
const result = await archlex.render(`
direction LR
provider aws
alb -[routes]-> ecs
ecs -[writes]-> rds
`);
console.log(result.svg);| Provider | ID | Package | Example resources |
|---|---|---|---|
| AWS | aws |
@archlex/aws |
Lambda, ECS, RDS, S3 |
| Google Cloud | gcp |
@archlex/gcp |
Cloud Run, GKE, Cloud SQL, BigQuery |
| Kubernetes | k8s |
@archlex/k8s |
Deployment, Service, Ingress, StatefulSet |
MIT. Icons from AWS, Google Cloud, and Kubernetes. Layout by ELK.

