Skip to main content
Glama
Agent Payment Node
by nuanu-ai

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.

Related MCP server: inflow

What can you do?

Scenario

Where to start

Buy from a seller that accepts x402

apn x402 inspect, then apn x402 fetch prepare and approve. See x402 purchases.

Send a direct transfer

On 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 agent

apn mcp config and apn mcp serve. See MCP setup.

Use Coinbase, MetaMask or another provider wallet

apn wallet connect. See provider wallets.

Bridge or swap under owner limits

See families and the guides in the documentation index.

Recover after an interruption

apn 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

Need

Guide

Install and discover the commands

Getting started

A first direct transfer

First journey

Pay an x402 seller

x402 purchases

Connect an agent

MCP setup

Wallets and providers

Provider wallets

RPC endpoints and balances

RPC configuration, Portfolio

All commands

Command reference

Keys, threat model, recovery

Custody and recovery

Check a release

Verify a release

Everything else

Documentation 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 section

Now in

Discover the installed contract

docs/getting-started.md

Verify a release

docs/release-verification.md

First journey: a direct Base USDC transfer

docs/first-journey-reference.md

x402 purchases

docs/x402-purchases.md

Provider wallets

docs/provider-wallets.md

Families

docs/families.md

RPC configuration

docs/rpc-configuration.md

Portfolio

docs/portfolio.md

Command reference

docs/command-reference.md

Custody and threat model

docs/custody-and-recovery.md

Recovery guarantees

docs/custody-and-recovery.md

Proof boundary

docs/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.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers