{"_id":"b-a-mcp","name":"b-a-mcp","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"b-a-mcp","version":"0.1.0","description":"B&A build-loop gates and repo-audit tools as a local MCP server.","keywords":["mcp","model-context-protocol","claude","claude-code","build-loop","repo-audit","context-audit","prompts","stdio","developer-tools"],"homepage":"https://github.com/omo-ifa/B-A-MCP#readme","bugs":{"url":"https://github.com/omo-ifa/B-A-MCP/issues"},"repository":{"type":"git","url":"git+https://github.com/omo-ifa/B-A-MCP.git"},"license":"Apache-2.0","author":{"name":"Bobb Alexander Solutions"},"type":"module","bin":{"b-a-mcp":"dist/src/index.js"},"engines":{"node":">=20"},"scripts":{"build":"tsc","pretest":"tsc","test":"node --test \"dist/test/**/*.test.js\""},"dependencies":{"@modelcontextprotocol/sdk":"^1.30.0","ignore":"^7.0.6"},"devDependencies":{"@types/node":"^20.0.0","typescript":"^5.4.0"},"gitHead":"18a4e62f33deedaec5c96e03152c1985b71468f6","_id":"b-a-mcp@0.1.0","_nodeVersion":"25.2.1","_npmVersion":"11.8.0","dist":{"integrity":"sha512-ZPy1sh/bPTYU3EnLkQIetfbOEw1VRl9MI3bMgkInbQihpLEFJH2fbA1lj0UVs4hcnkhDiG2s8/ei296mz1GpKA==","shasum":"924c0776fcec41f113593fe263916bdbfeff8d9c","tarball":"https://registry.npmjs.org/b-a-mcp/-/b-a-mcp-0.1.0.tgz","fileCount":38,"unpackedSize":146073,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDo4ggfW7bUfqsIRhFuzbSj9eAQ1+ywOedSPfWkBIPMBgIgfQa5ZVaR7NweE/YqGzvfHYGQG38NQ2BglkkzU0Srmr0="}]},"_npmUser":{"name":"omoifa","email":"talexander0819@protonmail.com"},"directories":{},"maintainers":[{"name":"omoifa","email":"talexander0819@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/b-a-mcp_0.1.0_1788381227820_0.050903419241673076"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-02T20:33:47.723Z","0.1.0":"2026-09-02T20:33:47.949Z","modified":"2026-09-02T20:33:48.175Z"},"maintainers":[{"name":"omoifa","email":"talexander0819@protonmail.com"}],"description":"B&A build-loop gates and repo-audit tools as a local MCP server.","homepage":"https://github.com/omo-ifa/B-A-MCP#readme","keywords":["mcp","model-context-protocol","claude","claude-code","build-loop","repo-audit","context-audit","prompts","stdio","developer-tools"],"repository":{"type":"git","url":"git+https://github.com/omo-ifa/B-A-MCP.git"},"author":{"name":"Bobb Alexander Solutions"},"bugs":{"url":"https://github.com/omo-ifa/B-A-MCP/issues"},"license":"Apache-2.0","readme":"# b-a-mcp\n\n**The B&A build-loop gates and repo-audit tools, as a local MCP server for Claude Code.**\n\n`b-a-mcp` puts a disciplined build loop — *Problem-Fit → Intake → Decisions → Design-Doc → Handoff* — and a set of read-only repo-audit tools inside your Claude Code sessions. The gates are the reasoning; the audit tools measure the thing most projects never look at: whether your `CLAUDE.md` / `AGENTS.md` / `CONTEXT.md` routing layer still points at reality.\n\nIt runs locally, over stdio, on your own machine. It reads your real files and never writes to them.\n\n---\n\n## What it is\n\nTwo kinds of surface:\n\n- **The build-loop gates** — five prompts, one per stage of the loop, served over MCP and invocable as slash commands in your client. Each does one job and hands a clean artifact to the next: is AI even the right tool here, understand the problem, resolve every open decision (or defer it as a tracked TBD), write the design doc (WHAT and WHY, never the step-by-step), then verify the record still matches the code at close. The two entry points — `problem-fit` and `intake` — take an optional idea to start from; the rest run on the conversation and repo you already have. The gates guide with an override: none silently blocks you — each states the risk, names the cheaper path, and logs the override if you proceed anyway.\n\n- **The repo-audit tools** — three read-only checks that run against your working tree, all shipping today. **`context_audit`** walks your routing layer and returns a scored, hard-to-fake diagnosis of routing bloat, orphaned docs, routing drift, and coverage gaps. **`override_log`** turns a set of guidance-with-override events into a canonical, scored override log. **`doc_drift`** diffs a documented schema against the canonical one and reports where they have drifted apart.\n\nEverything above is **free and keyless.** Nothing here makes a network call or asks for a token.\n\n---\n\n## Install\n\nRequires Node ≥ 20.\n\n```bash\nnpm install -g b-a-mcp\n```\n\nRegister it with Claude Code as a local MCP server (stdio):\n\n```jsonc\n// .mcp.json (project) or your Claude Code MCP settings\n{\n  \"mcpServers\": {\n    \"b-a-mcp\": {\n      \"command\": \"b-a-mcp\"\n    }\n  }\n}\n```\n\nThe server exposes all three tools — `context_audit`, `override_log`, and `doc_drift` — on `tools/list`. For `context_audit`, point it at a directory (or let it default to the working directory); it resolves upward to the nearest `CLAUDE.md` / `AGENTS.md` and audits from there. `override_log` and `doc_drift` take their input inline and read no files.\n\nIt also serves the five gates on `prompts/list` — invoke them as slash commands (`/problem-fit`, `/intake`, `/decisions`, `/design-doc`, `/handoff`). `problem-fit` and `intake` accept an optional `idea` argument; the other three run on the conversation and repo already in context.\n\n---\n\n## See it run\n\n`context_audit` builds its own report and hands it back verbatim — one screen, no narration. Below is a **real run on this repository** (every number is live; only the root path is shown generically). Point the tool at this repo to reproduce it:\n\n```text\n# context_audit — routing health\n\n**Score:** 100/100\n**Root:** /path/to/b-a-mcp  (resolved via claude_md — root path shown generically)\n\n| sub-score      | value      |\n|----------------|------------|\n| bloat          | 100 (n=2)  |\n| orphans        | 100 (n=8)  |\n| routing_drift  | 100 (n=51) |\n| coverage       | 100 (n=7)  |\n\n## low (1)\n- bloat  CLAUDE.md — routing file is large; a reader must load it all to orient here\n    (evidence: router_tokens=3869)\n\n## info (1)\n- broken_ref  src/API.md — a link points at a path that does not exist: reported, never scored\n\n## stats\n- docs_in_scope: 11, routing_files: 2, routing_tokens: 5352\n\n> coverage measures whether the routing layer claims your code, not whether the claim is\n> accurate — content accuracy is doc_drift's job.\n```\n\nTwo things that report is doing on purpose:\n\n- **The finding list and the score are different questions.** The one `broken_ref` above is *listed* (so you can see it) but never *scored* — a broken link outside a routing doc is information, not routing rot. The same separation applies to orphans: in a repo with dated archival plans, skill directories, or agent-runtime config, every such doc is *listed* yet recognised as intentional layout, so a pile of orphan findings can still score 100 on the orphans sub-score.\n- **It refuses to publish a number it can't defend.** Through calibration the score printed with an `uncalibrated … not a published figure` caveat; that calibration is now closed — the four sub-score weights and every score-driving threshold were ratified against a pinned corpus of real repositories — so the number above is published clean. The flag is a real switch, not decoration: the tool would still rather show a caveat than a confident wrong number.\n\n---\n\n## The free / paid boundary\n\nThis is fixed and simple:\n\n- **Free = the reasoning.** All five gate prompts and all three repo-audit tools (`context_audit`, `override_log`, `doc_drift`) are free, keyless, and local. They never touch B&A infrastructure.\n- **Paid = the record.** One tool, `export_record` (Phase 2), persists a gate or audit output as a versioned, timestamped artifact. It is the only call that requires a key and the only one that leaves your machine.\n\nThe free tier stands on its own. The paid tier just keeps the receipt.\n\n---\n\n## Status\n\nPhase 1 (free tier). All three repo-audit tools — `context_audit`, `override_log`, `doc_drift` — are shipped and registered, and the five gate prompts are served over MCP; the free tier is feature-complete. `context_audit`'s headline weighting and score-driving thresholds are now calibrated against a pinned corpus of real repositories, so it publishes its score without a caveat (see above).\n\n---\n\n## License\n\n`b-a-mcp` is B&A's own code plus a small set of bundled third-party components, each under its own license. See [`LICENSE`](LICENSE) and [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) for the full terms and the per-component notices.\n","readmeFilename":"README.md","_rev":"1-0fe888c5f625f00cbc3265f163b1a272"}