$git clone https://github.com/drhalto/agentmakoLocal-first MCP server that gives coding agents structured context packets, code/schema facts, and diagnostics - backed by a local SQLite store.
| 1 | <p align="center"> |
| 2 | <img src="apps/web/public/agentmako.png" alt="agentmako logo" width="180" /> |
| 3 | </p> |
| 4 | |
| 5 | # agentmako |
| 6 | |
| 7 | [](https://www.npmjs.com/package/agentmako) |
| 8 | [](https://github.com/drhalto/agentmako/actions/workflows/smoke.yml) |
| 9 | [](./LICENSE) |
| 10 | [](https://nodejs.org/) |
| 11 | [](https://glama.ai/mcp/servers/drhalto/agentmako) |
| 12 | |
| 13 | agentmako is a local-first codebase intelligence engine for AI coding |
| 14 | tools. |
| 15 | |
| 16 | It gives agents like Codex, Claude Code, Cursor, and local harnesses a |
| 17 | compact Reef-first tool surface for understanding a project before they edit |
| 18 | it. Mako indexes your repo, builds local SQLite-backed facts, tracks |
| 19 | diagnostics and review notes, and answers evidence-backed questions instead of |
| 20 | making the agent orchestrate broad tool chains or rediscover everything with |
| 21 | raw grep. |
| 22 | |
| 23 | Mako is built for the first mile of coding-agent work: |
| 24 | |
| 25 | > What files matter? What routes, symbols, tables, diagnostics, and prior |
| 26 | > findings are relevant? What should the agent read next? |
| 27 | |
| 28 | ## What You Get |
| 29 | |
| 30 | - MCP server for coding agents: `agentmako mcp` |
| 31 | - Local dashboard: `agentmako dashboard` |
| 32 | - Primary project query: `reef_ask` across code, database, findings, |
| 33 | diagnostics, instructions, freshness, and literal checks |
| 34 | - Queryable workflow orientation: `mako_help` |
| 35 | - Deterministic context expansion: `context_packet` |
| 36 | - `_hints` on tool results so agents get result-specific next steps |
| 37 | - Central MCP annotations so clients can distinguish safe reads, live reads, |
| 38 | and local-state mutations |
| 39 | - Compact loop/fallback tools: `reef_status`, `reef_verify`, `reef_impact`, |
| 40 | `live_text_search`, `lint_files`, and `tool_batch` |
| 41 | - [Reef Engine](./docs/reef-engine.md) facts and findings across indexed, |
| 42 | working-tree, and staged state |
| 43 | - Reef convention extraction for auth guards, runtime boundaries, generated |
| 44 | paths, route patterns, and schema usage |
| 45 | - TypeScript, ESLint, Oxlint, Biome, and staged git diagnostic ingestion |
| 46 | - Hot-reloaded `.mako/rules` YAML rule packs, including primitive |
| 47 | cross-file helper-bypass rules via `canonicalHelper` |
| 48 | - Optional Postgres/Supabase schema snapshots and read-only DB inspection |
| 49 | - Local DB review comments for notes on tables, RLS, triggers, |
| 50 | publications, subscriptions, and replication |
| 51 | - Recall, acknowledgements, and agent feedback for repeated review work |
| 52 | |
| 53 | Everything important runs locally. No hosted service is required. |
| 54 | |
| 55 | ## Install |
| 56 | |
| 57 | Requires **Node.js 20 or newer**. |
| 58 | |
| 59 | ```bash |
| 60 | npm install -g agentmako |
| 61 | ``` |
| 62 | |
| 63 | Confirm the CLI is available: |
| 64 | |
| 65 | ```bash |
| 66 | agentmako --version |
| 67 | agentmako doctor |
| 68 | ``` |
| 69 | |
| 70 | You should see green checks for configuration and the local API service. |
| 71 | |
| 72 | > Prefer to build from source (e.g. to contribute)? See |
| 73 | > [Develop From Source](#develop-from-source) at the bottom of this |
| 74 | > file. |
| 75 | |
| 76 | ## Happy Path Setup |
| 77 | |
| 78 | ### 1. Attach your real project |
| 79 | |
| 80 | Go to the project you want Mako to understand: |
| 81 | |
| 82 | ```bash |
| 83 | cd C:/path/to/your/project |
| 84 | ``` |
| 85 | |
| 86 | Attach and index it: |
| 87 | |
| 88 | ```bash |
| 89 | agentmako connect . --no-db |
| 90 | ``` |
| 91 | |
| 92 | Use `--no-db` for the first run. It gets the code intelligence path |
| 93 | working before adding database scope. |
| 94 | |
| 95 | ### 2. Confirm Mako sees the project |
| 96 | |
| 97 | ```bash |
| 98 | agentmako status . |
| 99 | agentmako tool list |
| 100 | ``` |
| 101 | |
| 102 | Run a real Reef query: |
| 103 | |
| 104 | ```bash |
| 105 | agentmako --json tool call . reef_ask "{\"question\":\"where should I inspect auth route state?\"}" |
| 106 | ``` |
| 107 | |
| 108 | If that returns an evidence-backed answer, facts, findings, or next queries, |
| 109 | the core setup is working. |
| 110 | |
| 111 | `reef_ask` plans over code, database, durable findings, diagnostics, and exact |
| 112 | literal evidence. App-flow questions favor file, route, and finding evidence; |
| 113 | RLS/schema questions favor database facts and review comments. To inspect |
| 114 | project rules of thumb directly: |
| 115 | |
| 116 | ```bash |
| 117 | agentmako --json tool call . project_conventions "{}" |
| 118 | ``` |
| 119 | |
| 120 | ### 3. Configure your MCP client |
| 121 | |
| 122 | Add this to your MCP client config: |
| 123 | |
| 124 | ```json |
| 125 | { |
| 126 | "mcpServers": { |
| 127 | "mako-ai": { |
| 128 | "command": "agentmako", |
| 129 | "args": ["mcp"] |
| 130 | } |
| 131 | } |
| 132 | } |
| 133 | ``` |
| 134 | |
| 135 | Restart the MCP client and confirm the `mako-ai` server starts. |
| 136 | |
| 137 | In the agent, default to `reef_ask`. The compact starting surface is: |
| 138 | |
| 139 | - `reef_ask` for project questions across code, database, findings, |
| 140 | diagnostics, freshness, and quoted literal checks |
| 141 | - `reef_status` for maintained issues, changed files, stale diagnostics, and |
| 142 | watcher/schema health |
| 143 | - `reef_verify` for the completion gate over diagnostic freshness and open loops |
| 144 | - `reef_impact` for changed-file blast radius and convention risks |
| 145 | - `mako_help` for an ordered workflow recipe with prefilled arguments |
| 146 | - `live_text_search` for exact current-disk regex/glob inventories |
| 147 | - `lint_files` for bounded diagnostics and `.mako/rules` findings |
| 148 | - `tool |