Nine tools your AI agent already knows how to call.
Curated answers, not raw file dumps. repowise exposes your indexed codebase through nine task-shaped MCP tools that collapse search, read, and reason into one call. Works with Claude Code, Cursor, Cline, Codex, and any MCP client.
Your agent burns thousands of tokens grepping, reading, and re-reading the same files to reconstruct context it should have been handed.
Entity-by-entity tools force the model to do the retrieval itself: search, open, scroll, repeat. repowise indexes the codebase once and answers the task the agent is actually trying to do, in one round trip, so the model spends its budget on reasoning instead of file archaeology.
Task-shaped tools that collapse the round trips.
Nine MCP tools, an honest staleness contract, and output distillation, all over the open Model Context Protocol.
One call instead of search, read, reason
Each tool is shaped around a task an agent actually performs, not an entity it has to assemble. get_answer collapses retrieval, reading, and reasoning into a single cited round trip, with a calibrated retrieval_quality and structured best_guesses when confidence is low.
- get_overview, get_answer, get_context, get_symbol, search_codebase
- get_risk, get_why, get_dead_code, get_health
- get_context returns a triage card: summary, signatures, hotspot bit, governing decisions
- get_symbol returns raw source bytes with exact line bounds, no offset math
96% fewer context tokens, at answer parity
On paired SWE-QA runs with the same model and harness, with versus without repowise, the curated tools replace raw file exploration. The savings are measured, not estimated, and answer quality holds.
- 2,391 vs 64,039 tokens to load context, roughly 27x fewer
- 89% fewer file reads across benchmarks
- 49% to 70% fewer tool calls on flask48 and sklearn48
- 41% less context re-read across a whole multi-step session
Compress the noise before the agent reads it
Test runs, git log, and git diff flood the context window with output the agent does not need. Distill is index-aware output distillation: it compresses 60 to 90 percent of those tokens while preserving every error line, and it is fully reversible.
- pytest with 11 failures: 3,374 to 1,317 tokens, all 11 failure lines kept
- git log: 3,064 to 331 tokens, an 89% reduction
- git diff over 30 commits: 62,833 to 8,635 tokens, an 86% reduction
- Every error line survives; expand any omission on demand
A staleness envelope on every response
An index that lies is worse than no index. Every MCP response carries a _meta envelope with the indexed commit and index age, and a stale_warning that fires only when the index has actually diverged from HEAD, so the agent knows exactly when to verify against source.
- _meta on every response: index_age_days, indexed_commit, stale_warning
- Silence means the index is current; no false alarms
- Auto-generated CLAUDE.md and AGENTS.md kept current
- Hooks enrich Grep and Glob results with zero LLM calls
From one index to every agent, over MCP.
Index
repowise parses your repo into a graph, reads git history, and builds the wiki. Code is processed transiently, never persisted.
Connect
Register the MCP endpoint in Claude Code, Cursor, Cline, Codex, or any MCP client. One URL, nine tools.
Call
The agent calls a task-shaped tool and gets a curated answer in one round trip instead of grepping and re-reading files.
Trust
Each response carries a _meta staleness envelope, so the agent knows when the index is current and when to verify.
The nine tools, by what they answer.
get_overview
Architecture summary, module map, entry points, and git health. The first call on any unfamiliar codebase.
get_answer
Hybrid retrieval plus PageRank bias and graph expansion into one cited answer, with calibrated retrieval_quality.
get_context
A triage card for files, modules, or symbols: summary, signatures, the hotspot bit, and governing decisions.
get_symbol and search_codebase
Raw source bytes for one symbol with exact line bounds, plus semantic search over the wiki by kind.
get_risk and get_why
Hotspot scores, dependents, and PR directives, plus the architectural decision rationale and lineage behind the code.
get_dead_code and get_health
Unreachable code by confidence tier, and per-file code-health scores with refactoring targets.
Your IDE's index is ephemeral, single-repo, and embeddings-only. DeepWiki and Sourcegraph give you a snapshot to read. repowise is a durable, structured layer every agent can call over MCP, enriched with code health, git history, and decisions your editor never sees, and it is open source and self-hostable.
Questions, answered
Which agents and editors does it work with?
Any MCP-compatible client. repowise is agent-neutral: it works with Claude Code (primary, with one-command setup), Codex CLI, Cursor, Cline, and Windsurf, plus any tool that speaks the Model Context Protocol. The same nine tools are exposed over a single MCP endpoint, so you are not locked to one editor.
How much does it cut token usage?
On paired SWE-QA runs (same model, same harness, with versus without repowise) loading context through get_context used 2,391 tokens instead of 64,039, a 96% reduction and roughly 27x fewer. Across benchmarks that is 89% fewer file reads and 70% fewer tool calls, with answer quality at parity. On multi-step investigations, 41% less context is re-read across the whole session.
What is distill?
Distill is index-aware output distillation. It compresses noisy command output such as pytest, git log, and git diff before the agent reads it, saving 60 to 90 percent of the tokens while preserving every error line. Measured savings: 61% on a pytest run with 11 failures (all 11 failure lines kept), 89% on git log, and 86% on a 30-commit git diff. It is fully reversible.
How does it know when the index is stale?
Every MCP response carries a _meta envelope with index_age_days, the indexed_commit, and a stale_warning that appears only when the index has actually diverged from HEAD. Silence means the index is current. This is honesty as a feature: the agent is told when to verify against source rather than trusting a snapshot blindly.
Is it locked to one editor or vendor?
No. repowise is open source under AGPL-3.0 and self-hostable, and it speaks the open Model Context Protocol, so any MCP client can call it. You can run it fully local with your own API key, or fully offline via Ollama, and your code never has to leave your infrastructure.
What are the nine tools?
get_overview (architecture map, module list, entry points), get_answer (a cited answer with calibrated retrieval_quality), get_context (a triage card for files, modules, or symbols), get_symbol (raw source bytes for one indexed symbol), search_codebase (semantic search over the wiki), get_risk (hotspot scores, dependents, and PR directives), get_why (architectural decision rationale and lineage), get_dead_code (unreachable code by confidence tier), and get_health (per-file code-health scores).
How is this different from my IDE's built-in index?
IDE indexes like Cursor and Continue are ephemeral, single-repo, and embeddings-only: they re-embed on demand and forget. repowise is a durable, structured layer every agent can call over MCP, enriched with code health, git history, ownership, and architectural decisions your editor never sees, and it spans multi-repo workspaces.
Does it generate context files like CLAUDE.md?
Yes. repowise auto-generates CLAUDE.md for Claude Code and a managed AGENTS.md for Codex, with architecture, entry points, hotspots, and conventions, and keeps them current as the codebase changes. Agents that read those files get accurate orientation before they make a single tool call.