# archlang-mcp

MCP server for drafting architectural floor plans in ArchLang code. Renders layouts to SVG or ASCII and validates geometry without shell access.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 24
- Author: ChanMeng666
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ChanMeng666/archlang/tree/HEAD/packages/mcp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/archlang-mcp

## What it does

The server acts as a stdio bridge for the `@chanmeng666/archlang` library. It spawns no child processes. Each tool directly runs an exported core function. Its `compile` tool renders drawings as SVG or zero-dependency ASCII. Generating PNG images requires the optional `@resvg/resvg-js` dependency.

Built-in tools inspect layout validity without visual rendering. The `describe` tool reports room areas and circulation paths. When layouts have collisions, `repair` shifts furniture away from walls and door swings. The `finish` routine fills unassigned spaces and generates architectural drawing sheets.

Tool schemas remain inside the agent context window permanently. This overhead is constant. For environments with shell access, running the `archlang` CLI directly saves prompt space.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add archlang-mcp -- npx -y @chanmeng666/archlang-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add mcp -- npx -y @chanmeng666/archlang-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@chanmeng666/archlang-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@chanmeng666/archlang-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mcp npx -y @chanmeng666/archlang-mcp
```

## When to use it
- Compile `.arch` source code into SVG or ASCII floor plans
- Validate door placement and room adjacency against design requirements
- Resolve furniture collisions with walls and opening swings
- Complete floor plans with furniture layouts and room schedules

## Example prompts
- Render the layout from layout.arch into an SVG floor plan
- Run validate on plan.arch to check room connectivity
- Move furniture away from doorways in apartment.arch using repair

## Similar
- [Next AI Draw.io](https://affpapa.org/en/nevibecode/mcp/next-ai-drawio.md) — MCP server · ★ 36398
- [tldraw](https://affpapa.org/en/nevibecode/mcp/tldraw.md) — MCP server · ★ 51091
- [Figma-Context-MCP](https://affpapa.org/en/nevibecode/mcp/figma-context-mcp.md) — MCP server · ★ 16062
- [Agent-Native Assets](https://affpapa.org/en/nevibecode/mcp/agent-native-assets.md) — MCP server · ★ 7506
- [Remove AI Watermarks](https://affpapa.org/en/nevibecode/mcp/remove-ai-watermarks.md) — MCP server · ★ 6114
- [Dembrandt](https://affpapa.org/en/nevibecode/mcp/dembrandt.md) — MCP server · ★ 3821

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
