Architecture docs that live where the code does.

Local-first MCP server that documents a codebase in the repo itself. Diagrams and notes versioned in git, no cloud backend.

AI agent MCP server .waycairn/diagram/ *.json, versioned index.sqlite derived, gitignored

Docs that don't drift

Every artifact is a JSON file inside the repo, small enough that two people documenting different things on different branches rarely conflict. No server to run, no account to create.

  • Local-first

    Everything lives under .waycairn/ in the repo. No cloud backend, no auth, no external service to keep alive.

  • Versioned in git

    Diagrams are JSON, reviewable in a normal PR diff, branchable and mergeable like any other file.

  • Written by the agent you already use

    Claude Code, Codex CLI, and opencode read and write documentation through the same MCP tools they already call.

A diagram is just structured JSON

Nodes and edges, C4-ish, kind-agnostic storage underneath. The diagram above is the actual shape: an agent writes through the MCP server, artifacts land as versioned JSON, a derived SQLite index gives fast reads and rebuilds itself whenever the JSON changes.

Install

npm install -g waycairn
waycairn init