Labsco
MCP SERVER

Graphify-ts

by mohanagy

A local graph of your TypeScript repo, served to the agent as task-shaped context instead of a search loop.

Codebase Context Packing & Compression
Summary
The agent gets a starting path, not a directory listing.

Most code-context tools return files; this returns a shaped answer — the call chain, the dependents, the communities — which is what an agent actually needs before it decides what to open. The freshness contract is the unusual part: it tells you when the graph no longer matches HEAD instead of quietly answering from a stale index.

What it is

Madar builds a graph of a TypeScript or Node.js repository on your machine, then answers an agent's question with a small context pack — ranked files, symbols, snippets and relationships — so it starts from the relevant code rather than discovering the repo by grepping. Claude Code, Codex, Cursor, Copilot, Gemini, Aider and OpenCode all have project-local installers.

What you get
  • `retrieve` — ranked nodes, code snippets and community context for "how does X work?"
  • `impact` and `pr_impact` — directed dependents and affected communities for a refactor, or a diff-aware blast radius and ranked review risks for a pull request
  • `call_chain` — shortest execution paths from one symbol to another
  • `community_overview`, `graph_stats` and `graph_summary` — architecture, graph size, and a bounded deterministic first-turn overview of domains, top modules, entrypoints and runtime paths
  • Profiles change the surface: `--profile strict` exposes only `context_pack` and `context_expand`, and the full surface is 27 tools via `MADAR_TOOL_PROFILE=full`
  • Freshness is explicit — packs report whether the graph is fresh, partially stale or stale against HEAD, and `--require-fresh-context` refuses drift instead of warning
Requirements

Node.js 20 or newer. Install with `npm install -g @lubab/madar`, then `madar try "how does authentication work?"` inside the repo to build or reuse the graph. Wire up an agent with its installer — `madar claude install`, `madar cursor install`, `madar codex install` and so on — then check with `madar doctor` and `madar status`. Graph generation stays local; no source is uploaded and no cloud account is needed. Package version 0.32.1.

Setup effort

One command — npm install -g @lubab/madar