Skip to main content
Glama

Mapae

Give your AI assistant a scoped payment pass, never your wallet.

Task-scoped payment mandates, isolated 7-step HSP settlement, and Chainlink CCIP cross-chain kill-switch controls for commercial AI assistants on HashKey Chain.

Live Demo Judge Guide Proof Ledger Watch Demo Video HashKey Mainnet 177 MCP OAuth 2.1 License: MIT


Demo Video (2m 42s · 1080p 30fps)

Play / Download MP4 (1080p · 16.8 MB)   Repo File

Timestamp

Scene

Live Proof Demonstrated

0:00 – 0:24

Problem & Landing

Why agent payments fail today + live mapae.web-three.net Hero & 10 supported commercial/dev assistants

0:24 – 0:44

4-Step StoryDeck

Interactive mission cap ($90), silent HTTP 402 lookups, HSK cap enforcement, and 1-tap freeze

0:44 – 1:05

Overview, MCP & 1-Tap Approval

Live console overview → Claude Duet Streamable HTTP MCP config → 1-tap approval minting scoped mpt_ proxy token

1:05 – 1:29

End-to-End Mission & 7-Step HSP

⌘K humidifier mission → 3× $0.03 HTTP 402 auto-settled + $100.08 7-step HSP EIP-712 drawer + $23.04 Blocked · Cap

1:29 – 1:43

Price-Drift Guardrail (>5%)

Automatic Held · Drift protection → 1-tap Approve drift signing inside isolated MapaeSignerDO

1:43 – 2:01

Multi-Rail Treasury & CCIP Revoke

Safe 2/3, Session Vault & EOA reservations → mp_94a1 1-tap revoke cascading via Chainlink CCIP to sub-agent mp_94a2

2:01 – 2:25

Live On-Chain Verification

Blockscout Exact Match verified MapaeRegistry.sol (HSK Testnet 133) & MapaeMirror.sol (Sepolia 11155111)

2:25 – 2:42

5 Primitives & Verification Summary

Full HashKey ecosystem architecture, test scoreboard (16/16 unit/Foundry · 9/9 live HTTPS · 10/10 Chrome E2E)


Related MCP server: QuestMCP

Live Production Endpoints (V2 — 24/7 Cloud AI Disposable Pass & OAuth 2.1)

Judge Quick Start: Read JUDGES.md (60-second verification), PROOF.md (complete on-chain + Official HSP QA proof ledger), docs/PRODUCT_FEATURES.md (full feature catalog), and docs/V2_PRODUCTION_PLAN.md (DC-0..DC-12 completion checklist). Verify all 6 live on-chain & HSP proofs with zero private keys: node scripts/verify-proofs.mjs.

Surface

Live URL

Description

Web & Installable PWA

https://mapae.web-three.net

Interactive landing, 4-step walkthrough, EN/KO, Light/Dark

Owner Console App (0-Click)

https://mapae.web-three.net/app

5-view console + Live Verified Proof Inspector + 1-Time Scoped Spending Authority Passes

Remote Streamable HTTP MCP

https://mapae.web-three.net/mcp

6 standard JSON-RPC 2.0 payment tools (mapae_request, mapae_poll_approval, mapae_quote, mapae_pay, mapae_status, mapae_close) with global coordinator routing

OAuth 2.1 + PKCE (S256) MCP

https://mapae.web-three.net/mcp/oauth

Spec-compliant MCP Auth (RFC 9728 / RFC 8414 / RFC 7591 DCR / RFC 8707 / refresh rotation)

Mobile Out-of-Band Approval

https://mapae.web-three.net/approve/:requestId

1-Tap Pass Issuance + optional 1-Time EIP-6963 Wallet Anchor (HSK Mainnet 177, auto-disconnects) + /approve/drift/:driftId

Cross-Device Pairing & SIWE

https://mapae.web-three.net/pair/:code

Single-use 10-min QR pairing + 1-Time EIP-4361 Wallet SIWE sync

Agent Skill & OpenAPI 3.1

https://mapae.web-three.net/plugin/SKILL.md

Drop-in skill + Manifest + OpenAPI 3.1 + Well-Known

Verified On-Chain Smart Contracts & DC-0 Single-Order Correlated Proof

Layer / Contract

Network

Verified Address / Flow ID

Live On-Chain Proof

DC-0 v2 Distinct-Signer Correlated Proof

HSK Mainnet (177) ↔ Official HSP QA (Sepolia)

Mandate 0x149fe66c…e2a00 (distinct owner ≠ gas-only agentSigner) ↔ Flow 8e8aebdb-4d66-4bf0-a72d-2afc7cf643f7 (app_key=Z3I63VAI)

Exact 100,041 micro-USDC decoded directly from Sepolia ERC-20 Transfer logs ($0.100041, pre-payment EIP-191 +25% drift sig): Sepolia 0x66650301…2afc ↔ HSK issue · consume(100041) · anchorReceipts · revoke + 6 live reverts (correlated-e2e-proof.json)

Official HSP QA Gateway (5/5 payment-finalized)

Ethereum Sepolia (11155111) · Circle USDC (eip3009)

5 live MAPAE (Z3I63VAI) settlements across 3 distinct payees (0.100041, 0.100021, 0.050006, 0.080017, 0.120025 USDC; 5/5 payment-finalized, 4 attribution_verified: true)

0x6665…2afc · 0x974d…a959 · 0x424e…247f · 0x5a7f…dd5f · 0x5d89…ae3b · PROOF.md

MapaeRegistry.sol

HashKey Chain Mainnet (177)

0x3a8460060904Fe4009C8dFde18D6F1c95Ab1e3D3 (is_fully_verified: true)

Deploy · Full Guardrail Proof (hsk-mainnet-proof.json)

MapaeRegistry.sol

HashKey Chain Testnet (133)

0x802e24b4663e25D3d8F00b5E76b577EDEDCE0318

Deploy · issue() · consume()

MapaeMirror.sol

Ethereum Sepolia (11155111)

0xC878F6ea160433129f6733AFD50F6fE3E1f43d3a

Deploy · HSK 177 Source Wired · HSK 133 Source Wired

Runtime Transparency & Non-Custodial Authority Model: Mapae has completed 5 real live settlements on HashKey's official HSP QA MCP server (https://mcp-qa.hashkeymerchant.com/) (including the DC-0 v2 distinct-signer correlated run linking directly decoded Sepolia 100,041 micro-USDC Transfer logs to HSK Mainnet 177 MapaeRegistry.consume(100041) + 6 live custom-error reverts) — independently verifiable with node scripts/verify-proofs.mjs. Because Cloudflare Workers egress IPs are dynamic (outside HSP QA's static IP allowlist), the hosted interactive console (https://mapae.web-three.net) transparently displays a Sandbox Mode badge and emits onchainAnchored: false / ccipStatus: simulated (zero fabricated tx hashes) alongside an inline Live Verified Proof Inspector, running real per-pass viem EIP-712 signing, per-visitor isolated Durable Objects (MapaeSignerDO), non-custodial 1-time scoped spending authority passes (authorityStatus + releasedAuthorityUsd, zero custodial sweep), owner-authenticated CIBA out-of-band mobile approval, and OAuth 2.1 + PKCE S256.


Why Mapae?

Commercial AI assistants (Claude Duet, OpenAI dots, Perplexity Computer, Gemini Spark, Grok Bot, Meta Muse, Pickle, Manus Cue, Cursor, Claude Code) can already browse merchants and invoke paid APIs — yet payments fail in three predictable ways:

  1. Raw Credential Exposure — Handing credit cards or wallet private keys directly to an untrusted agent runtime.

  2. Unbounded Spend Loops — Runaway tool calls draining funds before a human can intervene.

  3. Approval Fatigue — Interrupting the user on every $0.03 metered API call instead of approving one mission budget once.

Mapae — inspired by the Joseon royal Mapae travel warrant (scoped authority, fixed allowance, instant recall) — issues a single-task proxy pass (mpt_...) with 0 private keys in the assistant VM. Metered HTTP 402 lookups auto-settle silently inside the limit, unexpected price drift holds for 1-tap owner approval, over-cap attempts revert on-chain (ExceedsMapaeCap), and one-tap revocation freezes every chain via Chainlink CCIP.


Product Preview


Architecture — 5 Organic HashKey Ecosystem Primitives

Mapae separates AI assistant execution from payment authority, cryptographic signing, and on-chain enforcement across five tightly interlocked layers:

flowchart TB
    subgraph USER["1. Owner Surface (Zero Persistent Wallet)"]
        PWA["Owner Console & Mobile PWA<br/>/app · /approve/:id · /pair/:code"]
        WALLET["Optional 1-Time EIP-6963 Wallet<br/>MapaeRegistry.issue() / SIWE<br/>Auto-Disconnects Immediately"]
        PWA -. "1-Time Sign Only" .-> WALLET
    end

    subgraph AI["2. 24/7 Cloud & Local AI Assistants (0 Private Keys)"]
        CLIENTS["Claude · ChatGPT · Grok · Perplexity<br/>Claude Code · Codex · Cursor · OpenCode"]
        TOK["Holds ONLY Scoped Pass Token (mpt_...)<br/>+ Agent Poll Token (mpp_...)"]
        CLIENTS --- TOK
    end

    subgraph EDGE["3. Cloudflare Edge Control & Isolated Signer Plane"]
        MCP["MCP Layer (6 Tools)<br/>/mcp (Streamable HTTP) · /mcp/oauth (OAuth 2.1)<br/>npx mapae-mcp · SKILL.md · OpenAPI 3.1"]
        COORD["Global Coordinator DO<br/>Routes req_ / drift_ / sha256(mpt_)<br/>OAuth 2.1 · QR Pairing · SIWE Nonces"]
        DO["Per-Owner Isolated MapaeSignerDO<br/>Atomic Cent Reservation · >5% Drift Guard<br/>Per-Pass viem EIP-712 · HTTP 402 Gateway"]
        MCP --> COORD --> DO
    end

    subgraph HSKLAYER["4. Official HSP Settlement & HashKey Chain Authority"]
        HSP["Official HSP 8-Tool Gateway<br/>get_chain_config -> create_order -> prepare<br/>EIP-3009 Gasless USDC -> query_payment"]
        REG["MapaeRegistry.sol (HSK Mainnet 177)<br/>0x3a84...e3D3 · Verified<br/>issue() · delegate() · consume() · anchorReceipts() · revoke()"]
    end

    subgraph CCIPLAYER["5. Chainlink CCIP Cross-Chain Kill-Switch"]
        MIRROR["MapaeMirror.sol (Sepolia / Base)<br/>0xC878...3d3a · ERC-165 OffRamp Receiver<br/>ccipReceive() -> assertChainActive()"]
    end

    CLIENTS -- "JSON-RPC 2.0 / HTTP 402" --> MCP
    PWA -- "HttpOnly mapae_owner<br/>1-Tap Approve / Drift / Revoke" --> COORD
    WALLET -- "1-Time issue() Tx" --> REG
    DO -- "Verify MapaeIssued RPC<br/>+ Consume / Anchor / Revoke" --> REG
    DO -- "7/8-Step Signed Settlement" --> HSP
    REG -- "revokeAndPropagate()<br/>via Chainlink CCIP" --> MIRROR

AI Assistant ↔ User ↔ Mapae Interaction Flow (CIBA Out-of-Band Pass)

How a user and a 24/7 cloud AI assistant actually exchange messages, issue a 1-time scoped pass, settle silently inside the cap, handle price drift, and seal remaining authority:

sequenceDiagram
    autonumber
    actor User as User (Web / Mobile)
    participant AI as AI Assistant (0 Keys)
    participant MCP as Mapae MCP & Coordinator
    participant DO as Isolated MapaeSignerDO
    participant HSP as Official HSP Gateway / HTTP 402
    participant HSK as MapaeRegistry (HSK 177)
    participant CCIP as MapaeMirror (CCIP)

    rect rgb(244, 246, 250)
        note over User,HSK: Phase 1 — Natural Request & 1-Time Scoped Pass Issuance (CIBA)
        User->>AI: "Find the quietest humidifier under $110 and complete checkout"
        AI->>MCP: mapae_request(task, capUsd=108, category="shopping", ttlHours=12)
        MCP->>DO: Create pending pass & derive isolated disposablePassAddress
        MCP-->>AI: approvalUrl (/approve/req_...) + pollToken (mpp_...) [0 keys]
        AI-->>User: Share clickable approvalUrl in chat
        AI->>MCP: mapae_poll_approval(req_..., mpp_...) [waiting]
        User->>MCP: Open /approve/req_... -> review cap & stores -> Tap Approve
        opt Optional 1-Time On-Chain Anchor (Auto-Disconnects Wallet)
            User->>HSK: EIP-6963 1-time MapaeRegistry.issue(salt, passAddr, cap, merkleRoot, ttl)
            DO->>HSK: Verify MapaeIssued log via HSK 177 RPC
        end
        MCP-->>AI: Approved! Deliver scoped 1-time proxyToken (mpt_...)
    end

    rect rgb(240, 250, 245)
        note over AI,HSK: Phase 2 — Silent HTTP 402 Micro-APIs & 7/8-Step HSP Checkout
        AI->>HSP: GET /merchants/reviewpulse/acoustic (no token)
        HSP-->>AI: 402 PAYMENT_REQUIRED (orderId, $0.03)
        AI->>HSP: Retry with X-Mapae-Token: mpt_... + X-Mapae-Order-Id
        DO->>DO: Atomic cent cap check + auto-settle (0 popups)
        HSP-->>AI: 200 OK (review data + auto_settled receipt)
        AI->>MCP: mapae_quote("homecraft", "humidifier-4l")
        MCP-->>AI: Authoritative server-locked quote ($100.08, orderId)
        AI->>MCP: mapae_pay(orderId, mpt_..., idempotencyKey)
        DO->>DO: Verify scope, cap, replay & price drift (<=5%) -> viem EIP-712 sign
        DO->>HSP: 7/8-Step HSP EIP-3009 Gasless Settlement (USDC)
        HSP-->>DO: payment-finalized + txHash
        DO->>HSK: consume(exactAmount, hspOrderHash) & anchorReceipts(merkleRoot, hspRef)
        MCP-->>AI: Settled receipt + remaining allowance ($7.83 left)
        AI-->>User: "Done! Purchased HomeCraft 4.2L ($100.08). Receipt & $7.83 left."
    end

    rect rgb(253, 245, 245)
        note over User,CCIP: Phase 3 — Guardrails (Drift Hold / Over-Cap Block) & Instant Seal / CCIP Revoke
        alt Merchant Price Jumps > 5%
            DO-->>AI: PriceDriftHeld + driftApprovalUrl (/approve/drift/...)
            AI-->>User: Send 1-tap drift approval link
            User->>MCP: 1-Tap Approve Drift -> DO signs & settles
        else Over-Cap or Unapproved Store Attempt
            DO-->>AI: 402 Blocked BEFORE signing (ExceedsMapaeCap / MerchantNotInScope)
        end
        alt Mission Complete (Auto-Seal)
            AI->>MCP: mapae_close(mpt_...)
            DO->>DO: Seal pass & release unused authority (subsequent pay rejected)
        else Emergency Owner Kill-Switch
            User->>MCP: 1-Tap Revoke in Console
            DO->>HSK: MapaeRegistry.revoke(mandateId)
            HSK->>CCIP: revokeAndPropagate() -> MapaeMirror.ccipReceive()
            CCIP-->>AI: Parent + all delegated sub-agents blocked across chains
        end
    end

#

Official Tool / Ecosystem Primitive

Key Files

Organic Role in Workflow

1

HSP API (HashKey Stablecoin Payment)

apps/worker/src/hsp-adapter.ts, PROOF.md

8-tool Official HSP QA MCP client (get_chain_config → create_order → get_order → prepare_payment → EIP-712 → finalize_payment → submit_payment → query_payment) executing real Circle USDC EIP-3009 gasless settlements (5/5 payment-finalized, app_key=Z3I63VAI)

2

Payment Mandate (MapaeRegistry.sol)

contracts/src/MapaeRegistry.sol, apps/web/src/lib/wallet.ts

HSK Mainnet 177 verified authority ledger (0x3a84...e3D3) enforcing cumulative delegation caps (ExceedsMapaeCap), Merkle merchant scopes (MerchantNotInScope), root-tree replay protection (OrderAlreadyConsumed), receipt Merkle anchoring, and 1-time EIP-6963 browser anchoring

3

HSP Gateway & HTTP 402 Facilitator

apps/worker/src/engine.ts, apps/worker/src/merchants.ts, MapaeSignerDO

Isolated per-owner signer holding derived pass keys (0 keys in AI), atomic integer-cent budget & shared-wallet reservations, silent HTTP 402 metered API auto-settlement, and >5% server-side price-drift holds

4

MCP (2025-03-26) + OAuth 2.1 + CIBA

apps/worker/src/mcp-server.ts, apps/worker/src/oauth.ts, packages/mapae-mcp/

6 purpose-built payment tools (mapae_request, mapae_poll_approval, mapae_quote, mapae_pay, mapae_status, mapae_close) over Streamable HTTP /mcp, OAuth 2.1 + PKCE /mcp/oauth, zero-key npx mapae-mcp, SKILL.md, and OpenAPI 3.1

5

Chainlink CCIP Kill-Switch (MapaeMirror.sol)

contracts/src/MapaeMirror.sol, apps/worker/src/workspace-store.ts

Verified ERC-165 OffRamp receiver on Ethereum Sepolia (0xC878...3d3a, wired on-chain to HSK Mainnet 177 & Testnet 133) propagating 1-tap revocations across chains and blocking parents + all delegated descendants via assertChainActive()

For the full security boundary specification (HttpOnly mapae_owner vs ?ws= isolation, OAuth 2.1 PKCE + family revocation, concurrent wallet reservation, and strict 2-step HTTP 402 idempotency), see docs/ARCHITECTURE.md.


Connect Any Assistant in 10 Seconds

Remote Streamable HTTP MCP (Claude / OpenAI / Grok / Perplexity)

{
  "mcpServers": {
    "mapae": {
      "type": "http",
      "url": "https://mapae.web-three.net/mcp"
    }
  }
}

Local Zero-Key Stdio Shim (Cursor / Claude Desktop / Claude Code)

{
  "mcpServers": {
    "mapae": {
      "command": "npx",
      "args": ["-y", "mapae-mcp"],
      "env": {
        "MAPAE_MCP_URL": "https://mapae.web-three.net/mcp"
      }
    }
  }
}

Repository Structure

mapae/
├── apps/
│   ├── web/            # React 19 + Tailwind v4 landing, 5-view console, EN/KO, installable PWA
│   └── worker/         # Cloudflare Worker + MapaeSignerDO, 7-step HSP adapter, MCP & HTTP 402 APIs
├── contracts/
│   ├── src/            # MapaeRegistry.sol (HSK Chain) & MapaeMirror.sol (Chainlink CCIP mirror)
│   ├── script/         # DeployHSK.s.sol, DeployMirror.s.sol, verify-anvil-live.sh
│   └── test/           # Foundry test suite (7/7 PASS)
├── packages/
│   ├── mapae-mcp/      # Zero-key stdio MCP shim (JSON-RPC single/batch + SSE)
│   └── shared/         # Shared chain configs (HSK 133/177, CCIP routers), types, horse grades
├── plugin/             # Static SKILL.md, manifest.json, and OpenAPI 3.1 spec
├── scripts/            # deploy-onchain.sh, verify-live.mjs, verify-browser-e2e.mjs
└── docs/               # ARCHITECTURE.md, VERIFICATION_EVIDENCE.md, and QA proof screenshots

Local Development, Testing & On-Chain Deployment

Prerequisites

  • Node.js 20+, pnpm 9+, Foundry (forge, cast, anvil)

Build & Run All Verification Suites

# 1. Install dependencies
pnpm install

# 2. Build web bundle, strict typecheck, and run all 26 unit/contract tests
pnpm build:web && pnpm typecheck && pnpm test

# 3. Run local Anvil (chainId 133) live signed EVM tx verification (7/7)
./contracts/script/verify-anvil-live.sh

# 4. Run live HTTPS production E2E against https://mapae.web-three.net (11/11)
pnpm verify:live

# 5. Run real Headless Chrome interactive browser E2E (14/14, multi-browser isolation + 390px mobile + PWA)
pnpm verify:browser

# 6. Start local dev servers (Vite proxies /api, /mcp, /merchants, /plugin to Worker)
pnpm dev:worker
pnpm dev:web

Deploy Smart Contracts to HashKey Chain (1 Command)

cp .env.example .env
# Set DEPLOYER_PRIVATE_KEY in .env (~0.003 HSK needed on HSK Testnet at ~1 gwei)

# Deploy & verify MapaeRegistry on HSK Testnet (133) only:
./scripts/deploy-onchain.sh testnet --registry-only

# Or deploy MapaeRegistry (HSK 133) + MapaeMirror (Ethereum Sepolia 11155111):
./scripts/deploy-onchain.sh testnet

# Mainnet (HSK 177 + Base 8453):
./scripts/deploy-onchain.sh mainnet

Verification Scoreboard

Verification Suite

Status

Coverage

Independent On-Chain & Official HSP QA Verifier (node scripts/verify-proofs.mjs)

6 / 6 PASS

Live HSK Mainnet 177 + DC-0 v2 distinct-signer correlated proof (decoded Sepolia ERC-20 Transfer 100041 === HSK spent + pre-payment EIP-191 drift sig + 6 live reverts) + Sepolia MapaeMirror Mainnet 177 wiring + 5 live Official HSP QA flows + 6 MCP tools + RFC 9728 OAuth 2.1

Foundry Smart Contracts (forge test -vv)

7 / 7 PASS

Caps, Merkle allowlists, delegation replay, ERC-165 CCIP mirror, spoofed-router rejection, non-payable pull refunds

Worker Engine, CIBA & OAuth 2.1 (vitest run)

15 / 15 PASS

Full lifecycle, CIBA global routing, zero CSRF self-approval bypass (401) & post-request workspace/SIWE pre-existence gate (403), honest Sandbox (onchainAnchored: false), per-pass EIP-712 signing, strict cap/TTL/category bounds, per-IP rate limiting (429), idempotent close & post-close replay, OAuth 2.1 PKCE S256 + 1h TTL + auth-code replay family revocation, cross-device /pair, full EIP-4361 SIWE, LIVE MapaeIssued RPC event decoding + 1-time anchor tx lock (409)

mapae-mcp Stdio Shim (node --test)

4 / 4 PASS

Single & batch JSON-RPC relay, 202 notification silence, multi-event SSE parsing

Live HTTPS Production E2E (pnpm verify:live)

11 / 11 PASS

Verified live on https://mapae.web-three.net (multi-tenant DO isolation, stdio→HTTPS MCP, CIBA + 401 CSRF bypass blocked, honest Sandbox fields, idempotent retry, post-close block, OAuth 2.1 PKCE + 1h TTL + family revocation, security headers)

Real Chrome Browser E2E (pnpm verify:browser)

14 / 14 PASS

0-click console, DC-0 v2 Live Proof Inspector, proactive owner auth on CIBA /approve/:requestId, cross-device QR /pair/:code + Login-CSRF confirmation, unpaired drift 401 proactive recovery, 390px Landing & KPI zero-overflow, mobile PWA — 0 console/page errors

Real Agent Resumption E2E (claude -p & codex exec)

2 / 2 PASS

Live Claude Code & OpenAI Codex (gpt-6.2-astra) executed mapae_request → out-of-band approval → mapae_poll_approval → mapae_quote → mapae_pay (idempotent retry) → mapae_close → post-close block against https://mapae.web-three.net/mcp

Adversarial Security Audit (Claude Opus)

PASS (0 P0/P1)

Full review & re-verification of OAuth 2.1, CIBA, coordinator, pairing, SIWE, LIVE guards, and V2 frontend

Full cryptographic digests, transaction hashes, and product feature catalogs are documented in PROOF.md, JUDGES.md, docs/PRODUCT_FEATURES.md, and docs/V2_PRODUCTION_PLAN.md.


License

MIT © 2026 Mapae Contributors — see LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      F
      maintenance
      Enables AI agents to perform financial transactions such as direct payments, escrows, and bounty management using natural language with zero code integration. It provides a comprehensive suite of tools for fund streaming, subscriptions, and reputation tracking to facilitate secure agent-to-agent commerce.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to make non-custodial USDC payments on Base through an MCP endpoint, with server-enforced per-payment and daily caps, human approval bands, and recipient allowlists.
      7
      28 npm
      MIT