The premise is that most bad agent edits are not syntax problems but missing history: a constraint that a review argued about two years ago, a regression that came back twice, the one test command that actually covers this file. Anchor mines that from merged PRs and pairs it with a current code index, returning it with citations and a confidence level rather than as prose. Indexing is local and GitHub access is read-only, so the cost is disk and a first sync — and the evidence is only ever as good as the PR history in the repository you point it at.
A local-first MCP server that indexes GitHub PR history together with your current code into a SQLite file under `.anchor/`, then serves an agent ranked, cited context before it changes anything. One primary tool answers what should be known before touching this, and a set of secondary tools cover file explanation, diff review, architecture, tests, onboarding and cross-repo impact.
- Ranked, cited context for a task — constraints from merged PRs and review comments, relevant tests, regression memory — each with a confidence level and a freshness check against the current code — `anchor_get_context`
- A strict mode that returns only non-stale evidence at or above a minimum confidence, and says so plainly when nothing qualifies instead of padding the prompt — `anchor_get_context`
- Per-file history, a review pass over a diff, and free search across indexed history — `anchor_explain_file`, `anchor_review_diff`, `anchor_search_history`
- Architecture patterns for an area, a map of them, and a check of a diff against them — `anchor_get_architecture`, `anchor_get_architecture_map`, `anchor_check_architecture`
- The test commands that actually cover a file, ranked by how strongly — `anchor_get_test_commands`
- Cross-repo impact across allowlisted repositories: affected repos, API consumers, shared packages, regression memory and required tests — `anchor_check_cross_repo_impact`, `anchor_find_api_consumers`, `anchor_get_org_context`, `anchor_get_org_architecture`
- An evidence-backed plan for a task, an onboarding pack for an area, and index coverage reporting — `anchor_plan_task`, `anchor_onboarding_pack`, `anchor_get_playbook`, `anchor_index_status`, `anchor_org_index_status`
Node, from npm as `@pratik7368patil/anchor` — `npm install -g` or `npx -y`. GitHub access reuses local authentication that is already on the machine: `GITHUB_TOKEN`, `GH_TOKEN` or `gh auth token`, read-only scope, and the token is never written into MCP config, the SQLite index, logs or generated files. `anchor init` writes the client config for Cursor, Claude Code, Codex, VS Code, Antigravity or a generic client, adds `.anchor/` to the local git exclude, and installs a daily incremental sync that `--no-autosync` turns off. `npx @pratik7368patil/anchor demo` runs the whole thing on bundled fixtures with no token and no repository index.
One command plus a key — npm install -g @pratik7368patil/anchor, then supply credentials
