OPEN SOURCE · MIT · PYTHON

Architectural context for your coding agents.

Coding agents don't lack intelligence — they lack bounded architectural context. arcade-agent is the map: components, dependencies, smells — recovered from your code, served over MCP, versioned in your repo.

pip install "arcade-agent[languages,mcp]"then add arcade-mcp to your agent — no server, no account

This run is the tool analyzing its own repository at v0.3.0 — the same baseline its CI re-commits on every merge.

01

How it works

ingest →

Parse the code

Tree-sitter parsers extract entities and references. Java and Python out of the box; C, TypeScript, Go, Kotlin and Rust with the languages extra.

recover →

Recover the architecture

Clustering algorithms rebuild components, dependencies, cycles and coupling.

serve →

Serve it to agents

An MCP server exposes the model as budget-aware tools any coding agent can call mid-task.

02

Your agent, with a map

claude-code I'll check the blast radius before refactoring. → diff_impact(changed_files=["src/auth/session.py"])

arcade-agent { "affected_components": ["auth", "api-gateway"], "num_downstream": 14, "broken_contracts": [] }

claude-code Two components affected, no broken contracts — proceeding with the refactor.

Token cost across five repositories: reading the source vs. one summarize callAcross five pinned open-source repositories, reading every source file costs 54,940 to 155,290 tokens; one summarize call costs 634 to 1,201 tokens — under 2% of the source on every repository. Counted with the o200k_base tokenizer.Reading every source file, largest repository (caffeine 3.2.0): 155,290 tokens.Reading every source file, smallest repository (disruptor 4.0.0): 54,940 tokens.One summarize call: 634 to 1,201 tokens across the same five repositories.reading the sourcesummarize call54,940–155,290634–1,201 tokens<2%of the source
Five pinned repositories (arcade-agent, click, HikariCP, disruptor, caffeine), counted with the o200k_base tokenizer; Claude's tokenizer counts 1.09–1.25× as many. The full graph costs about as much as the source — the savings come from summaries and budgets. Table and caveats.
03

Drift, caught in CI

$ arcade-arch-diff --source .
- component "billing" depends on: [db]
+ component "billing" depends on: [db, auth]
new cross-component edge → posted as a PR comment
The baseline lives in your repo, versioned by git. arcade-arch-diff --update-baseline writes .arcade/baseline.json on every merge; the same command diffs against it on every PR. No SaaS, no account — a file and a markdown comment, informational by default, same as arcade-self-analysis.

Why a diff on every PR matters: Decay Front, a four-minute film on how architecture drifts one commit at a time.

Coming in v0.4.0: a guardrail that blocks. Write the intended architecture down in an architecture.spec.json and arcade-guard check fails the commit or the CI job on a violation; agents get the same check as MCP tools while they write. On one greenfield task with Claude Haiku 4.5 (20 runs per condition), the spec alone in the repository left 5/20 runs violating it; with the guardrail tools, 0/20 (one-sided Fisher p = 0.024). Most of the effect came from the in-loop check catching violations the agent then repaired (12/20 runs). One task — evidence the mechanism works, not how often it matters.

04

What's in the box

Architecture recovery

Five clustering algorithms — pkg, wca, acdc, arc, limbo — tunable, deterministic output.

Smells & metrics

Cycles, hubs, coupling and instability metrics per component.

24 MCP tools

context_for_task, diff_impact, api_surface, dependency_cone, the five guardrail tools (v0.4.0) — plus 15 more, all budget-aware.

Budget-aware output

Every tool respects a token budget — built for agent context windows.

Session store

Chain tools without re-serializing full graphs between calls.

CI drift gate

One GitHub Action, one committed baseline, a markdown diff on every PR.

05

Or just ask — the Claude Code skill

Prefer finished reports over raw tool calls? The arcade-analyze skill runs the whole pipeline from a natural-language request — "analyze the architecture of this repo" — and opens an interactive report: pan/zoom component diagram with drill-down, dependencies + DSM, ranked recommendations, and an animated flow simulation.

Live demo, no install — the animation links to the real interactive visualizer, generated from arcade-agent's own codebase. Setup: docs.