joan-mcp reference
Server facts, the three tools with their exact inputs and outputs, the judged formats, and the denial codes. Machine-readable version: joan.json.
Server
| Property | Value |
|---|---|
| Name / version | joan-mcp · 0.1.0 |
| Transport | stdio — JSON-RPC 2.0, newline-delimited (MCP protocol 2024-11-05). No remote/HTTP endpoint exists. |
| Runtime | Node >= 18, zero dependencies |
| Authentication | None — the judge is fully offline; it needs no session, no credential and no network trust |
| Doctrine | D-19: JOAN judges only — it mints nothing, seals nothing, executes nothing, pays nothing |
| Env | JOAN_INTEGRATION_DIR (JOAN-side adapter tree; optional on the house host) · JOAN_INBOX_STORE (persistent inbox store; defaults to a temp-dir file) |
| Verification | 11/11 PASS over a real MCP handshake — one real call per tool against the tree's own fixtures (re-verified 2026-11-27) |
Tools
joan_judge — offline verdict over an evidence package
Runs the JOAN-side judge over a chain evidence package and returns its verdict. Judged formats: MT-BRIDGE-PROOF-1 and MT-ATTESTATION-PROOF-1. The verdict names its components and, for attestations, its predicates and attribution. Any other format returns NOT_VERIFIABLE — JOAN never accepts an artifact on trust. Fully offline: no service, no session.
| Input | Required | Notes |
|---|---|---|
package (object) | yes | The evidence package object (MT-BRIDGE-PROOF-1 or MT-ATTESTATION-PROOF-1). |
anchors (object) | no | Published anchors for attestations: { constitution_fingerprint, genesis_hash, h_m0 }. Without anchors a package can still judge VALID, but its attribution is UNANCHORED. |
Output: verdict (VALID / INVALID / NOT_VERIFIABLE), kind, components, and for attestations predicates — HASH_MATCH, FILE_SIZE, SCHEMA_VALID, TIME_BOUND, MULTI_SIG, each with a proves_only note — plus attribution (ANCHORED / UNANCHORED).
joan_validate_permit — pre-execution permit validation
Validates an MT-POLICY-PERMIT-1 permit against the operation it would authorize, before any execution: closed schema (an unknown field denies), decision must be ALLOW, single_use must be true, the service's ML-DSA-87 signature must verify, the permit must be unexpired, and it must be bound exactly to the expected recipient, provider, currency and amount. Validates only — never consumes the permit, never executes the operation.
| Input | Required | Notes |
|---|---|---|
permit (object) | yes | The MT-POLICY-PERMIT-1 permit, including service_signature. |
expected (object) | yes | { recipient, provider, currency (ISO), amount_minor (decimal string) }. |
service_public_key_b64 (string) | yes | Base64 SPKI of the issuing service's ML-DSA-87 public key. |
Output: { valid: true, consumed: false } or { valid: false, code }. Denial codes include MT_BUDGET_EXCEEDED (amount above the permit), MT_CAPABILITY_DENIED (binding mismatch), AGENT_SIGNATURE_INVALID.
joan_receive_delivery — signed event intake, exactly once
Receives an MT-WEBHOOK-DELIVERY-1 delivery the way a JOAN-side agent does: the ML-DSA-87 signature over the exact body bytes is verified first (an invalid signature means the event does not exist). Event identity is (event_seq, event_hash), not the delivery id: each event is applied exactly once, replays return DUPLICATE, and the applied set persists across restarts. Receiving never executes anything.
| Input | Required | Notes |
|---|---|---|
body_text (string) | yes | The exact raw body bytes as a UTF-8 string. Any re-serialization breaks the signature. |
signature_b64 (string) | yes | Base64 ML-DSA-87 signature over body_text. |
public_key_b64 (string) | yes | Base64 SPKI of the delivering service's ML-DSA-87 webhook public key. |
Output: status (APPLIED / DUPLICATE / INVALID — a forged signature returns INVALID with MT_EVENT_SIGNATURE_INVALID) plus the running counters applied_total, duplicates_total, invalid_total.
Judged formats
| Format | What it is | Judge |
|---|---|---|
MT-ATTESTATION-PROOF-1 | Enterprise attestation package: evidence manifest, signatures, certified checkpoint | Full: verdict + 28 components + 5 predicates + attribution |
MT-BRIDGE-PROOF-1 | Bridge proof package: lock proof and burn proof for a foreign-chain crossing | Full: verdict + 11 components |
MT-POLICY-PERMIT-1 | Policy permit binding one operation (recipient, provider, currency, exact amount, single use, expiry), signed by the enterprise service | Permit gate (see joan_validate_permit) |
MT-WEBHOOK-DELIVERY-1 | Signed event delivery from the enterprise service | Inbox (see joan_receive_delivery) |
Any other format: NOT_VERIFIABLE, with the reason named. There is no "probably fine".
Canonicalization — three different things, never conflated
- joan-canonical (JOAN's own): strict canonical JSON values with domain-separated SHA-256 digests. This is how JOAN digests its own objects.
- RFC 8785 JCS (the chain's): used for shared envelopes at the JOAN↔chain frontier, because a signature is only meaningful if both sides verify the same bytes. Parity at this frontier is proven with cross vectors before any signature is judged.
- MT-DUAL-1024: the chain's dual-hash constitution fingerprint construction. It is not a canonicalization and not JOAN's.
Deliberately not exposed
- JOAN language source parsing / checking / compilation — Rust crates in the JOAN repository (public alpha, pre-1.0); not present on this host. A tool that claimed to parse JOAN source without running them would be a fake, so there is none.
- JOAN's own canonical hash — same reason:
joan-canonicalis a Rust crate. This server does not substitute the chain's JCS or MT-DUAL-1024 and call it JOAN's. - Case execution — submitting operations to the enterprise API is the caller's own authenticated act, not a judging act. JOAN's side of a case is the permit gate, the inbox and the judge.
When the Rust judge (joan-mt-verify) is applied in the JOAN repository — an owner-gated step — the same three tools can bind to it; a zero-divergence parity battery against the adapter's judgments is the acceptance bar.