Skip to content
FunCoding

archlang-mcp

Listed in the official MCP Registry

Compile, describe, lint, validate, score, repair, fix, finish, suggest and complete ArchLang plans.

Star
17
Version
v0.2.24
License
MIT
Last commit
Oct 12, 2026

@chanmeng666/archlang-mcp

A Model Context Protocol server for ArchLang — author, inspect, and repair architectural floor plans written as code, from any MCP-speaking host.

It is a thin stdio shim over the @chanmeng666/archlang library (no subprocess, no re-implementation): each tool wraps one pure, exported function. The core stays zero-dependency — the MCP SDK lives only in this package.

When to prefer the CLI

ArchLang's primary agent interface is the agent-native arch CLI, not this server. A CLI costs nothing in an agent's context window until it is called, whereas an MCP tool schema sits in the window permanently. If your agent already has a shell, prefer:

npx @chanmeng666/archlang context     # the whole language + workflow + CLI + errors, one call
npx @chanmeng666/archlang compile plan.arch -o out.svg --json

This MCP server exists so MCP-native hosts can discover ArchLang through the registry and drive it without a shell. It is listed on the official MCP registry as io.github.ChanMeng666/archlang-mcp. It is the discoverability channel, not a replacement. See ADR 0012 (which amends ADR 0009's distribution-over-protocol stance).

Tools

Every tool takes ArchLang source (a plan "…" { … } string) and returns structured JSON. compile also accepts plan_json (the Plan-JSON / RPLAN shape).

ToolWhat it does
compileRender source (or plan_json) to SVG, or to zero-dep ASCII (format:"txt"). accessible, overlay:"circulation" opt-ins. Returns output + diagnostics. A multi-storey plan returns every storey in pages[]; level renders one.
describeSemantic facts (rooms, areas, adjacency, doors, circulation, zones, storeys, the exact floor_polygon/floor_circle shape, and a freedom report of which positions are hand-authored vs resolver-derived) — verify intent without an image.
lintAdvisory W_* soundness warnings (may include the fix-carrying W_ALIAS_MATCH for a room use inferred from an indirect label alias); profile selects a ruleset.
validateParse + resolve + lint, the ship gate. strict fails on warnings; graph checks interior-door adjacency against an intended room graph; intent gates on a brief's contract (per archlang://intent-schema).
scoreThe continuous intent METER: how much of a brief a plan satisfies (satisfied/total/score/subscores). Measures, never gates.
repairExplicit corrector: furniture out of walls/doorways/swings → new .arch source + change log. Never adds doors/windows.
finishComplete the drawing: furnish the rooms that hold no furniture, then add the missing paper, scale, dims auto, title, schedule rooms and legend → new .arch source + change log. Fills only what is missing; only runs one stage (furnish or sheet); reissue may replace paper/scale.
fixApply the machine-applicable fixes on a plan's diagnostics (syntactic corrector; bounded fixpoint). unsafe widens to maybe-incorrect.
suggestAdvisory door/window statements (each referencing its wall by a stable ref — an authored id or a unique category — or absolute coordinates, never a re-bindable positional id) to resolve unreachable rooms / windowless bedrooms — data, never applied.
completeLSP completion items in scope at a source byte offset.

What compile's accessible does here — and what it does not

accessible: true gives the SVG its <title>/<desc> pair and role="img" on the root, which is the whole of the option as this shim exposes it. The v1.36 element controls are not reachable through MCP. They need annotate alongside accessible, and this tool passes annotate only for format:"txt"; it also takes accessible as a boolean, so the { idPrefix } form that keeps several plans on one HTML page from sharing arch-title/arch-desc cannot be requested either.

A host that needs a keyboard- and screen-reader-operable drawing — data-arch-primary, role="button", aria-label on each element — has to call the library. The CLI cannot produce it either: annotate has no flag, so arch compile --accessible stops at the <title>/<desc> pair too.

import { compile } from "@chanmeng666/archlang";
compile(src, { annotate: true, accessible: { idPrefix: "plan-7" } });

The output contract, what an embedder still owns, and the known screen-reader limitations are in the language reference.

Resources

URIContent
archlang://specThe whole language in one page (spec.llm.md).
archlang://contextFull agent context: spec + workflow + CLI reference + error catalog (llms-full.txt).
archlang://schemaJSON Schema (2020-12) for the Plan-JSON compile input.
archlang://grammarGBNF constrained-decoding grammar for guaranteed-parseable generation.
archlang://intent-schemaJSON Schema (2020-12) for a brief's Intent — the shape validate's intent and score's brief take.

Install

Claude Code

claude mcp add archlang -- npx -y @chanmeng666/archlang-mcp

Claude Desktop

Add to claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "archlang": {
      "command": "npx",
      "args": ["-y", "@chanmeng666/archlang-mcp"]
    }
  }
}

Cursor

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "archlang": {
      "command": "npx",
      "args": ["-y", "@chanmeng666/archlang-mcp"]
    }
  }
}

VS Code

Add to .vscode/mcp.json:

{
  "servers": {
    "archlang": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@chanmeng666/archlang-mcp"]
    }
  }
}

License

MIT © Chan Meng

Similar MCP servers

Keploy

End-to-end API testing — generate and run tests from OpenAPI, curl, Postman, or real user traffic.

KEkeploy/keploy19k36 new stars in the last 7 days

mobile-mcp

MCP server for iOS and Android Mobile Development, Automation and Testing

MOmobile-next/mobile-mcp9k329 new stars in the last 7 days

agent-device

MCP server for mobile app automation: verify, control, and debug iOS, Android, TV, and desktop apps

CAcallstack/agent-device5k84 new stars in the last 7 days

linkedin-mcp-server

Open-source MCP server for LinkedIn. Give Claude and any MCP-compatible AI agent access to profiles, companies, jobs, and messages.

STstickerdaniel/linkedin-mcp-server3.8k75 new stars in the last 7 days

ripwire

The ripgrep of AI context: a zero-dependency C++23 CLI + MCP server for coding agents. Find what you want without reading the repo, then check you built what you meant — blast radius, tests-to-run, quality deltas. Signatures at 74.7% fewer bytes than bodies; every guess labelled, every loss published. Paddle out with a map.

REredhat-et/ripwire2.4k33 new stars in the last 7 days

mcphub.nvim

An MCP client for Neovim that seamlessly integrates MCP servers into your editing workflow with an intuitive interface for managing, testing, and using MCP servers with your favorite chat plugins.

RAravitemer/mcphub.nvim1.8k2 new stars in the last 7 days