GuidesUse with AI agents

Use with AI agents

ArchLex gives coding agents a validated cloud diagram language. The agent writes concise ArchLex source. Humans can still read, diff, and edit it.

1. Install the skill

npx skills add baires/archlex

2. Connect the MCP server

No API key. Remote endpoint: https://mcp.archlex.dev/mcp.

Claude Code

claude mcp add --transport http archlex https://mcp.archlex.dev/mcp

Cursor

{
  "mcpServers": {
    "archlex": {
      "url": "https://mcp.archlex.dev/mcp"
    }
  }
}

Codex

codex mcp add archlex --url https://mcp.archlex.dev/mcp

VS Code / Copilot

{
  "servers": {
    "archlex": {
      "type": "http",
      "url": "https://mcp.archlex.dev/mcp"
    }
  }
}

Or paste this prompt into your agent:

Set up the ArchLex MCP server for this project using the official remote
Streamable HTTP endpoint at https://mcp.archlex.dev/mcp. Verify the
connection, list the available ArchLex tools, and tell me when it is ready.
Do not change unrelated MCP servers.

3. Ask

Diagram a serverless API on AWS with API Gateway, Lambda, and DynamoDB.

You should get a rendered diagram when the client can show images and the exact ArchLex source. The playground URL is a short share link when share_status is created; otherwise it is a source-encoded editable fallback.

direction LR
provider aws

api-gateway -[invokes]-> lambda -[writes]-> dynamodb

Try next:

Diagram a Cloudflare Workers app that reads R2, with DNS selecting the Worker.

Design a resilient AWS event ingestion system, validate it, and open the result in ArchLex Playground.

What the agent uses

ToolPurpose
render_diagramParse, validate, layout, and render
validate_diagramSyntax and semantic checks without layout
get_cloud_catalogAWS, Cloudflare, GCP, and Kubernetes resource lookup
generate_playground_urlDeep link to the playground

The skill teaches the DSL, relationship kinds, and how to repair diagnostics. The MCP server enforces the catalog so agents cannot invent resource names.

Full protocol details: Remote MCP Server. Language reference: Language Specification.