SuperAPIAI Directory

ChanMeng666/archlang

github.com · Other AI tools

ArchLang is an open-source (MIT) "floor plan as code" tool: AI writes ArchLang source code, and the compiler uses it to draw floor plans with precise dimensions (SVG, DXF, PDF) and points out problems in the drawings. This entry corresponds to its MCP server package @chanmeng666/archlang-mcp, a lightweight stdio-based wrapper that exposes the pure functions of the @chanmeng666/archlang library as MCP tools, allowing MCP-capable hosts (such as claude.ai, Claude Code, Cursor, VS Code, etc.) to write, check, and repair architectural floor plans without a shell.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux · API

About this tool

Purpose ArchLang expresses architectural floor plans as code: AI writes .arch source code, and the compiler draws precise floor plans with dimension annotations and reports errors. This entry corresponds to @chanmeng666/archlang-mcp under packages/mcp, a Model Context Protocol (MCP) server that lets any MCP-capable host write, check, and repair floor plans expressed as code.

Main capabilities The server is a lightweight stdio wrapper around the @chanmeng666/archlang library; it does not start subprocesses and does not reimplement logic; each tool wraps a pure exported function, the core library remains dependency-free, and the MCP SDK exists only in this package. Each tool accepts ArchLang source code (a string of the form plan "…" { … }) and returns structured JSON; compile also accepts plan_json (Plan-JSON / RPLAN shape). For any call that passes in source code, the result ends with source_hash, i.e., the SHA-256 (hexadecimal) of the input's UTF-8 bytes; repair, fix, and finish return the rewritten source code and additionally provide output_hash, i.e., the SHA-256 of the returned text. The tools themselves do not write files; the hashes are used for the CLI's --expected-hash, refusing to rewrite when the file bytes do not match the given hash (E_STALE_SOURCE).

Usage In ChatGPT, you can use the ArchLang app directly with no installation, for example asking to "draw and check an ArchLang floor plan for a two-bedroom apartment of about 75 m²." In claude.ai, you can add https://mcp.archlang.uk/mcp as a custom connector. Coding agents can use claude mcp add --transport http archlang https://mcp.archlang.uk/mcp,本地则用 claude mcp add archlang -- npx -y @chanmeng666/archlang-mcp; for skills, use npx -y skills add ChanMeng666/archlang --yes. VS Code is available via the Marketplace or Open VSX. In the browser, you can use https://playground.archlang.uk Trials. It can also be configured in claude_desktop_config.json, .cursor/mcp.json (project or global), or .vscode/mcp.json. The server sends brief instructions during initialize: first read the archlang://spec resource, then write .arch → compile (and fix) → describe → validate with strict:true → finally export.

Applicable scenarios and limitations If the agent already has a shell, the official recommendation is to prefer the agent-native archlang CLI (after npm i -g @chanmeng666/archlang, archlang context, archlang compile, etc. are available), because the CLI does not occupy the context window before being invoked, whereas MCP tool schemas reside in the window permanently; this MCP server is mainly used to let MCP-native hosts discover and drive ArchLang through the registry, and is listed in the official MCP registry as io.github.ChanMeng666/archlang-mcp. accessible: true in this wrapper only adds <title>/<desc> to SVG and role="img" to the root node; the element-level control of v1.36 cannot be used through MCP, and drawings that require keyboard and screen reader operability must call the library directly; the CLI's archlang compile --accessible likewise stops at <title>/<desc>. The 3D preview is generated by the separate archlang-3d package by extruding from the same .arch file and checked against the floor plan, showing walls, openings, floor slabs, stairs, furniture, exterior surfaces, and fences in flat colors; the ground and soft contact shadows belong to the viewer rather than the building itself and are not in the file either; pitched roofs and balcony railings are not yet supported, and there are no sections, elevations, or BIM.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools