Stop juggling 5 AI coding terminals, burning 50k+ prefix tokens per turn, and exposing localhost dashboards.

Mizan is a zero-dependency, local-first control plane & 4-tool stdio SQLite FTS5 MCP hub that unifies Claude Code, Codex, Cursor, OpenCode, and Antigravity under one calm, hardened, fair-quota operating system.

Live Demo · Use Cases · Quickstart · Architecture · Security · Enterprise · Full Wiki

One hardened local web UI (127.0.0.1:4321, zero npm packages, zero build step) giving you Fleet-Wide Broadcast, Hierarchical Projects → Active Agents, 1-Click Quota Shifting (Green / Yellow / Red), Human-in-the-Loop Decision Queue, and 30-Day Skill ROI:

If you use Claude Code + Cursor + Codex + OpenCode + Antigravity together, coding is no longer the bottleneck. Orchestration, silent token burn, and localhost security are.

| Measured Pain Point | Typical Multi-Agent Setup | With Mizan | Result | |---|---|---|---| | Skill / Prefix Bloat | 1,200+ scanned skills (50k+ tok/turn) | 6– 11 active skills (< 3k tok) | ~94% fixed prefix cut | | Quota & Plan Exhaustion | Hit weekly/entry caps blindly mid-task | 1-Click Green / Yellow / Red + Fallback Chain | Cache-safe HANDOFF.md shifts | | Localhost Security | Open 127.0.0.1 dashboards & HTTP MCPs | Strict Host/Origin (403) + Bearer ( 401) + stdio MCP | Blocks DNS Rebinding & CSRF | | Repeated Agent Mistakes | Same bugs across 5 separate chat histories | 30-Lesson Cap (LESSONS.md) + FTS5 Search | Shared cross-agent memory | | Weekly Maintenance Cost | Manual reviews or expensive LLM audits | 0 LLM tokens (weekly-health.py) | Automated Skill ROI + Model probe |

| Use Case | How You Use Mizan | Immediate Win | |---|---|---| | Solo Founders & Indie Hackers | Run new-venture.py to stamp out a linkedPlatform + Social Media + Partnerships Triad in< 1s , with raw milestone logging (STORY_AND_PITCH_LOG.md ). | Ship products, marketing, and BD in lockstep without polluting coding chats. | | Multi-Agent Power Users | Sync one AGENTS-CORE.md +LESSONS.md toall 5 agents (including a<= 30 -line Cursor conservation rule and$0 OpenCode Free Tier offloading). | Stop copy-pasting rules across 5 tools and stop burning paid quota on boilerplate. | | Security-Conscious Engineers | Run the 4-tool stdio Hub MCP (zero open ports) +Hardened Action Center (DNS Rebinding & CSRF blocked by default) + Tailscale E2EE mobile access. | Full remote control from your phone with zero cloud relays seeing your code. | | AI-Native Engineering Teams | Enforce Pre-Flight Kickoff Gate ,DECISION-QUEUE.json , static RLS/secret guards (check:rls ,gitleaks ,oxlint ), and weekly 0-token Skill ROI audits. | Eliminate over-parallelization collisions and runaway API spend across teams. |

Prerequisites: Node.js 24+ (uses built-in node:sqlite FTS5 — zero npm install needed!) and Python 3.10+.

git clone https://github.com/csa7mdm/mizan.git "$env:USERPROFILE\.claude\brain"
cd "$env:USERPROFILE\.claude\brain"

# Installs missing prerequisites (winget) + optional CLI agents + syncs fleet + schedules weekly audit
powershell -ExecutionPolicy Bypass -File .\bootstrap.ps1 -InstallAgents
git clone https://github.com/csa7mdm/mizan.git ~/.claude/brain
cd ~/.claude/brain

# Installs missing prerequisites (brew/apt) + optional CLI agents + syncs fleet + weekly cron audit
bash bootstrap.sh --install-agents
git clone https://github.com/csa7mdm/mizan.git ~/.claude/brain
cd ~/.claude/brain

# 1. Start the hardened Action Center (auto-generates gitignored Bearer token in ops/.ac-token)
node action-center/server.mjs

# 2. Verify the 4-tool stdio SQLite FTS5 Hub MCP
node hub-mcp/selftest.mjs

# 3. Connect Hub MCP to Claude Code (or add hub-mcp/index.mjs to Cursor / OpenCode / Antigravity)
claude mcp add brain-hub -- node "$HOME/.claude/brain/hub-mcp/index.mjs"

# 4. Run your first 0-token Weekly Health & Skill ROI Audit
python scripts/weekly-health.py

One local source of truth (~/.claude/brain) coordinates all 5 Desktop Apps & CLIs via structured ops/ files and a 4-tool stdio MCP server.

flowchart TD
    Human["Founder / Engineer"] --> AC["Mizan Action Center (127.0.0.1:4321)\nHost/Origin Guard + Bearer Auth + Tailscale"]

    subgraph Core["Single Source of Truth (~/.claude/brain)"]
        OPS["ops/ Live Command Bus\nFLEET-STATUS.json | BROADCAST.md\nDECISION-QUEUE.json | health-snapshot.json"]
        RULES["Rules & Capped Memory\nAGENTS-CORE.md | LESSONS.md (<=30)\nMODEL-REGISTRY.json | active-projects.md"]
        MCP["hub-mcp/ (stdio-only, Node 24 SQLite FTS5)\nbrain_search_lessons | brain_search_components\nbrain_get_ops_state | brain_log_decision"]
    end

    AC <-->|"Live JSON State & Decisions"| OPS
    MCP <-->|"Zero-Network stdio JSON-RPC"| Fleet

    subgraph Fleet["5-Agent Coding Fleet (Desktop Apps + CLIs)"]
        AGY["Antigravity\nLead + Browser + MCP"]
        CC["Claude Code\nDeep Refactors + --worktree"]
        CDX["Codex CLI/App\nIndependent Review + Tests"]
        OC["OpenCode Free Tier\n$0 Boilerplate (Verify-Gated)"]
        CUR["Cursor Entry Plan\nTight Quota (yellow-conserve)"]
    end

    RULES -->|"05-APPLY-BRAIN.sh (Copy, No Symlinks)"| Fleet
    OPS <--> Fleet
php
flowchart LR
    F["CI Fail / Subagent Stall / Drift"] --> L1["Layer 1: Deterministic Guard (0 Tokens)\noxlint | gitleaks | check:rls | pnpm audit"]
    L1 --> L2["Layer 2: Bounded Recovery (Max 2 Tries)\nerror tail -> known recipe -> verify"]
    L2 -->|Green| L3["Layer 3: Sandboxed Kaizen\n1-sentence rule -> LESSONS.md (<=30)"]
    L2 -->|Still Failing| ESC["Hard Stop -> ops/DECISION-QUEUE.json\nExact logs + 1 recommendation"]

Most local AI dashboards and HTTP MCP servers assume 127.0.0.1 is trusted — making them trivial targets for browser DNS Rebinding and CSRF attacks. Mizan hardens every boundary out of the box:

  • DNS Rebinding Guard (403 Forbidden): Rejects any Host outside127.0.0.1 ,localhost ,[::1] , Tailscale (100.64.0.0/10 ), or*.ts.net .
  • CSRF Guard (403 Forbidden): Rejects any cross-site Origin header.
  • Timing-Safe Bearer Auth (401 Unauthorized): Random 48-char hex token in gitignored ops/.ac-token , checked viacrypto.timingSafeEqual .
  • stdio-Only MCP: hub-mcp opens zero network ports and strictly sandboxes file access.
  • Private Mobile Access: UseTailscale (BRAIN_AC_TAILSCALE=1 ) for E2EE WireGuard access + optional push-only webhooks (ntfy.sh ) that transmitonly Decision ID and title (zero code/secrets).

| Feature | Mizan OSS (MIT — This Repo) | Mizan Enterprise (AAA Corporate) | |---|---|---| | 5-Agent Fleet Sync & Pre-Flight Gate | Included | Included | | Hardened Action Center + Tailscale Mobile | Included | Included + SSO / SAML / RBAC | | 4-Tool stdio Hub MCP (SQLite FTS5) | Included | Shared Team Postgres / Vector Hub | | Weekly 0-Token Health & Skill ROI Audit | Included | Org-Wide FinOps & Spend Caps | | Venture Triad Bootstrap + Static RLS Guards | Included | Policy-as-Code + Immutable Audit Logs | | Deployment & Compliance | Local-First | Air-Gapped / On-Prem + SOC 2 / ISO 27001 Readiness |

Dive deeper into every subsystem in docs/wiki/:

Mizan ("Balance / Scale", pronounced Mee-zan · ミザン · Мизан) bridges three engineering traditions: the structural stillness of Ancient Egyptian Ma'at, the fair-measure precision of Islamic Al-Mizan (Mizan al-Hikma), and Japanese Zen Ma (intentional negative space) & Kaizen (continuous improvement).

If Mizan saves you tokens, time, or terminal chaos, consider starring the repo and opening an issue or PR!

原文来源:github.com