Mcp-Omega-Brain
A self-contained MCP server that gives AI agents verifiable provenance, cross-session memory, a cryptographic audit trail, and a 10-gate deterministic build evaluation pipeline. No external server required.
SYSTEM INVARIANT: VERITAS Build does not determine whether code is 'good.' VERITAS Build determines whether code survives disciplined attempts to break it under explicitly declared primitives, constraints, test regimes, boundaries, cost models, evidence, and policy.
Architecture
Layer | Component | Role |
Brain Core | Vault (SQLite) | Persistent session/entry storage with FTS5 search |
Brain Core | SEAL Ledger | Append-only SHA3-256 hash chain for tamper-proof audit |
Brain Core | RAG Provenance | Semantic embedding store with 3-tier engine (ST/fastembed/TF-IDF) |
Brain Core | Cortex | Tri-Node approval gate with steer/block modes |
Brain Core | Handoff | SHA-256 sealed cross-session memory transfer |
Build Gates | 10-Gate Pipeline | INTAKE→TYPE→DEPENDENCY→EVIDENCE→MATH→COST→INCENTIVE→SECURITY→ADVERSARY→TRACE/SEAL |
Build Gates | Evidence Engine | Quality(e) formula, MIS_GREEDY, Agreement computation |
Build Gates | CLAEG | Constraint-locked state machine with 3 terminal states |
Build Gates | NAFE Scanner | Narrative failure signature detection |
Related MCP server: Agent Trust Stack MCP Server
Verdict System
Verdict | Precedence | Meaning |
| 0 (lowest) | All gates satisfied. Artifact is deployable under declared regime. |
| 1 | Gates pass but resource/coverage/confidence near redline. Deploy with monitoring. |
| 2 | Insufficient evidence or timeout. Cannot affirm or deny. Block deploy. |
| 3 (highest) | Constraint failure, security vulnerability, or test failure. Block deploy. |
Tools (26)
Brain Core (12)
Tool | Purpose |
| Episodic task briefing: RAG + vault + sealed handoff + VERITAS score |
| Semantic search over RAG provenance store |
| Add text fragment to RAG store |
| Full-text keyword search across vault entries |
| Tri-Node approval gate with similarity scoring |
| Cortex correction mode — steer drifting args or hard block |
| Append tamper-proof S.E.A.L. entry to audit ledger |
| Write session record to vault |
| SHA-256 sealed cross-session handoff |
| Cortex-wrapped meta-tool — default execution path |
| Human-readable audit report |
| Unified brain health: vault stats, fragment count, ledger entries |
Build Gates (15)
Tool | Purpose |
| Gate 1/10: Canonicalize, validate fields, compute ClaimID |
| Gate 2/10: Primitives, domains, operators, symbols |
| Gate 3/10: SBOM, CVE, integrity, licenses, depth |
| Gate 4/10: MIS_GREEDY, Quality(e), K/A/Q thresholds |
| Gate 5/10: Constraint satisfaction via interval arithmetic |
| Gate 6/10: Resource utilization vs redline thresholds |
| Gate 7/10: Source dominance and vendor concentration |
| Gate 8/10: SAST, secrets, injection, auth, crypto |
| Gate 9/10: Fuzz, mutation, exploit, outage, spike |
| Full 10-gate pipeline — final verdict + seal hash |
| Compute Quality(e) for single evidence item |
| Run MIS_GREEDY algorithm on evidence items |
| Map verdict to CLAEG terminal state |
| Validate state transition (absence = prohibition) |
| Scan for NAFE failure signatures in AI text |
Resources (9)
URI | Description |
| Auto-fetched startup: RAG + handoff + vault context |
| SHA-256 verified cross-session handoff |
| Session ID, call count, data directory |
| DB stats, embedding engine, ledger count |
| Full canonical VERITAS Omega Build Spec |
| Terminal states, transitions, invariants, prohibitions |
| The 10-gate pipeline sequence |
| Dev/baseline regime numeric thresholds |
| Escalated production regime thresholds |
Quick Start
Requirements
Python 3.11+
pip install mcp
Optional (better embeddings)
pip install fastembed # ONNX embeddings, ~30MB
pip install sentence-transformers numpy # Best quality, largerConfigure in Claude Desktop / Antigravity
{
"mcpServers": {
"omega-brain": {
"command": "python",
"args": ["path/to/omega_brain_mcp_standalone.py"],
"env": { "PYTHONUTF8": "1" }
}
}
}SSE Mode
python omega_brain_mcp_standalone.py --sse --port 8055
# Endpoints: GET /sse, POST /messagesFile Structure
omega-brain-mcp/
omega_brain_mcp_standalone.py # MCP server (~1430 lines) — Brain Core + tool dispatch
veritas_build_gates.py # Gate engine (~1430 lines) — pure deterministic logic
omega_client.py # Python client helper
requirements.txt # mcp>=1.0.0
pyproject.toml # Package config
tests/
test_build_gates.py # Gate pipeline tests
test_veritas.py # VERITAS scoring tests
test_seal.py # SEAL chain integrity tests
test_handoff.py # Handoff seal/context tests
test_cortex.py # Cortex approval tests
test_vault.py # Vault persistence testsCLAEG State Machine
INIT → { STABLE_CONTINUATION | ISOLATED_CONTAINMENT | TERMINAL_SHUTDOWN }
STABLE_CONTINUATION → { STABLE_CONTINUATION | ISOLATED_CONTAINMENT | TERMINAL_SHUTDOWN }
ISOLATED_CONTAINMENT → { STABLE_CONTINUATION | TERMINAL_SHUTDOWN }
TERMINAL_SHUTDOWN → {} (absorbing)Invariant: Absence of an allowed transition is treated as prohibition.
License
MIT
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/VrtxOmega/omega-brain-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server