Multi-language SDK for building applications with x402 payment capabilities. Supports both buyer (client) and seller (server) roles with flexible payment verification and authorization patterns.
Looking for examples? See the ampersend-examples repository.
-
Python - A2A protocol integration with wallet implementations and payment middleware
-
TypeScript - MCP protocol integration with client, proxy, and server implementations
If you just want your coding agent (Claude Code, Cursor, Codex, etc.) to be able to pay for things online, install the ampersend skill:
npx skills add edgeandnode/ampersend-sdkThis uses the skills CLI to install the skill into your agent's skills
directory. The skill handles setup, payment, and configuration — your agent will know what to do when it sees a 402
response or you ask it to call a paid endpoint.
# Install Python 3.13
uv python install 3.13
# Install dependencies
uv sync --frozen --all-packages --group dev# Install dependencies
pnpm install
pnpm build
# Configure environment
cp .env.example .env
# Edit .env with your credentials
# Run MCP proxy server
pnpm --filter ampersend-sdk proxy:dev
# Or run FastMCP example server
pnpm --filter fastmcp-x402-server dev→ Full TypeScript documentation
x402 Protocol - Transport-agnostic payment protocol for agent and LLM applications that enables pay-per-request patterns. See x402 specification.
Supported Transports:
- A2A (Agent-to-Agent) - Transport protocol for agent communication with payment capabilities
- MCP (Model Context Protocol) - Transport protocol for LLM-tool integration with payment capabilities
- HTTP - Standard HTTP client with x402 payment capabilities (TypeScript)
Key Components:
- Treasurer - Authorizes and tracks payments
- Wallet - Creates and signs payment proofs (EOA and Smart Account support)
- Client - Initiates requests with payment handling
- Server - Verifies payments and processes requests
ampersend-sdk/
├── python/
│ ├── ampersend-sdk/ # Python SDK package
│ └── langchain-ampersend/ # LangChain integration
└── typescript/
└── packages/
└── ampersend-sdk/ # TypeScript SDK package
- uv - Dependency management (install)
- Python 3.13+
- Node.js 18+
- pnpm - Package manager
- Test USDC - For payment testing (Circle faucet)
- Private Key - Ethereum wallet for signing payments
Apache 2.0 - See LICENSE