{
  "markdown": "# Countersign\n\n[![CI](https://github.com/countersign-network/packages/actions/workflows/ci.yml/badge.svg)](https://github.com/countersign-network/packages/actions/workflows/ci.yml)\n[![npm — @countersign/sdk](https://img.shields.io/npm/v/%40countersign%2Fsdk?label=%40countersign%2Fsdk)](https://www.npmjs.com/package/@countersign/sdk)\n[![npm — @countersign/mcp](https://img.shields.io/npm/v/%40countersign%2Fmcp?label=%40countersign%2Fmcp)](https://www.npmjs.com/package/@countersign/mcp)\n[![npm downloads](https://img.shields.io/npm/dm/%40countersign%2Fmcp?label=mcp%20downloads)](https://www.npmjs.com/package/@countersign/mcp)\n[![License: Apache-2.0](https://img.shields.io/npm/l/%40countersign%2Fsdk)](https://github.com/countersign-network/packages/blob/main/LICENSE)\n\n**A neutral, cross-vendor control plane for AI agents that spend money.** Countersign holds the\n**policy**, the **freeze**, and the **audit ledger** *across multiple agent-wallet backends at once* —\nthe one thing no single wallet vendor can do, because each only governs its own rail. That\naggregation is the moat.\n\n[![Countersign — one policy, one sub-second freeze, one signed ledger, across every wallet vendor](https://countersign.network/demo.gif)](https://countersign.network/demo.html)\n\n*Live version of this loop: [countersign.network/demo.html](https://countersign.network/demo.html) · [60s video](https://countersign.network/demo.mp4)*\n\n> One falsifiable test defines it: **can Countersign freeze agents across many backends at once, in\n> under a second, with a unified tamper-evident ledger of every attempt?** Proven LIVE across **four\n> rails** (Coinbase, Turnkey, Openfort, and a Lithic Visa **card**) in ~432ms on testnet.\n\nThis repository is the **open-core front door** — the Apache-2.0 packages you build *against*: the\nintegration contract, the typed client, the MCP tools, and the x402 guard. The control-plane \"brain\"\n(the policy compiler, the hash-chained ledger, the vendor adapters, and the hosted Core) is separate\nand proprietary; you reach it over the network via the SDK/MCP, hosted at **app.countersign.network**.\n\n## Quickstart\n\n**Drop the kill switch + spend guard into any MCP client** (Claude, Cursor, …) — one line:\n\n```jsonc\n// claude / cursor mcp config\n{ \"mcpServers\": { \"countersign\": {\n  \"command\": \"npx\", \"args\": [\"-y\", \"@countersign/mcp\"],\n  \"env\": { \"COUNTERSIGN_URL\": \"https://app.countersign.network\", \"COUNTERSIGN_API_KEY\": \"csk_…\" }\n}}}\n```\n\n**Or wire it into your own agent with the SDK:**\n\n```ts\nimport { CountersignClient } from \"@countersign/sdk\";\nconst cs = new CountersignClient({ baseUrl, apiKey });\n\nawait cs.evaluate({ agentId, amount, asset, venue }); // may this spend happen? (allow / deny / needs_approval)\nawait cs.freeze();                                     // the kill switch — every backend, < 1s\n```\n\nGet a free testnet key at **<https://app.countersign.network/start?ref=gh-readme>**.\n\n**Agents paying agents?** See [`examples/guarded-payee`](examples/guarded-payee) — the A2A/AP2\npattern where a payee advertises it is governed and the payer verifies that (and guards its own\npayment) before any mandate is signed.\n\n## Packages (this repo — all Apache-2.0)\n\n| Package | Role |\n|---|---|\n| [`@countersign/core`](packages/core) | the `EnforcementProvider` interface, branded ids, the unified policy **schema**, the fail-closed **freeze controller** — the integration contract every backend implements |\n| [`@countersign/api-contract`](api-contract) | OpenAPI + typed REST/ws schema — the single source of truth for the Client↔Core wire interface |\n| [`@countersign/sdk`](packages/sdk) | typed client over the Core API + live ledger subscribe |\n| [`@countersign/mcp`](packages/mcp) | Countersign as MCP tools — kill switch + spend guard inside any MCP client |\n| [`@countersign/x402`](packages/x402) | govern [x402](https://x402.org) (HTTP-402 machine payments) — guard a payment *before* it pays |\n| [`@countersign/verify`](packages/verify) | verify a ledger entry offline — hash chain, RFC 6962 Merkle inclusion, Ed25519 signatures |\n| [`@countersign/ap2`](packages/ap2) | govern AP2 (Agent Payments Protocol) — guard an agent-payment mandate before it executes |\n\nThe proprietary brain (policy **compiler** to each backend's native controls, ledger, Coinbase /\nTurnkey / Openfort / Lithic adapters, the hosted Core) lives in a separate private repository.\n\n## Prime directives (invariants)\n\n1. Don't build cryptography — integrate vendor MPC/TEE; session keys, never master keys.\n2. Build the layer **above** the wallets; cross-vendor aggregation is the product.\n3. **Fail-closed**: no decision / no backend response ⇒ the transaction does **not** execute.\n4. Backend-agnostic core; no vendor logic leaks past the `EnforcementProvider` interface.\n5. Append-only, hash-chained ledger is the source of truth.\n6. Testnet only — mainnet follows a third-party security audit.\n\n## Links\n\n- **Home:** <https://countersign.network> · **Hosted Core:** <https://app.countersign.network>\n- **npm:** [`@countersign/sdk`](https://www.npmjs.com/package/@countersign/sdk) ·\n  [`@countersign/mcp`](https://www.npmjs.com/package/@countersign/mcp) ·\n  [`@countersign/x402`](https://www.npmjs.com/package/@countersign/x402) ·\n  [`@countersign/ap2`](https://www.npmjs.com/package/@countersign/ap2)\n- **Architecture:** [`docs/architecture.md`](docs/architecture.md) · **Security:** [`SECURITY.md`](SECURITY.md)\n\nApache-2.0. Countersign holds policy, freeze, and a tamper-evident ledger — it never takes custody of funds.\n",
  "bytes": 5542,
  "sha": "6f64c8efeee7fff93e28817becb8ccdcdb3aec65da2868df78e9ea641a344e44",
  "repo_slug": "countersign-network/packages",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_countersign_network_countersig_098b8aae/readme"
}