Compiler Knowledge Graph
@ttsc/graph gives a coding agent a compiler-resolved graph of calls, dependencies, and declarations.
Median tokens on the shared onboarding question, against no MCP and the three comparators; lower is better:
Loading graph benchmark results...
Install
npm
npm install -D ttsc @ttsc/graph typescriptThe native ttscgraph binary ships with @ttsc/graph itself, in a per-platform package such as @ttsc/graph-linux-x64 that the package manager installs as an optional dependency. A project that does not use the graph downloads none of it. ttsc stays on the install line as the peer @ttsc/graph is built on, including the plugin resolution it uses to read what lint plugins publish.
Keep @ttsc/graph and ttsc on the same version; upgrading from 0.31 means upgrading both. If the package manager skipped optional dependencies, the server reports which platform package is missing; reinstall @ttsc/graph with optional dependencies enabled, or point TTSC_GRAPH_BINARY at an absolute ttscgraph path. A binary from another build stops on a protocol or schema mismatch:
@ttsc/graph: ttscgraph speaks serve protocol v2, this client speaks v1.Reinstall @ttsc/graph so its platform package matches, or point TTSC_GRAPH_BINARY at a matching build.
Connect an agent
For Claude Code, a .mcp.json in the project root:
{
"mcpServers": {
"ttsc-graph": {
"command": "npx",
"args": ["-y", "@ttsc/graph"]
}
}
}Any other MCP client works the same way, the command is always npx -y @ttsc/graph. Start the agent from the project root so the server finds your tsconfig.json, or name the project explicitly with --cwd and --tsconfig.
The server supplies tool guidance in the MCP initialize response. It does not write to CLAUDE.md, AGENTS.md, or other repository files.
What you get back
The agent gains one tool, inspect_typescript_graph. The compiler resolves workspace dependencies, path aliases, and barrel re-exports.
See the benchmark for token usage, tool calls, and per-repository results.
Next
- Code Graph: what the graph answers and why an agent needs it.
- Comparison: how it differs from codegraph, codebase-memory-mcp, and serena.
- 3D Viewer: the benchmark repositories rendered as navigable graphs, in your browser.