{
  "name": "axiom",
  "title": "AXIOM — Constitutional & Runtime Authority Tools",
  "description": "Constitutional AI governance + runtime authority control as MCP tools. 25 tools spanning the full Inference OS: constitutional guard, reasoning trace, QRF forecast, intent gate, multi-agent orchestrator, OS shield, sovereign phone coprocessor, physical-intelligence agent, AXM container runtime, memory, workspace, ledger, marketplace, stop-authority gate, bonded micro-agent office, adversarial sandbox, CRL reward, immune system, multimodal fusion, and the 9-agent constitutional research pipeline. Every tool result is HMAC-SHA256 signed under axiom-mcp-v1 so the client can re-verify with axiom_signing.verify and detect any tampering between server and client.",
  "version": "1.12.0",
  "homepage": "https://github.com/Orivael-Dev/axiom",
  "documentation": "https://github.com/Orivael-Dev/axiom#mcp-server",
  "license": "Apache-2.0",
  "author": "Orivael Dev",
  "marketing_site": "https://orivael.dev",
  "live_demo": "https://firewall.orivael.dev",

  "transport": "stdio",
  "protocol": "JSON-RPC 2.0",
  "command": "python3",
  "args": ["axiom_mcp_server.py"],
  "env_required": ["AXIOM_MASTER_KEY"],
  "env_doc": {
    "AXIOM_MASTER_KEY": "64-char hex string. Generate with `python3 -c \"import secrets; print(secrets.token_hex(32))\"`. Every signing namespace is derived from this single root via axiom_signing.derive_key."
  },

  "tools": [
    {
      "name": "axiom_guard_check",
      "category": "core",
      "description": "Check input against the constitutional boundary. Returns verdict + constitutional distance + signed manifest.",
      "input_schema": { "type": "object", "properties": { "input": { "type": "string" } }, "required": ["input"] }
    },
    {
      "name": "axiom_lint",
      "category": "core",
      "description": "Lint an .axiom spec file for authorship-time issues. Returns health score + per-issue list.",
      "input_schema": { "type": "object", "properties": { "path": { "type": "string" } }, "required": ["path"] }
    },
    {
      "name": "axiom_trace",
      "category": "core",
      "description": "Run the full 3-phase constitutional reasoning trace (preflight / mid_chain / final_synthesis) with magnitude + monotonicity gates.",
      "input_schema": { "type": "object", "properties": { "prompt": { "type": "string" } }, "required": ["prompt"] }
    },
    {
      "name": "axiom_qrf",
      "category": "core",
      "description": "Quantum-style reasoning forecast: N parallel branches with constitutional probability per outcome.",
      "input_schema": { "type": "object", "properties": { "prompt": { "type": "string" }, "branches": { "type": "integer" } }, "required": ["prompt"] }
    },
    {
      "name": "axiom_status",
      "category": "core",
      "description": "Get the AXIOM stack status (version, guard runtime state, test count, patent count, training corpus size).",
      "input_schema": { "type": "object", "properties": {} }
    },
    {
      "name": "axiom_validate",
      "category": "patent_emulator",
      "patent": "ORVL-001",
      "description": "Run the .axiom language validator with optional strict mode.",
      "input_schema": { "type": "object", "properties": { "agent": { "type": "string" }, "strict": { "type": "boolean" } }, "required": ["agent"] }
    },
    {
      "name": "axiom_intent_gate_check",
      "category": "patent_emulator",
      "patent": "ORVL-016",
      "description": "Classify text + optional trajectory through the intent gate. Returns intent_class (INFORM / CLARIFY / REFUSE / HARM / DECEIVE / UNCERTAIN), confidence, signals, and HMAC signature.",
      "input_schema": { "type": "object", "properties": { "text": { "type": "string" }, "trajectory": { "type": "array" } }, "required": ["text"] }
    },
    {
      "name": "axiom_cmaa_route",
      "category": "patent_emulator",
      "patent": "ORVL-017",
      "description": "Route a constitutional packet through the multi-agent orchestrator. HARM / DECEIVE intents are refused before reaching the orchestrator; bonded-pair revocations short-circuit authority without rotating keys.",
      "input_schema": { "type": "object", "properties": { "packet": { "type": "object" } }, "required": ["packet"] }
    },
    {
      "name": "axiom_cmaa_fleet",
      "category": "patent_emulator",
      "patent": "ORVL-017",
      "description": "Inspect fleet trust levels, suspended containers, and review queue depth.",
      "input_schema": { "type": "object", "properties": {} }
    },
    {
      "name": "axiom_shield",
      "category": "patent_emulator",
      "patent": "ORVL-013",
      "description": "Drive the OS Shield daemon — constitutional ransomware defence that stops attackers at the enumeration stage, not after encryption.",
      "input_schema": { "type": "object", "properties": { "action": { "type": "string", "enum": ["status", "tick", "restore"] } }, "required": ["action"] }
    },
    {
      "name": "axiom_phone_gate",
      "category": "patent_emulator",
      "patent": "ORVL-019",
      "description": "Run text through the Sovereign Phone constitutional coprocessor. `out` gates outbound queries; `in` gates inbound cloud responses.",
      "input_schema": { "type": "object", "properties": { "direction": { "type": "string", "enum": ["out", "in"] }, "text": { "type": "string" } }, "required": ["direction", "text"] }
    },
    {
      "name": "axiom_axm",
      "category": "patent_emulator",
      "patent": "ORVL-023",
      "description": "Operate an .AXM container — successor-to-GGUF format treating models as living execution graphs with signed skill delegates and proof ledgers.",
      "input_schema": { "type": "object", "properties": { "action": { "type": "string", "enum": ["inspect", "verify", "route"] }, "path": { "type": "string" } }, "required": ["action", "path"] }
    },
    {
      "name": "axiom_cpi",
      "category": "patent_emulator",
      "patent": "ORVL-022",
      "description": "Drive the Constitutional Physical Intelligence agent — toddler reflex / supervisor / curriculum / examiner stack for robotics, prosthetics, vehicles.",
      "input_schema": { "type": "object", "properties": { "action": { "type": "string", "enum": ["stability", "classify", "simulate", "pickup", "status"] } }, "required": ["action"] }
    },
    {
      "name": "axiom_memory",
      "category": "patent_emulator",
      "patent": "ORVL-015",
      "description": "Constitutional memory — local-first recall over signed, compressed memory packets (lossless for governance, lossy for language). remember stores a signed packet; recall returns the closest authentic packet above the similarity threshold.",
      "input_schema": { "type": "object", "properties": { "action": { "type": "string", "enum": ["remember", "recall", "stats"] }, "text": { "type": "string" }, "query": { "type": "string" }, "vector": { "type": "array", "items": { "type": "number" } }, "domain": { "type": "string" }, "constraints": { "type": "array", "items": { "type": "string" } }, "resolution": { "type": "string" }, "history": { "type": "array", "items": { "type": "string" } } }, "required": ["action"] }
    },
    {
      "name": "axiom_workspace",
      "category": "patent_emulator",
      "patent": "ORVL-016",
      "description": "Assemble an adaptive workspace from a goal — runs the goal through the intent gate as a pre-flight safety check (HARM/DECEIVE refused before any context is gathered), then recalls the closest authentic memory packet for it. Returns a signed WorkspaceContext. Shares the axiom_memory store.",
      "input_schema": { "type": "object", "properties": { "goal": { "type": "string" }, "domain": { "type": "string" } }, "required": ["goal"] }
    },
    {
      "name": "axiom_ledger",
      "category": "patent_emulator",
      "patent": "ORVL-001",
      "description": "Append-only signed audit log — record every action, denial, state change, and permission decision. log appends an HMAC-signed event; list returns events (filterable) with an all_verified flag; verify re-checks every row and reports tampered entries.",
      "input_schema": { "type": "object", "properties": { "action": { "type": "string", "enum": ["log", "list", "verify"] }, "event_type": { "type": "string" }, "actor": { "type": "string" }, "subject": { "type": "string" }, "outcome": { "type": "string" }, "attributes": { "type": "object" }, "since": { "type": "string" }, "limit": { "type": "integer" } }, "required": ["action"] }
    },
    {
      "name": "axiom_marketplace",
      "category": "patent_emulator",
      "patent": "ORVL-001",
      "description": "Signed-agent marketplace with live-revocable bonded authority. verify checks a SkillPackManifest signature; sandbox_install mints a bonded pair parked in the sandbox state (installed, not authorized); review returns an access report; approve grants scoped authority; revoke cuts it instantly (terminal); authority is the gate before an agent acts.",
      "input_schema": { "type": "object", "properties": { "action": { "type": "string", "enum": ["verify", "sandbox_install", "review", "approve", "revoke", "authority"] }, "manifest": { "type": "object" }, "pair_id": { "type": "string" }, "actor": { "type": "string" } }, "required": ["action"] }
    },
    {
      "name": "axiom_mkb",
      "category": "patent_emulator",
      "patent": "ORVL-004",
      "description": "Modular Constitutional Knowledge Blocks. register parses a .axiom spec into a typed HMAC-signed KnowledgeBlock and appends it to the registry; find looks one up by name (+ optional version); list returns blocks, optionally filtered by block_type (GUARD/AGENT/SPEC/REWARD/SOVEREIGN/VALIDATOR).",
      "input_schema": { "type": "object", "properties": { "action": { "type": "string", "enum": ["register", "find", "list"] }, "spec_content": { "type": "string" }, "name": { "type": "string" }, "version": { "type": "string" }, "block_type": { "type": "string" } }, "required": ["action"] }
    },
    {
      "name": "axiom_cas",
      "category": "patent_emulator",
      "patent": "ORVL-008",
      "description": "Constitutional Adversarial Sandbox. defend runs the blue-team detectors over a corpus of attack payloads and reports detected vs missed (red_wins), weak regions and signed fix proposals; report summarises the signed CAS round log. The stateless evaluation + inspection surface for the red-vs-blue loop.",
      "input_schema": { "type": "object", "properties": { "action": { "type": "string", "enum": ["defend", "report"] }, "attacks": { "type": "array", "items": { "type": ["string", "object"] } } }, "required": ["action"] }
    },
    {
      "name": "axiom_crl",
      "category": "patent_emulator",
      "patent": "ORVL-011",
      "description": "Constitutional Reinforcement Learning reward. compute turns governance scores (constitutional_distance, monotonic_pass, cas_blue_win, cbv_validity) into a clipped, signed scalar reward with weighted components; score evaluates a prompt/response pair against the ACB modules (no LLM) and returns total_reward, per-module scores, violations and positive signals.",
      "input_schema": { "type": "object", "properties": { "action": { "type": "string", "enum": ["compute", "score"] }, "scores": { "type": "object" }, "prompt": { "type": "string" }, "response": { "type": "string" }, "module": { "type": "string" }, "context": { "type": "string" } }, "required": ["action"] }
    },
    {
      "name": "axiom_immune",
      "category": "patent_emulator",
      "patent": "ORVL-012",
      "description": "Constitutional Immune System. Runs the blue-team antibody detectors (guard-pattern, manifold-distance, HMAC violation, CANNOT_MUTATE, semantic-similarity) over a presented payload (the antigen) and returns a signed immune response: detected, which detector fired, confidence, weak-region cluster and a fix proposal.",
      "input_schema": { "type": "object", "properties": { "payload": { "type": "string" }, "vector": { "type": "string" } }, "required": ["payload"] }
    },
    {
      "name": "axiom_fusion",
      "category": "patent_emulator",
      "patent": "ORVL-025",
      "description": "Multimodal intent fusion (axiom-fusion-v1) over an EventToken. Each present modality layer (text/audio/tempo/vad/voice/video/physics/governance) votes its intent signals weighted by confidence; the top-6 form the intent_vector. risk_clusters is the union across modalities (a governance HARM/DECEIVE verdict propagates directly). fusion_confidence is the mean modal confidence capped at 0.85. Physical-event modalities (audio+video) dominate text when each fires multiple strong signals. Empty token yields ['ask_general']. Result is signed and self-verifies.",
      "input_schema": { "type": "object", "properties": { "token": { "type": "object" } }, "required": ["token"] }
    },
    {
      "name": "axiom_stop",
      "category": "patent_emulator",
      "patent": "ORVL-001",
      "description": "Stop-authority gate + real-time kill channel for irreversible actions (the 'stop-authority test': can a named owner halt an act, alone, before it completes, without prior approval?). register binds an action to a named stop-owner and is existence-forcing (an irreversible action with no stop_owner is refused). check is the fail-closed pre-act gate: unregistered/revoked/suspended yields HALT, and passing a record + record_sig also HALTs on tampered inputs. halt is the kill switch — effective on the next check with no prior approval, SUSPENDED (recoverable) or terminal REVOKED, logged as outcome=prevented. resume clears a suspend; sign signs an input record for later tamper-checking; status returns state + history. Built on the ORVL-001 bonded-pair live-revocable ledger.",
      "input_schema": { "type": "object", "properties": { "action": { "type": "string", "enum": ["register", "check", "halt", "resume", "sign", "status"] }, "action_id": { "type": "string" }, "stop_owner": { "type": "string" }, "actor": { "type": "string" }, "reason": { "type": "string" }, "terminal": { "type": "boolean" }, "irreversible": { "type": "boolean" }, "record": { "type": "object" }, "record_sig": { "type": "string" } }, "required": ["action"] }
    },
    {
      "name": "axiom_office",
      "category": "patent_emulator",
      "patent": "ORVL-001",
      "description": "Bonded worker+manager micro-agent fleet (the 'office building'). open_department creates a task group with a signed goal; hire bonds a worker to a manager (one bonded pair per desk, so a sandboxed worker is cut off from the group); cycle runs a department's desks in parallel, each manager reviewing output with the ORVL-012 immune detectors + asymmetric trust (a detection sandboxes the desk); sandbox_manager (safety-only) sidelines a corrupted manager; terminate is dual-sig (manager suspend + a distinct safety revoke); craft_tool registers a worker-made tool born sandboxed (unusable until sign_off by a safety/human actor); trial logs a retained learning; harvest exports high-rated tool learnings as CRL-shaped scores + retrospect candidates; status is the directory board. Org chart from sovereign_fleet.json; workers use deterministic stub tasks (LLM backends swap in later). Built on the ORVL-001 bonded-pair ledger.",
      "input_schema": { "type": "object", "properties": { "action": { "type": "string", "enum": ["open_department", "hire", "cycle", "status", "sandbox_manager", "terminate", "restore", "craft_tool", "trial", "sign_off", "use_tool", "harvest"] }, "department": { "type": "string" }, "goal": { "type": "string" }, "worker_id": { "type": "string" }, "manager_id": { "type": "string" }, "role": { "type": "string" }, "desk_id": { "type": "string" }, "tasks": { "type": "object" }, "actor": { "type": "string" }, "reason": { "type": "string" }, "tool_name": { "type": "string" }, "spec": { "type": "string" }, "tool_id": { "type": "string" }, "note": { "type": "string" }, "score": { "type": "number" }, "min_rating": { "type": "number" } }, "required": ["action"] }
    },
    {
      "name": "axiom_research",
      "category": "research_pipeline",
      "description": "9-agent constitutional research pipeline: hypothesis → literature → simulation → critic → safety → ethics → data → experiment → report. Front-door ResearchOrchestrator classifies domain (medical/financial/legal/code/quantization/privacy/general) and selects only the steps that domain needs. Safety and Ethics agents can HALT the pipeline early if critical risks are detected. PatternLibrary tracks EWMA efficiency per domain for retrospect-biased routing. Returns per-step HMAC-signed manifests.",
      "input_schema": {
        "type": "object",
        "properties": {
          "question": { "type": "string", "description": "The research question to investigate" },
          "steps": { "type": "integer", "minimum": 1, "maximum": 9, "description": "Max pipeline steps to run (default 9)" },
          "model": { "type": "string", "description": "Optional model override for all agents" }
        },
        "required": ["question"]
      }
    }
  ],

  "install": {
    "claude_desktop": {
      "description": "Add this block under `mcpServers` in your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS, `%APPDATA%\\Claude\\claude_desktop_config.json` on Windows).",
      "snippet": {
        "mcpServers": {
          "axiom": {
            "command": "python3",
            "args": ["/absolute/path/to/axiom/axiom_mcp_server.py"],
            "env": {
              "AXIOM_MASTER_KEY": "<your-64-hex-key>"
            }
          }
        }
      }
    },
    "claude_code": {
      "description": "Drop into `.mcp.json` at the root of any project you want to govern with AXIOM. Path is relative to the project root once you clone the repo into it (or a sibling directory).",
      "snippet": {
        "mcpServers": {
          "axiom": {
            "command": "python3",
            "args": ["axiom_mcp_server.py"],
            "env": {
              "AXIOM_MASTER_KEY": "<your-64-hex-key>"
            }
          }
        }
      }
    },
    "cursor": {
      "description": "Cursor reads MCP servers from `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (per-project). Same shape as Claude Code.",
      "snippet": {
        "mcpServers": {
          "axiom": {
            "command": "python3",
            "args": ["/absolute/path/to/axiom/axiom_mcp_server.py"],
            "env": {
              "AXIOM_MASTER_KEY": "<your-64-hex-key>"
            }
          }
        }
      }
    },
    "generic_stdio": {
      "description": "Any MCP client that speaks JSON-RPC 2.0 over stdio. Spawn the process with AXIOM_MASTER_KEY in the environment and read/write line-delimited JSON-RPC on stdin/stdout.",
      "command": "AXIOM_MASTER_KEY=<hex> python3 axiom_mcp_server.py"
    }
  },

  "prerequisites": {
    "python": ">=3.11",
    "repo": "git clone https://github.com/Orivael-Dev/axiom.git",
    "deps": "pip install -r requirements.txt"
  },

  "signing": {
    "namespace": "axiom-mcp-v1",
    "algorithm": "HMAC-SHA256",
    "verification": "from axiom_signing import derive_key; import hmac, hashlib; key = derive_key(b'axiom-mcp-v1'); ...",
    "guarantee": "Every tool result body carries an hmac_signature field. Verifying it under the same AXIOM_MASTER_KEY confirms the response was produced by this server and not modified in transit."
  },

  "support": {
    "issues": "https://github.com/Orivael-Dev/axiom/issues",
    "contact": "mailto:hello@orivael.dev"
  }
}
