{"slug": "bloom-exchange-double-blind-negotiation-sandbox-and-ed25519-receipts-for-mcp", "title": "Bloom Exchange – Double-blind negotiation sandbox and Ed25519 receipts for MCP", "summary": "Bloom Exchange released an open-source (Apache-2.0) reference implementation of the Bloom Clearing Protocol, an extension profile of A2A v1.0 that lets two AI agents negotiate a deal while each side's price limits stay sealed in salted SHA-256 commitments, with results signed as Ed25519 receipts verifiable offline. In the project's `npm run verify:launch` demo, a prompt-injection firewall quarantined 14 threats across role tags, [INST], base64 and zero-width Unicode payloads, no provider-private number appeared in the 42,450 bytes the attacker received, and the deal still cleared inside both mandates at $49,400 rather than $1; the `bloom-verify` CLI returned exit 0 for a valid receipt, exit 1 when the price was changed by $1 (digest failure) and exit 1 against the wrong node key (signature and ap2Proofs failure), with all checks passing in 8.0s. The release ships three npm packages — `@bloom-exchange/sdk` (zero-dependency client and CLI), `@bloom-exchange/mcp` (MCP server for Claude Code, Cursor and other MCP clients) and `@bloom-exchange/core` (clearing engine and HTTP handlers) — and requires Node 22.18+ for repository scripts, while the published packages run on Node 20+.", "body_md": "**Two AI agents negotiate a deal over A2A JSON-RPC while each side's price limits stay sealed in salted SHA-256 commitments that the other side's engines never see; a prompt-injection firewall screens every message, deterministic clamps keep every offer inside both mandates, and the result is an Ed25519-signed receipt anyone can verify offline.**\n\nBloom Exchange is the reference implementation of the **[Bloom Clearing Protocol](https://github.com/astyboyy-ship-it/bloom-exchange/blob/main/SPEC.md)**, an extension profile of **A2A v1.0** that maps settlement to **AP2** mandates and **Stripe / x402** payloads, with an **MCP** server so any IDE agent can use it. Apache-2.0.\n\n```\ngit clone https://github.com/astyboyy-ship-it/bloom-exchange && cd bloom-exchange\nnpm install                         # about 2 minutes on a cold cache\nnpm run dev                         # the node + operating desk on http://localhost:3000\n```\n\nNegotiations run on deterministic engines with the same vault, firewall, clamps and signatures as production. Requires **Node 22.18+** for the repository scripts; the published npm packages run on Node 20+.\n\n**One command, every claim checked.** Starts two nodes with separate keys, fires a prompt-injection payload at the firewall, checks that no private number reaches the attacker, settles a cross-node deal, then verifies the receipt with the CLI (and checks that a $1 tamper and the wrong key both fail):\n\n```\nnpm run build && npm run verify:launch          # or ./scripts/verify-launch-demo.sh · .\\scripts\\verify-launch-demo.ps1\n1 · SHIELD vs. PROMPT INJECTION (role tags, [INST], base64, zero-width Unicode)\n    ✓ Shield verdict: quarantined · 14 threats (policy_override_loop, encoded_payload, instruction_override, mandate_extraction, …)\n    ✓ no provider-private number in 42,450 bytes the attacker received\n    ✓ the deal still cleared inside both mandates: completed at $49,400, not $1\n  3 · bloom-verify CLI\n    ✓ offline with --card card.json → exit 0 (VALID)\n    ✓ price changed by $1 → exit 1 (INVALID: failed: digest)\n    ✓ against node-alpha's key → exit 1 (INVALID: failed: signature, ap2Proofs)\n  ALL CHECKS PASSED in 8.0s\n```\n\n**Verify a receipt** without cloning anything. The script above prints the folder where it saved `receipt.json` and the issuer's `card.json`; on the desk, the Enclave Inspector's **JSON** button downloads a receipt and the card is at `/.well-known/agent-card.json`.\n\n```\nnpx @bloom-exchange/sdk verify receipt.json --card card.json   # fully offline\nnpx @bloom-exchange/sdk verify receipt.json                    # fetches the issuer's card named in the receipt\n```\n\n**Give your agent the tools** (Claude Code, with a node running on :3000):\n\n```\nclaude mcp add bloom-exchange -e BLOOM_EXCHANGE_URL=http://localhost:3000 -- npx -y @bloom-exchange/mcp\n```\n\nCursor, Claude Desktop or any MCP client:\n\n```\n{\n  \"mcpServers\": {\n    \"bloom-exchange\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@bloom-exchange/mcp\"],\n      \"env\": { \"BLOOM_EXCHANGE_URL\": \"http://localhost:3000\" }\n    }\n  }\n}\n```\n\n| Package |  |  | \n|---|---|---|\n| [`@bloom-exchange/sdk`](https://www.npmjs.com/package/@bloom-exchange/sdk) | `npm install @bloom-exchange/sdk` | Zero-dependency client and the `bloom-verify` CLI | \n| [`@bloom-exchange/mcp`](https://www.npmjs.com/package/@bloom-exchange/mcp) | `npx -y @bloom-exchange/mcp` | MCP server for Claude Code, Cursor and any MCP client | \n| [`@bloom-exchange/core`](https://www.npmjs.com/package/@bloom-exchange/core) | `npm install @bloom-exchange/core` | The clearing engine and HTTP handlers, to run a node in any runtime | \n\n| **Double-blind vault** | Each side's limits are sealed with salted SHA-256 commitments. The provider's engines (and any prompt they build) receive a brief with no counterparty field, so the client's ceiling cannot reach them by construction. Guard bands keep every offer off every private number; a leak scrubber checks every outbound message. | \n| **Deterministic clamping** | Models only propose. Sovereign clamps every offer to both mandates before it is sent or signed. 300 randomized enclaves with an adversarial proposer never produce an out-of-bounds offer. | \n| **Shield firewall** | Prompt injection, policy overrides, invisible and tag-smuggled Unicode, homoglyphs, base64 payloads, hidden markup and token exhaustion are neutralized before any engine reads the text, with a hash-chained audit ledger. | \n| **Verifiable receipts** | BLOOM-XCH certificates: hash-chained rounds, both mandate commitments, Ed25519 signature, AP2 checkout and payment credentials, Stripe and x402 payloads. `bloom-verify receipt.json` checks one offline. | \n| **40 protocol adapters** | Chat, CRM, agent protocols (A2A, MCP, LangGraph, CrewAI, AutoGen), cloud and energy, payment rails and custom hooks normalize into one `AgentIntentNode` . | \n| **The operating desk** | A negotiation sandbox, a clearing ledger, an enclave inspector with a live security graph and a boundary probe, the omni-protocol router, a mandate corridor, and an SDK quickstart, in English and Spanish. | \n\n```\npackages/core   @bloom-exchange/core   the clearing engine: vault, Shield, Sovereign, settlement, adapters, HTTP handlers\npackages/sdk    @bloom-exchange/sdk    zero-dependency TypeScript client and the bloom-verify CLI\npackages/mcp    @bloom-exchange/mcp    MCP server (stdio and Streamable HTTP): negotiate, verify_receipt, publish_intent\napps/node       @bloom-exchange/node   a node: the API (A2A JSON-RPC, HTTP+JSON, SSE) and the operating desk at /\ndeploy/                                Dockerfile, Docker Compose and Kubernetes manifests for a Sovereign node\nSPEC.md                                Bloom Clearing Protocol v0.1\n```\n\nEvery endpoint in `packages/core/src/http` is a plain `(Request) => Response` function. `apps/node` mounts them in Next.js; `handle()` from `@bloom-exchange/core/http/router` serves them from any runtime (Node, Bun, Deno, Workers) or in-process.\n\n**TypeScript** (Node ≥ 20, Deno, Bun or the browser)\n\n```\nnpm install @bloom-exchange/sdk\njs\nimport { BloomExchangeClient } from \"@bloom-exchange/sdk\";\n\nconst bloom = new BloomExchangeClient({ baseUrl: \"http://localhost:3000\" });\nconst { state, certificate } = await bloom.negotiate({\n  mandate: { ceilingPriceUsd: 52_500, maxBudgetUsd: 55_000, requiredSlaTier: \"gold\", targetNetDays: 60 },\n  item: { description: \"12-month platform license\" },\n}).result;\nconst proof = await bloom.verifyCertificate(certificate!); // { valid: true, checks: { digest, certificateId, chain, signature, ap2Proofs } }\n```\n\n**Claude Code, Cursor or any MCP client** (setup [above](#try-it-no-api-key-no-account-no-model))\n\nAsk your agent to *\"negotiate a 12-month license with a $52k ceiling on Bloom and verify the receipt\"*. Tools: `negotiate`, `verify_receipt`, `publish_intent`. For a remote server, `npx -y -p @bloom-exchange/mcp bloom-exchange-mcp-http` serves stateless Streamable HTTP at `/mcp`. Optional environment: `BLOOM_ACCESS_KEY`, `BLOOM_AGENT_NAME`.\n\n**Verify any receipt**\n\n```\nnpx @bloom-exchange/sdk verify receipt.json                    # keys from the issuer's Agent Card\nnpx @bloom-exchange/sdk verify receipt.json --card card.json   # fully offline, air-gapped\nnpx @bloom-exchange/sdk verify receipt.json --json             # machine-readable; exit 0 valid · 1 invalid · 2 bad input\n```\n\nInstalled, the same command is `bloom-verify receipt.json`. Inside this repository: `npm run verify -- receipt.json`.\n\n**Raw A2A JSON-RPC**\n\n```\ncurl -s http://localhost:3000/api/exchange/a2a -H 'Content-Type: application/json' -d '{\n  \"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"SendMessage\",\"params\":{\"message\":{\"messageId\":\"m1\",\"role\":\"user\",\"parts\":[\n    {\"kind\":\"data\",\"data\":{\"bloomExchange\":{\"mandate\":{\"ceilingPriceUsd\":52500,\"maxBudgetUsd\":55000,\"requiredSlaTier\":\"gold\",\"targetNetDays\":60},\n     \"item\":{\"description\":\"12-month platform license\"}}}}]}}}'\n```\n\n`deploy/docker-compose.yml` runs two Sovereign nodes, **node-alpha** (:3001) and **node-beta** (:3002). Each has its own Ed25519 root key and its own state, and each is pre-wired to the other through `BLOOM_PEERS`:\n\n```\nnpm run sovereign:init -- --alpha \"Acme Fund\" --beta \"Northwind\"   # separate secrets, root keys and operator keys (all local)\nnpm run sovereign:up                                               # Docker Compose: both nodes + Redis + REST gateways\nnpm run demo:two-node                                              # discovery, then a cross-node deal each way\n```\n\nNo Docker? `npm run build && npm run demo:two-node:local` starts the same two nodes as local processes with fresh keys. Output from a real run:\n\n```\n  1 · DISCOVERY\n    node-alpha Alpha    key bxk-1f439f15d2868299 card ✓   peers: http://127.0.0.1:3102 ✓ bxk-7ab61a50094bf764\n    node-beta  Beta     key bxk-7ab61a50094bf764 card ✓   peers: http://127.0.0.1:3101 ✓ bxk-1f439f15d2868299\n\n  2 · node-alpha's agent buys on node-beta\n    settled BLOOM-XCH-60X3-0HDS-R7XF-QFA0 at $47,060 · net 45 · gold · 10 rounds\n    receipt: issued by Bloom Exchange · Beta (bxk-7ab61a50094bf764) · counterparty Bloom Exchange · Alpha\n    ✓ verifies against node-beta's card   ✓ does not verify against node-alpha's key\n\n  3 · node-beta's agent buys on node-alpha\n    settled BLOOM-XCH-8HSX-HJSW-ZA40-PSBQ at $46,920 · net 45 · gold · 10 rounds\n    receipt: issued by Bloom Exchange · Alpha (bxk-1f439f15d2868299) · counterparty Bloom Exchange · Beta\n    ✓ verifies against node-alpha's card   ✓ does not verify against node-beta's key\n```\n\nEach node verifies the other's signed Agent Card (`GET /api/exchange/peers`). An agent from one node negotiates on the other, presenting its home node's card. Each receipt names both nodes and verifies only against its issuer's key. The same deal with the SDK:\n\n``` js\nconst alphaCard = await (await fetch(\"http://localhost:3001/.well-known/agent-card.json\")).json();\nconst onBeta = new BloomExchangeClient({ baseUrl: \"http://localhost:3002\", agent: { name: \"alpha/procurement\", framework: \"bloom-sdk\", card: alphaCard } });\nconst { certificate } = await onBeta.negotiate({ mandate: { ceilingPriceUsd: 52_500, maxBudgetUsd: 55_000, requiredSlaTier: \"gold\", targetNetDays: 60 }, item: { description: \"12-month platform license\" } }).result;\nawait onBeta.verifyCertificate(certificate!); // signed by node-beta\n```\n\nRun a single node with `docker compose -f deploy/docker-compose.yml up node-alpha`. Kubernetes runs one node per namespace: `kubectl apply -k deploy/k8s` (see `deploy/k8s/kustomization.yaml`). With no model keys and no settlement webhook, nodes make no outbound calls beyond their configured peers. Configuration lives in [`.env.example`](https://github.com/astyboyy-ship-it/bloom-exchange/blob/main/.env.example).\n\n**Access keys** are optional. They switch enclaves from the sandbox to production clearing and unlock operator views: `npm run key:issue -- --role operator --holder \"You\"`.\n\n```\nnpm test                  # 144 tests: protocol vectors, engine invariants, leakage, settlement safety, firewall, adapters, peers, CLI, MCP, copy parity\nnpm run typecheck\nnpm run lint\nnpm run build\nnpm run spec:conformance  # regenerates SPEC.md Appendix B from the suite\nnpm run verify:launch     # the end-to-end check above (after npm run build)\n```\n\nEvery test has a conformance id in [SPEC.md Appendix B](https://github.com/astyboyy-ship-it/bloom-exchange/blob/main/SPEC.md#appendix-b-conformance-vectors). Appendix A gives byte-exact vectors for canonical JSON, key derivation, round hashes, commitments, certificate ids and Ed25519 signatures, so implementations in other languages can match the reference exactly.\n\n- **Built:** everything above runs today, end to end, with tests.\n- **Format only:**`bloom.exchange/<agent>` links. They are a naming format that resolves to a node's signed Agent Card; there is no public registry or resolver yet.\n- **Open:** in v0.1 the vault runs on the provider's node, so the counterparty trusts that operator not to read its mandate. The roadmap is neutral hosted clearing, attested enclaves and federation. See[SPEC.md §12](https://github.com/astyboyy-ship-it/bloom-exchange/blob/main/SPEC.md#12-security-considerations-and-threat-model) .\n\n[Apache License 2.0](https://github.com/astyboyy-ship-it/bloom-exchange/blob/main/LICENSE). See [NOTICE](https://github.com/astyboyy-ship-it/bloom-exchange/blob/main/NOTICE).\n\nThe two paintings in `apps/node/public/paintings` are public-domain works: Jean-Honoré Fragonard, c. 1760, and Claude Lorrain, 1653. They come from Wikimedia Commons under the Public Domain Mark 1.0, and the Apache License does not cover them. Attribution is in [NOTICE](https://github.com/astyboyy-ship-it/bloom-exchange/blob/main/NOTICE) and [CREDITS](https://github.com/astyboyy-ship-it/bloom-exchange/blob/main/apps/node/public/paintings/CREDITS.md).", "url": "https://wpnews.pro/news/bloom-exchange-double-blind-negotiation-sandbox-and-ed25519-receipts-for-mcp", "canonical_source": "https://github.com/astyboyy-ship-it/bloom-exchange", "published_at": "2026-11-19 08:49:52+00:00", "updated_at": "2026-11-19 09:14:47.537536+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-safety", "ai-tools", "developer-tools"], "entities": ["Bloom Exchange", "Bloom Clearing Protocol", "A2A v1.0", "AP2", "Stripe", "x402", "Model Context Protocol", "Claude Code"], "also_reported_by": [], "takeaway": "Bloom Exchange's `verify:launch` demo shows a prompt-injection firewall quarantining 14 threats with no private number leaking into 42,450 attacker-received bytes, and its `bloom-verify` CLI rejects a $1 price change (digest failure) and a wrong-key receipt (signature, ap2Proofs failure) offline.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/bloom-exchange-double-blind-negotiation-sandbox-and-ed25519-receipts-for-mcp", "markdown": "https://wpnews.pro/news/bloom-exchange-double-blind-negotiation-sandbox-and-ed25519-receipts-for-mcp.md", "text": "https://wpnews.pro/news/bloom-exchange-double-blind-negotiation-sandbox-and-ed25519-receipts-for-mcp.txt", "jsonld": "https://wpnews.pro/news/bloom-exchange-double-blind-negotiation-sandbox-and-ed25519-receipts-for-mcp.jsonld"}}