Sponsored by Deepsite.site

Kaginet Bitcoin Escrow For Ai Agents

Created By
kaginetaia month ago
Trustless Bitcoin escrow for AI agent-to-agent payments. 29 MCP tools. Create conditional escrow instruments (hash-match, human approval, optimistic with dispute bonds), fund with Bitcoin, settle automatically. All keys generated and deleted inside Intel TDX hardware enclaves with cryptographic attestation. No custodian, no stablecoin dependency, no public ledger. Get an API key: https://cloud.kaginet.com Docs: https://kaginet.com
Content

Kaginet — Trustless Bitcoin Escrow for AI Agents

CI PyPI - kagikai-langchain PyPI - kagikai-crewai License

Hardware-attested Bitcoin escrow that AI agents can use via MCP, LangChain, or CrewAI. No custody, no trust assumptions, no counterparty risk.

Live on Bitcoin mainnet. Running inside an Intel TDX confidential VM.


Why Kaginet

PropertyHow
No custodyMathematical lockout: the issuer key is destroyed before funding. Bitcoin consensus enforces this, not policy.
PrivateOff-chain bearer transfers are invisible. No public ledger for intermediate transfers.
Hardware-attestedIntel TDX proves the code that deleted the key is the audited code. Verifiable against Intel's root CA.
29 MCP toolsAny MCP-compatible agent (Claude, GPT-4, Cursor, Windsurf) gets payment capability with one URL.
Bitcoin mainnetReal money. Live now. Not a testnet demo.

Quick Start

Add to your Claude Desktop, Cursor, or Windsurf MCP config:

{
  "mcpServers": {
    "kagikai": {
      "url": "https://mcp.kaginet.com/sse",
      "headers": {
        "Authorization": "Bearer kagi_YOUR_API_KEY"
      }
    }
  }
}

Get an API key at cloud.kaginet.com.

Your agent now has 29 payment tools. Try:

Create a 50,000 sat escrow to bc1q...recipient for "Logo design work"

Option B: LangChain

pip install kagikai-langchain
from kagikai_langchain import KagikaiToolkit

toolkit = KagikaiToolkit(
    base_url="https://mcp.kaginet.com",
    api_key="kagi_YOUR_API_KEY",
)
tools = toolkit.get_tools()  # 29 tools ready for your agent

Option C: CrewAI

pip install kagikai-crewai
from kagikai_crewai import (
    KagikaiEscrowCreateTool,
    KagikaiEscrowStatusTool,
    KagikaiEscrowReleaseTool,
)

# Add to your crew's agent
tools = [
    KagikaiEscrowCreateTool(),
    KagikaiEscrowStatusTool(),
    KagikaiEscrowReleaseTool(),
]

How It Works

Agent Runtime                MCP Server              ICS (TEE Enclave)           Bitcoin
─────────────                ──────────              ─────────────────           ───────
                                                                                    
  kagikai_escrow_create ──▶  Authenticate ──▶  Generate keys inside TDX            
                                               Destroy issuer key (kA)             
                                               Create P2TR escrow address          
                                               Generate bc1q funding addr          
                             ◀── instrument_id + funding_address ◀──               
                                                                                    
  "Fund this address" ────────────────────────────────────────────────▶ bc1q funded
                                                                                    
                                               Watcher detects funding             
                                               Auto-forward bc1q → bc1p    ──────▶ P2TR escrow
                                               Status: Confirmed                   
                                                                                    
  kagikai_escrow_release ─▶  Sign JWT ──────▶  Evaluate evidence                   
                                               Status: Completed                   
                                               Auto-sweep to payee         ──────▶ Payee receives
                                               Zero all keys                       
  1. Create: Agent calls kagikai_escrow_create with amount and payee address. ICS generates keys inside the TEE, destroys the issuer key, returns a bc1q funding address.
  2. Fund: Payer sends bitcoin to the bc1q address from any wallet. ICS auto-forwards to the internal P2TR escrow.
  3. Release: Agent submits evidence. Evaluator validates (auto or manual). ICS auto-sweeps funds to the payee.
  4. Attest: At any point, anyone can verify the TDX attestation proving the issuer key was deleted by the audited code.

Instrument Lifecycle

Created ──▶ WatchingForFunding ──▶ Forwarding ──▶ Confirmed
                                    ┌─────────────────┤
                                    ▼                  ▼
                                Submitted          Expired
                                    │                  │
                       ┌────────────┼────────────┐     ▼
                       ▼            ▼            ▼  Available
                  Completed    Rejected    DisputeWindow  │
                       │            │            │        ├──▶ Recycled ──▶ Confirmed
                       ▼            ▼            │        └──▶ Refunded (terminal)
                    Swept       Available    ┌───┴───┐
                  (terminal)        │        ▼       ▼
                                    │   Completed  Disputed
                                    │  (auto-win)     │
                                    │            ┌────┴────┐
                                    │            ▼         ▼
                                    │       Completed  Rejected
                                    │      (seller     (buyer
                                    │       wins)       wins)
                              Recycled / Refunded

Full state machine documentation: docs/instrument-lifecycle.md


Documentation

DocumentDescription
ArchitectureSystem components, trust boundaries, data flow
Instrument LifecycleState machine with all transitions
API ReferenceEvery REST endpoint with schemas
MCP ToolsAll 29 tool definitions
AttestationTDX attestation chain and verification
Dispute MechanismOptimistic settlement with bonds
Fee ModelFee structure and estimation
Security ModelThreat model and trust boundaries
ComparisonKaginet vs ERC-8183 vs Stripe vs AURA
Protocol SpecificationFull escrow protocol: state machine, evaluator schemas, Nostr events, MCP tools

Live Endpoints

EndpointURL
MCP (SSE)https://mcp.kaginet.com/sse
Developer Dashboardcloud.kaginet.com
Product Websitekaginet.com

Examples


Project Structure

kaginet/
  adapters/
    langchain/          # pip install kagikai-langchain (29 tools)
    crewai/             # pip install kagikai-crewai (29 tools)
    tests/              # 90 adapter tests
  docs/                 # Architecture, API reference, protocol docs
  examples/             # Integration examples
  verify/               # TDX attestation verification tool

The ICS server (Rust, runs inside Intel TDX) is not included in this repository. This repo contains the integration layer: framework adapters, documentation, and examples.


Security

See SECURITY.md for our responsible disclosure policy.

The security model is documented at docs/security-model.md.


Contributing

See CONTRIBUTING.md. We welcome adapter contributions for new frameworks, documentation improvements, and example code.


License

See LICENSE. License terms are currently under evaluation.

Server Config

{
  "mcpServers": {
    "kaginet": {
      "url": "https://mcp.kaginet.com/sse",
      "headers": {
        "Authorization": "Bearer kagi_YOUR_API_KEY"
      }
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
CursorThe AI Code Editor
Amap Maps高德地图官方 MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Tavily Mcp
ChatWiseThe second fastest AI chatbot™
Playwright McpPlaywright MCP server
WindsurfThe new purpose-built IDE to harness magic
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
DeepChatYour AI Partner on Desktop
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Serper MCP ServerA Serper MCP Server
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.