monaa-guard
OfficialREADME.md
# monaa-guard
[](https://github.com/monaa-research/monaa-guard/actions/workflows/ci.yml)
[](https://github.com/monaa-research/monaa-guard/releases/tag/v0.1.0)
[](./LICENSE)
[](./crates/monaa-guard/src/lib.rs)
[](#free-local-vs-178x-cloud)
**Stop Claude Code, Cursor & Antigravity from burning $20 reading `node_modules`, leaking `.env`, or drifting mid-build.**
Cut local MCP token bloat **40%–65% free forever**—or unlock **17.8x KV-cache compression** in the cloud.

---
## 1-Line Install
```sh
curl -fsSL https://raw.githubusercontent.com/monaa-research/monaa-guard/main/install.sh | sh
```
**Or paste this repo URL directly into Cursor / Claude Code / Antigravity chat:**
```text
Install and set up https://github.com/monaa-research/monaa-guard in this project using install.sh, wrap our MCP servers with monaa-guard proxy, and run monaa-guard doctor.
```
What happens in ~10 seconds:
1. Downloads the **SHA-256 verified** Rust binary (`v0.1.0`) for macOS or Linux (`x86_64` / `arm64`, zero Python dependencies).
2. Wires `.mcp.json` to proxy MCP tools through `monaa-guard`—your LLM API keys stay `100%` on your machine (`0` keys transmitted).
3. Blocks `.env` reads, `rm -rf`, symlink escapes, and reverse-engineering attempts in **`27 µs`** locally before any tool executes.
```sh
monaa-guard init "Real-time invoice schema validator CLI" # Create SPEC.md, TASKS.md, SKILL.md, & .mcp.json
monaa-guard savings # Print your token savings card + share badge
monaa-guard doctor # Benchmark local latency (<50 us) & key custody
```
---
## Before vs. After (Real Audited Billing Proof)
On **190.37M+ audited input tokens**, deterministic prompt/prefix alignment drops billed input cost from **`$22.31` -> `$1.25`** (`$0.1172 -> $0.0066` per `1M` tokens, **`17.8x`** cheaper):
| What Changes | Unprotected Coding Agent | `monaa-guard` Free Local (`Apache-2.0`) | `monaa-guard` + 17.8x Cloud Trial |
| --- | --- | --- | --- |
| **Token Bloat (`node_modules`, `target/`, loops)** | Full raw dump into context | **40%–65% smaller locally** (unlimited, free forever) | Stacks **17.8x KV-cache alignment** on top |
| **Bill on 190.37M Tokens (`$0.1172 -> $0.0066/1M`)** | `$22.31` uncached bill | `$7.81 – $13.39` (40%–65% cut locally) | **`$1.25`** verified cached rate (`17.8x` drop) |
| **`.env` Leaks & `rm -rf` Mistakes** | Depends on prompt luck | **Blocked in `27 µs`** deterministically before run | Blocked + signed execution audit trail |
| **Mid-Build Tool / Schema Drift** | Silent tool/schema changes | Shared `SPEC.md` + `monaa-guard.toml` lock | Strict post-handshake schema pinning |
| **LLM API Key Custody** | Depends on proxy | **100% local (`0` keys leave host)** | **100% BYOK (`0` keys leave host)** — hashes only |

### Track Every Dollar Locally (`monaa-guard savings`)
```text
+----------------------------------------------------------------------+
| monaa-guard // Free Local Token Compactor & 27 us Wire Shield |
+----------------------------------------------------------------------+
| Responses Compacted : 142 |
| Tokens Saved Local : 1,840,200 |
| Payload Reduction : 54% |
| Bloat / Loops Cut : 9,410 bloat lines · 312 echoes |
| Est. Local Savings : $0.22 |
| Extra Cloud Waiting : $20.35 (17.8x KV-Cache Multiplier) |
+----------------------------------------------------------------------+
```
---
## Start Your Free 7-Day 17.8x Cloud Trial
The **local token compactor & `27 µs` firewall stay free and unlimited forever** (zero daily caps, zero credit card). When you want the **17.8x cloud KV-cache compression**, strict schema pinning, and **Day-1 priority on the upcoming MONAA Native AI Model**:
```sh
monaa-guard trial <you@company.com> --github <your_github_username>
```
Or claim your pass visually at **[monaa.tech/guard](https://monaa.tech/guard)**!
- **No wasted clock:** Your 7 full days begin only on your **first cloud request**—claiming early burns zero time.
- **No surprise lockouts:** After Day 7, `monaa-guard` cleanly keeps your **unlimited free local compactor & `27 µs` shield** active.
- **Launch pricing when you upgrade (through Dec 31, 2026):** `₹9` for 30 days in India (manual UPI/card, strictly no AutoPay) -> `₹999` / 30d; or `$3.90` Month 1 globally -> `$30/mo` (`$306/yr`).
---
<a id="free-local-vs-178x-cloud"></a>
## Connect Any IDE or Terminal Agent
- **Claude Code:**
```sh
claude mcp add guarded-tools -- monaa-guard proxy --upstream "npx -y @modelcontextprotocol/server-filesystem ."
```
- **Cursor / VS Code / Antigravity (`.mcp.json`):**
```json
{"mcpServers":{"guarded-tools":{"command":"monaa-guard","args":["proxy","--upstream","npx -y @modelcontextprotocol/server-filesystem ."]}}}
```
- **Agent guides:** See [AGENTS.md](./AGENTS.md) and [CLAUDE.md](./CLAUDE.md). Built in Pure Safe Rust (`#![forbid(unsafe_code)]`, `#![deny(clippy::unwrap_used)]`, `#![deny(clippy::expect_used)]`).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues