# Archprint

Scans a TypeScript repo, finds the architecture rules the code already follows, and shows evidence for each one. Turns trusted rules into ESLint and dependency-cruiser checks.

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

## What it does

Archprint reads a TypeScript project and extracts the rules its code actually obeys. Each rule comes with proof: how many files follow it, which ones break it, and how confident the inference is. A rule like "routes never touch the database directly" gets backed by the list of offending files.

The `init`, `wire`, and `eject` commands convert found rules into ESLint and dependency-cruiser checks. `wire` adds one line to the ESLint config, so a violation gets caught on the next lint run. `eject` restores the project exactly as it was.

The MCP server only reports. Enforcement stays in the linter. An agent like Claude Code or Cursor can ask Archprint for project rules with evidence before writing code. On a 70-file demo repo, asking for rules through Archprint cost $0.037 versus $0.083 without it, and the answer took 10 seconds instead of 17 — the agent reads ready-made rules rather than the whole repository.

Node.js with `npx` is required. The server runs locally and works with Claude Code, Codex, Cursor, GitHub Copilot, Windsurf, Cline, Zed, and Gemini CLI.

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

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add archprint -- npx -y archprint
```

### Codex

**Platform CLI**
```bash
codex mcp add archprint -- npx -y archprint
```

### Cursor

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

### GitHub Copilot

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

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add archprint npx -y archprint
```

## When to use it
- find unwritten architecture rules in a TypeScript codebase
- attach evidence to every rule: follower count, breakers, confidence
- generate ESLint rules from patterns the code already demonstrates
- catch rule breaks in a pull request, not weeks later in review
- let AI agents fetch project rules with evidence before writing code

## Example prompts
- Ask Archprint what architecture rules this repo follows
- List the enforced and held-for-review rules
- Check my change against the rules with Archprint

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
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
