Agent Payment Node

Open-source CLI and local MCP payment tools for AI agents on macOS Apple Silicon, with x402 offer inspection and direct transfers requiring foreground approval.

Documentation

Agent Payment Node (APN)

Agent Payment Node (APN) is an open-source, local-first payment runtime and MCP server for AI agents. An agent drives it through the apn CLI or a local stdio MCP server; a human owner sets the limits and approves payments in a foreground terminal, and x402 purchases run inside a policy the owner activated. APN keeps each payment as a durable operation with an idempotency key, so a crash or a lost response never sends the same money twice.

Agent Payment Node (APN): local-first payments for AI agents

macOS Apple Silicon · Node 24 · MIT · TypeScript · CLI + stdio MCP

Website: agentpaymentnode.com

Install · What can you do? · Connect MCP · Documentation · Releases · Security

What is APN?

APN lets an AI agent pay without holding unlimited access to a wallet. The agent prepares a payment, and APN checks it against limits the owner set. Direct transfers wait for the owner to approve them in a terminal; x402 purchases run only inside a spending policy the owner activated. If the process crashes mid-payment, APN finds the saved operation and does not send the money twice.

It covers:

  • direct transfers of native coins and listed tokens on EVM networks, Solana and TRON;
  • standard x402 purchases (EIP-3009 USDC, Permit2, ERC-20 transfer-proof merchants);
  • USDC transfers whose gas is paid from the USDC amount (local wallet, MetaMask Agent Wallet, MetaMask Smart Account, Coinbase, PayAI facilitator) and Ethereum USDT through a keyless sponsor;
  • bridges (LI.FI with Across and Stargate, Relay, Circle CCTP V2, GasZip, NEAR 1Click, direct Stargate V2);
  • guarded swaps (Uniswap V3 on Ethereum, SunSwap on TRON, Jupiter and Orca on Solana);
  • an owner allowlist that admits each asset, rail and mechanism with per-operation and daily caps.

APN runs on Apple Silicon macOS with Node 24. The platform support matrix records the boundary and what Linux or Windows would need. A matching version number does not prove that an installed artifact contains a given source change: check apn --version, the release provenance and apn help --json together.

Install

brew install nuanu-ai/tap/apn
apn --version
apn help --json

The Formula installs apn and the Homebrew node@24 dependency. Discovery commands run before any state, Keychain, wallet, policy, network or signing work. See Getting started for the full install text, Verify a release for release checks and the release list for current versions.

What can you do?

ScenarioWhere to start
Buy from a seller that accepts x402apn x402 inspect, then apn x402 fetch prepare and approve. See x402 purchases.
Send a direct transferOn EVM: apn pay transfer prepare-asset, then approve in a foreground terminal. Solana and TRON have their own commands. See the first journey.
Connect an AI agentapn mcp config and apn mcp serve. See MCP setup.
Use Coinbase, MetaMask or another provider walletapn wallet connect. See provider wallets.
Bridge or swap under owner limitsSee families and the guides in the documentation index.
Recover after an interruptionapn operation status, operation resume, receipt get. See custody and recovery.

Which networks, assets and providers work depends on the route. The documentation index links to the guide for each one.

Connect an MCP client

apn mcp config
apn mcp serve

apn mcp config prints the launch descriptor and apn mcp serve runs the local stdio server. Your MCP client starts it as a local process. The agent never approves a payment: a command that needs a human returns the exact command to run in a terminal. There is no hosted remote MCP endpoint in this repository. See MCP setup.

How APN works

An agent prepares a payment. A prepare command freezes one exact effect (chain, asset, amount, recipient, fee budget) under an idempotency key and signs nothing. An approve or execute command re-checks the frozen facts and the active owner policy, shows the exact terms in a foreground terminal and asks for a typed code before signing. Every send is behind a durable marker, and an ambiguous send is observed before anything else. The full text is in How APN works.

Documentation

NeedGuide
Install and discover the commandsGetting started
A first direct transferFirst journey
Pay an x402 sellerx402 purchases
Connect an agentMCP setup
Wallets and providersProvider wallets
RPC endpoints and balancesRPC configuration, Portfolio
All commandsCommand reference
Keys, threat model, recoveryCustody and recovery
Check a releaseVerify a release
Everything elseDocumentation index

Where the previous README sections went

The README was shortened. Its detailed sections moved word for word into docs/. Old links to these headings still land here.

Previous sectionNow in
Discover the installed contractdocs/getting-started.md
Verify a releasedocs/release-verification.md
First journey: a direct Base USDC transferdocs/first-journey-reference.md
x402 purchasesdocs/x402-purchases.md
Provider walletsdocs/provider-wallets.md
Familiesdocs/families.md
RPC configurationdocs/rpc-configuration.md
Portfoliodocs/portfolio.md
Command referencedocs/command-reference.md
Custody and threat modeldocs/custody-and-recovery.md
Recovery guaranteesdocs/custody-and-recovery.md
Proof boundarydocs/custody-and-recovery.md

Security and custody

APN never prints or exports a private key. Read the custody and threat model before funding a wallet. Report a vulnerability privately, as SECURITY.md describes, and never in a public issue.

Contributing

Open an issue for a bug, an installation problem or a documentation suggestion. Include the output of apn --version and remove secrets. See CONTRIBUTING.md.

License

Licensed under the MIT License.