Skip to content
@Claw402

Claw402

MCP-native x402 payment layer for AI agents. Let your OpenClaw agents pay, settle & transact autonomously on the x402 protocol.

Claw402

AI-native payment infrastructure for the x402 protocol

Claw402 is an autonomous payment integration layer that enables AI agents to execute cryptocurrency transactions through standardized Model Context Protocol (MCP) interfaces. Built on the x402 protocol, Claw402 bridges the gap between large language model-based agents and blockchain payment infrastructure, positioning AI agents as first-class economic actors in decentralized payment networks.


What is Claw402?

Claw402 operates as a protocol translation layer between AI agent runtime environments (OpenClaw, AutoGPT, LangChain) and the x402 payment protocol. The system exposes x402 transaction capabilities through MCP-compliant interfaces, enabling agents to execute payments using natural language instructions translated to protocol-level operations.

Key Features

  • MCP-Native Design - First-class integration with Model Context Protocol for seamless AI agent compatibility
  • Non-Custodial Security - Hardware-backed key isolation with time-bounded, scope-limited signing
  • Declarative Transactions - Natural language payment semantics instead of low-level cryptographic operations
  • Fault-Tolerant Execution - Idempotent operations, state recovery, and automatic circuit breaking
  • Protocol Specialization - Purpose-built for x402, not generic blockchain abstraction

Quick Start

Install the MCP Provider

npm install @claw402/mcp-provider

OpenClaw Integration

from openclaw import Agent
from claw402 import X402Provider

agent = Agent(
    name="payment_assistant",
    providers=[X402Provider(
        network="mainnet-beta",
        wallet_path="~/.config/solana/agent.json"
    )]
)

# Agent autonomously executes payments
agent.run("Pay the invoice from Acme Corp for $250 using USDC")

Standalone MCP Server

claw402 serve \
  --network mainnet-beta \
  --wallet ~/.config/solana/agent.json \
  --port 3402

Use Cases

Autonomous SaaS Payments - AI agents manage recurring software subscriptions by executing x402 payments when renewals are required

Invoice Settlement - Accounts payable agents process incoming invoices and settle payments autonomously within approved parameters

Micropayment Content Access - Research agents pay per-article fees to access paywalled content during information gathering

Dynamic Resource Allocation - DevOps agents provision cloud infrastructure by paying compute providers via cryptocurrency spot markets

Architecture

┌─────────────────────────────────────────────────────┐
│            AI Agent Runtime (OpenClaw)              │
│  ┌───────────────────────────────────────────────┐  │
│  │     Natural Language Instruction Layer        │  │
│  └─────────────────────┬─────────────────────────┘  │
└────────────────────────┼────────────────────────────┘
                         │ MCP Protocol
┌────────────────────────┼────────────────────────────┐
│                   Claw402 MCP Server                │
│  ┌──────────────────────────────────────────────┐   │
│  │  Intent Parser & Transaction Orchestrator    │   │
│  └────────────────┬─────────────────────────────┘   │
│  ┌────────────────┼─────────────────────────────┐   │
│  │  Wallet Manager │ Signing Service │ Validator│   │
│  └────────────────┬─────────────────────────────┘   │
└────────────────────┼────────────────────────────────┘
                     │ x402 Protocol
┌────────────────────┼────────────────────────────────┐
│              x402 Payment Network                   │
│  ┌──────────────────────────────────────────────┐   │
│  │  Blockchain Settlement │ Verification Layer  │   │
│  └──────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────┘

Repository Structure

Core Repositories

Tools & Examples

MCP Tool Suite

Tool Purpose
x402.initialize_payment Create new payment session
x402.authorize_transaction Sign and submit transaction
x402.verify_settlement Confirm blockchain finality
x402.query_balance Retrieve wallet balances
x402.estimate_fees Calculate transaction costs
x402.cancel_payment Abort pending transaction

Technology Stack

  • Protocol: x402 (HTTP 402 Payment Required)
  • Blockchain: Solana (Anchor framework)
  • Integration: Model Context Protocol (MCP)
  • Languages: TypeScript, Python, Rust
  • Framework: Next.js 15 (App Router)

Security

Non-Custodial Architecture

  • Delegated Signing - Time-bounded, scope-limited signing keys
  • Hardware Isolation - Private keys never enter agent context
  • Multi-Party Confirmation - Human approval for high-value transactions
  • Idempotent Operations - Prevents double-execution with unique identifiers

Compliance

  • Transaction amount limits and approval workflows
  • Audit trails with immutable logs
  • Optional AML/KYC integration for regulated deployments
  • Geographic restrictions and compliance policies

Performance

Metric Target
MCP Tool Latency < 100ms
Transaction Finality < 30s
Throughput 1000 tx/sec
Availability 99.9% uptime
Key Signing Latency < 50ms

Roadmap

Q2 2026 - Core Infrastructure

  • MCP server with x402 tool suite
  • Solana mainnet integration
  • OpenClaw native provider
  • Basic wallet management

Q3 2026 - Enterprise Features

  • Multi-signature support
  • Policy engine for approvals
  • Transaction analytics
  • REST API proxy

Q4 2026 - Protocol Expansion

  • Additional blockchain support
  • Advanced payment primitives
  • Cross-chain settlement
  • Compliance tooling

Q1 2027 - Ecosystem Maturation

  • Agent marketplace integration
  • Reputation and credit scoring
  • Dispute resolution
  • Enterprise SLA offerings

Documentation

Community

Contributing

We welcome contributions to Claw402! Please see our Contributing Guide for details on:

  • Code of conduct
  • Development workflow
  • Pull request process
  • Testing requirements
  • Documentation standards

License

Proprietary - All rights reserved

For licensing inquiries, contact: licensing@claw402.xyz


Built with x402 protocol | Secure, fast, HTTP-native payments for autonomous AI agents

Pinned Loading

  1. claw402 claw402 Public

    A unified payment gateway for x402 protocol integration, providing developers with a streamlined API for cryptocurrency payment processing over HTTP.

    TypeScript 2

  2. smart-contracts smart-contracts Public

    Smart contracts for Claw402's financial infrastructure for autonomous AI operations. Built on Solana using the Anchor framework.

    Rust 1

Repositories

Showing 3 of 3 repositories

Top languages

Rust TypeScript

Most used topics

Loading…