# Archlang MCP

> Archlang MCP is an open-source MCP server for design and media. Write floor plans as code and compile, lint and repair them to SVG, DXF and PDF. It can run locally on your machine or as a hosted remote server.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Web, vscode, API
- **Website:** https://archlang.uk
- **Repository:** https://github.com/chanmeng666/archlang/tree/HEAD/packages/mcp
- **MCP Registry name:** io.github.ChanMeng666/archlang-mcp
- **Categories:** design and media, developer tools
- **Listing updated:** 2026-11-14

## About

ArchLang is a text language for floor plans: rooms, walls, doors, windows and furniture are declared in a .arch file, and a compiler draws a dimensioned plan and reports what is wrong. This server lets an MCP host author, inspect and repair those plans without a shell. It is a thin wrapper over the open-source ArchLang library, each tool calling one pure function.

On connect, the server tells the model to read the archlang://spec resource first, then write, compile (and fix), describe, validate in strict mode and finish before exporting. The README is candid that the CLI is the primary agent interface, because a CLI uses no context until called, and describes this server as the discovery channel for MCP-native hosts.

It runs locally over stdio or from a hosted endpoint. The site lists 35 example plans, a browser playground, a VS Code extension and a separate 3D preview package, with MIT licensing.

## Features

- **Plans as text:** Write rooms, walls, doors and furniture in a .arch file.
- **Compile to drawings:** Produce SVG, PDF or DXF output.
- **Lint and repair:** Strict validation and a fix step for geometry errors.
- **Spec resource:** A spec resource teaches the model the language first.
- **Hosted or local:** Use the remote endpoint or run it over stdio.
- **3D preview:** A separate package extrudes the same source into 3D.

## Good for

- Draft a studio flat layout from a written brief
- Check a plan for geometric problems before export
- Export a plan to DXF for CAD use
- Change one room without moving the others
- Rebuild a plan starting from a photo or PDF

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport http archlang-mcp https://mcp.archlang.uk/mcp
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://mcp.archlang.uk/mcp
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "archlang-mcp": {
      "url": "https://mcp.archlang.uk/mcp"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "archlang-mcp": {
      "type": "http",
      "url": "https://mcp.archlang.uk/mcp"
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "archlang-mcp": {
      "serverUrl": "https://mcp.archlang.uk/mcp"
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "archlang-mcp": {
      "type": "http",
      "url": "https://mcp.archlang.uk/mcp"
    }
  }
}
```

## Tools

- `compile`: Compile ArchLang `.arch` source (or a Plan-JSON object) to an SVG floor plan, or with `format` to a plain-text ASCII plan ("txt"), Plan JSON ("json") or an image ("png"). Format "json" returns the plan as an object, with `schema` naming its JSON Schema; passed back as `plan_json` it compiles to the same drawing, unless the plan uses a part of the language Plan JSON does not carry (sheet tables, st
- `describe`: Report a plan's facts without rendering, so you can check it against the brief without looking at an image. Returns rooms (`area_m2`, measured on the wall centrelines; `net_area_m2`, the floor no wall stands on, absent when it cannot be computed exactly; bbox, adjacency, use, and the exact shape: `floor_polygon` for a `room polygon`, `floor_circle` for a `room circle`, whose area is exactly πR²), 
- `lint`: List advisory architectural-soundness warnings (`W_*` codes) as data: unreachable room, windowless bedroom, too-narrow door, blocked doorway, furniture through a wall, circuitous path, and more. `profile` selects a ruleset ("residential-basic", "accessibility-advisory", …).
- `validate`: Check a plan in one pass without returning a drawing (parse, resolve and lint): the gate a plan passes before it ships. `strict:true` makes advisory warnings fail too. Optional `graph` checks the plan's interior-door adjacency against an intended room graph (`{ room: [neighbours] }`); a mismatch fails. Optional `intent` (a brief's expectations, shaped as the `archlang://intent-schema` resource des
- `score`: Measure how much of a brief's intent JSON a plan satisfies, without gating. Returns { ok, satisfied, total, score, subscores, violations }, where `score` is satisfied/total in [0,1] (an empty intent scores 1); call it across edits to watch a plan approach the brief. The intent's shape is the `archlang://intent-schema` resource. A malformed intent returns `{ ok:false, intentErrors }` as data, never
- `repair`: Correct furniture placement and return the corrected `.arch` source with a change log. It pushes furniture out of walls, doorways and door swings, separates overlapping pieces, moves fixtures that sit in the wrong room, and snaps floating pieces to walls. A piece it may not rewrite is listed in `unresolved` with the reason. It never adds doors or windows (that is a design choice); use `suggest` fo
- `fix`: Apply the machine-applicable fixes attached to a plan's compile diagnostics and return the edited source. It corrects source-level faults (an opening off its wall becomes the attachment form, an out-of-range position is clamped, …); furniture geometry is `repair`'s job. It runs at most 4 passes and rolls back a pass that raises the error count. `unsafe:true` also applies `maybe-incorrect` fixes. R
- `finish`: Complete a plan for export by adding what it lacks; run it once `lint` is clean. Two stages. `furnish` puts furniture, by room use, in each rectangular room that holds none, on every storey (a furnished room is never touched, and one that lacks a piece its use requires is named in `unresolved` with the missing pieces, not filled; placement is `against wall` / `in <room> anchor`, never absolute). `
- `suggest`: Suggest the doors and windows a plan's room graph needs, as data; nothing is applied. For a room with no path back, a building with no entrance, a bath reachable only through a bedroom, or a windowless bedroom, it returns ready-to-paste `door`/`window` statements with a rationale, for you to choose among and insert. Each names its wall by an authored id or a unique wall category, else by absolute 
- `complete`: List the completion items in scope at a source byte offset: keywords, element names, ids and enum values, the same items an editor's language server offers. For structured or assisted authoring.
- `link`: Make two URLs that show a plan in the browser with nothing to install, for handing to a person. `playground` opens it in the hosted editor, rendered; `embed` draws it alone, for an iframe. The plan travels inside the URL, after the `#`, so it is never sent to a server and the URL carries nothing else. A plan that does not compile still gets links, and the page shows its diagnostics; `ok` says whet
- `read_me`: Explain this hosted ArchLang server in one short page: the authoring loop, the size cap, what is unavailable here, how to get an image URL for a plan, and what the server keeps (nothing). Call it first when unsure.

## FAQ

### What does it output?

SVG, DXF and PDF; the site also mentions PNG.

### Should I use the CLI instead?

The README prefers the CLI when your agent has a shell, since it costs no context until called.

### Is there a hosted version?

Yes, https://mcp.archlang.uk/mcp over Streamable HTTP.

### What licence?

MIT.

### Is Archlang MCP free?

Yes. Archlang MCP is open source, so you can use and self-host it for free.

### How do I add Archlang MCP to Claude Code?

Run this command in your terminal: claude mcp add --transport http archlang-mcp https://mcp.archlang.uk/mcp

### What are the best alternatives to Archlang MCP?

The closest alternatives to Archlang MCP are REA, HyperFrames by HeyGen, Codebase Memory, GitHub and Serena MCP: the IDE for your agent.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [HyperFrames by HeyGen](https://ai-powered.com/mcp/hyperframes-by-heygen): HyperFrames by HeyGen is a freemium MCP server for design and media.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [ffmpeg-skill](https://ai-powered.com/mcp/ffmpeg-skill): ffmpeg-skill is an open-source MCP server for design and media.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/archlang-mcp
