Countersign

السجل الرسمي المالية والمدفوعات

Kill switch + spend guard for AI agents that spend money, across every wallet vendor at once.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package @countersign/mcp
Claude Code
claude mcp add countersign -e 'COUNTERSIGN_URL=https://app.countersign.network' -e 'COUNTERSIGN_API_KEY=<your countersign_api_key>' -- npx -y @countersign/mcp@0.2.2
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "countersign": {
            "command": "npx",
            "args": [
                "-y",
                "@countersign/mcp@0.2.2"
            ],
            "env": {
                "COUNTERSIGN_URL": "https://app.countersign.network",
                "COUNTERSIGN_API_KEY": "<your countersign_api_key>"
            }
        }
    }
}

متغيرات البيئة

  • COUNTERSIGN_URL إلزامي Base URL of the Countersign Core to govern (hosted or self-hosted).
  • COUNTERSIGN_API_KEY إلزامي سري API key for the Core (self-serve one at https://app.countersign.network/start or POST /signup).

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. Countersign
  2. Quickstart
  3. Packages (this repo — all Apache-2.0)
  4. Prime directives (invariants)
  5. Links

Countersign

A neutral, cross-vendor control plane for AI agents that spend money. Countersign holds the policy, the freeze, and the audit ledger across multiple agent-wallet backends at once — the one thing no single wallet vendor can do, because each only governs its own rail. That aggregation is the moat.

Live version of this loop: countersign.network/demo.html · 60s video

One falsifiable test defines it: can Countersign freeze agents across many backends at once, in under a second, with a unified tamper-evident ledger of every attempt? Proven LIVE across four rails (Coinbase, Turnkey, Openfort, and a Lithic Visa card) in ~432ms on testnet.

❄️ The hosted Core is paused (2026-09-18). app.countersign.network is switched off: it issues no keys and existing keys no longer authenticate. These packages are unaffected — they are Apache-2.0, still published on npm, and work against a Core you run yourself. Point COUNTERSIGN_URL at your own instance wherever this README says app.countersign.network.

This repository is the open-core front door — the Apache-2.0 packages you build against: the integration contract, the typed client, the MCP tools, and the x402 guard. The control-plane "brain" (the policy compiler, the hash-chained ledger, the vendor adapters, and the hosted Core) is separate and proprietary; you reach it over the network via the SDK/MCP. It was hosted at app.countersign.network, which is currently paused — self-host the Core to use these packages today.

Quickstart

Drop the kill switch + spend guard into any MCP client (Claude, Cursor, …) — one line:

// claude / cursor mcp config
{ "mcpServers": { "countersign": {
  "command": "npx", "args": ["-y", "@countersign/mcp"],
  "env": { "COUNTERSIGN_URL": "https://app.countersign.network", "COUNTERSIGN_API_KEY": "csk_…" }
}}}

Or wire it into your own agent with the SDK:

import { CountersignClient } from "@countersign/sdk";
const cs = new CountersignClient({ baseUrl, apiKey });

await cs.evaluate({ agentId, amount, asset, venue }); // may this spend happen? (allow / deny / needs_approval)
await cs.freeze();                                     // the kill switch — every backend, < 1s

Get a free testnet key at app.countersign.network/start — the hosted signup is paused. Run your own Core and issue yourself a key with POST /signup.

Agents paying agents? See examples/guarded-payee — the A2A/AP2 pattern where a payee advertises it is governed and the payer verifies that (and guards its own payment) before any mandate is signed.

Packages (this repo — all Apache-2.0)

PackageRole
@countersign/corethe EnforcementProvider interface, branded ids, the unified policy schema, the fail-closed freeze controller — the integration contract every backend implements
@countersign/api-contractOpenAPI + typed REST/ws schema — the single source of truth for the Client↔Core wire interface
@countersign/sdktyped client over the Core API + live ledger subscribe
@countersign/mcpCountersign as MCP tools — kill switch + spend guard inside any MCP client
@countersign/x402govern x402 (HTTP-402 machine payments) — guard a payment before it pays
@countersign/verifyverify a ledger entry offline — hash chain, RFC 6962 Merkle inclusion, Ed25519 signatures
@countersign/ap2govern AP2 (Agent Payments Protocol) — guard an agent-payment mandate before it executes

The proprietary brain (policy compiler to each backend's native controls, ledger, Coinbase / Turnkey / Openfort / Lithic adapters, the hosted Core) lives in a separate private repository.

Prime directives (invariants)

  1. Don't build cryptography — integrate vendor MPC/TEE; session keys, never master keys.
  2. Build the layer above the wallets; cross-vendor aggregation is the product.
  3. Fail-closed: no decision / no backend response ⇒ the transaction does not execute.
  4. Backend-agnostic core; no vendor logic leaks past the EnforcementProvider interface.
  5. Append-only, hash-chained ledger is the source of truth.
  6. Testnet only — mainnet follows a third-party security audit.

Apache-2.0. Countersign holds policy, freeze, and a tamper-evident ledger — it never takes custody of funds.

الأسئلة الشائعة

ما هو Countersign؟

Kill switch + spend guard for AI agents that spend money, across every wallet vendor at once.

كيف أثبّت Countersign؟

يعمل على جهازك. في Claude Code: claude mcp add countersign -e 'COUNTERSIGN_URL=https://app.countersign.network' -e 'COUNTERSIGN_API_KEY=<your countersign_api_key>' -- npx -y @countersign/mcp@0.2.2. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج Countersign إلى مفتاح API؟

نعم. يتطلب COUNTERSIGN_URL, COUNTERSIGN_API_KEY، وتضبطها في إعداداته.

هل Countersign مفتوح المصدر؟

شيفرته علنية على GitHub، لكن المستودع لا يعلن ترخيصًا قياسيًا.

من يصون Countersign؟

ينشره countersign-network. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.