Every agent that can run shell commands can use fallow. The CLI is the primary interface. MCP is an optional structured layer on top.
Why agents need fallow
Static analysis requires building and traversing a graph, not reading files in a context window. Here’s what that means in practice:| What agents can’t do | What fallow does |
|---|---|
| Build a complete module graph across 5,000+ files | Builds the full graph in under 200ms |
| Track re-export chains through barrel files | Resolves export * chains through unlimited levels |
| Know if an export is used somewhere outside their context window | Exhaustively checks every import in the entire codebase |
| Detect code duplication across files they haven’t seen | Suffix array algorithm catches clones across all files |
Determine which package.json dependencies are actually unused | Traces imports and script binaries to actual usage |
| Guarantee completeness (no missed files, no false negatives) | Deterministic: same input always produces same output |
Even with an infinite context window, an LLM reading files sequentially cannot replicate what a graph traversal algorithm does. The issue isn’t context size. Static analysis is an algorithmic problem, not a comprehension problem.
CLI: the primary agent interface
Every AI coding agent can run shell commands. This is the simplest and most universal integration. No MCP required:Agent workflow examples
After generating code:MCP: structured tool calling
For agents that support MCP (Model Context Protocol),fallow-mcp exposes analysis capabilities as structured tools. This gives agents typed inputs and outputs instead of parsing CLI text.
The MCP server uses stdio transport and wraps the fallow CLI binary. Set the FALLOW_BIN environment variable to point to the fallow binary (defaults to fallow in PATH).
- Claude Code
- Cursor
- Other MCP clients
Add to your
.claude/settings.json:Available MCP tools
| Tool | Description |
|---|---|
analyze | Full dead code analysis (fallow check --format json) |
check_changed | Incremental analysis of changed files (fallow check --changed-since) |
find_dupes | Code duplication detection (fallow dupes --format json) |
fix_preview | Dry-run auto-fix preview (fallow fix --dry-run --format json) |
fix_apply | Apply auto-fixes (fallow fix --yes --format json) |
project_info | Project metadata: plugins, files, entry points (fallow list --format json) |
CLI vs MCP: when to use which
| CLI | MCP | |
|---|---|---|
| Availability | Any agent that can run shell commands | Agents with MCP support |
| Setup | Zero (fallow just needs to be installed) | Requires MCP server configuration |
| Output | Any format (JSON, SARIF, human, compact) | JSON only (structured) |
| Best for | Universal compatibility, CI-like workflows | Typed tool calling, agent frameworks |
Architecture
The MCP server is a thin subprocess wrapper. All analysis logic stays in the CLI binary. The MCP crate only handles protocol framing and argument mapping, built withrmcp (official Rust MCP SDK). This means:
- CLI and MCP always produce identical results
- Any fallow CLI update automatically improves MCP
- No separate installation.
fallow-mcpships alongsidefallow
See also
Agent Skills
Install fallow skills for Claude Code, Cursor, Windsurf, and more.
CI integration
The third track: catch what agents and humans miss.
VS Code extension
Real-time feedback for human developers.
Dead code analysis
Learn about the 11 issue types fallow detects.