agentpay
v3.1.0Non-custodial x402 payment MCP server for AI agents.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
deploy_wallet
Deploy a new AgentAccountV2 wallet via the factory contract. The wallet is deterministically addressed (CREATE2) and owned by an NFT. Returns the wallet address and deployment transaction hash. Requires FACTORY_ADDRESS and NFT_CONTRACT_ADDRESS env vars (or pass them as arguments).
| Parameter | Type | Description |
|---|---|---|
token_id * | string | NFT token ID that will own this wallet (e.g. "1") |
factory_address | string | Factory contract address. Defaults to FACTORY_ADDRESS env var. |
nft_contract_address | string | NFT contract address. Defaults to NFT_CONTRACT_ADDRESS env var. |
get_wallet_info
Get comprehensive wallet information including address, on-chain balance, spend limits, remaining period allowance, and queue depth. Use token parameter to check budget for a specific ERC20 (defaults to ETH).
| Parameter | Type | Description |
|---|---|---|
token | string | Token address to check. Use "0x0000000000000000000000000000000000000000" for ETH (default). |
send_payment
Send ETH or ERC20 tokens from the Agent Wallet. If the amount is within the configured spend limits, it executes immediately and returns the tx hash. If it exceeds limits, the transaction is queued for owner approval (use queue_approval to manage). Always check spend limits first with check_spend_limit to avoid surprises.
| Parameter | Type | Description |
|---|---|---|
amount_eth * | string | Amount in ETH (or token units). E.g. "0.001" for 0.001 ETH, "1.5" for 1.5 USDC |
to * | string | Recipient wallet address (0x-prefixed) |
memo | string | Optional memo for this payment (not stored on-chain) |
token | string | ERC20 token address. Omit for native ETH. |
token_decimals | number | Token decimals (default 18 for ETH, 6 for USDC) |
check_spend_limit
Check whether a proposed payment amount is within the wallet's autonomous spend limits. Returns a clear yes/no with remaining budget details. Use this before send_payment to avoid surprise queuing.
| Parameter | Type | Description |
|---|---|---|
amount_eth * | string | Amount in ETH to check (e.g. "0.01") |
token | string | Token address. Omit for native ETH. |
queue_approval
Manage over-limit transactions queued for owner review. Use action="list" to see pending transactions, "approve" to approve one by ID, or "cancel" to cancel one by ID. Approve/cancel require the agent key to have owner privileges.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action: "list", "approve", or "cancel" |
tx_id | string | Transaction queue ID (required for approve/cancel) |
x402_pay
Fetch a URL and automatically handle HTTP 402 Payment Required responses. If an active x402 V2 session covers this URL, the session token is used instead of making a new payment (no on-chain cost). If no session exists, the Agent Wallet pays the required amount and retries. Payment is rejected if it exceeds your wallet's spend limits or the max_payment_eth cap. Powered by the x402 protocol on Base network. Tip: Use x402_session_start to pay once for a session and save on repeated calls.
| Parameter | Type | Description |
|---|---|---|
url * | string | URL to fetch (HTTP 402 responses are handled automatically) |
body | string | Request body string (for POST/PUT/PATCH) |
headers | object | Additional request headers |
max_payment_eth | string | Maximum payment cap in ETH (e.g. "0.001") |
method | string | HTTP method (default: GET) |
skip_session_check | boolean | Skip session auto-detection and force a fresh x402 payment |
timeout_ms | number | Timeout in milliseconds (default: 30000) |
get_transaction_history
Retrieve the wallet's recent on-chain transaction history from event logs. Shows executions, queued transactions, approvals, cancellations, spend policy updates, and operator changes. Filter by event type or block range for targeted queries.
| Parameter | Type | Description |
|---|---|---|
event_type | string | Filter by event type (default: all) |
from_block | string | Start block (decimal string). Defaults to 1000 blocks ago. |
limit | number | Max entries to return (default: 20, max: 100) |
to_block | string | End block (decimal string). Defaults to latest. |
x402_session_start
Establish an x402 V2 payment session: make a SINGLE on-chain payment and receive a cryptographically signed session token. All subsequent calls to the same endpoint within the session lifetime use x402_session_fetch — no additional payments required. Agents pay once per session rather than once per API call. Session tokens are signed locally by your wallet key (non-custodial). Returns a session_id you pass to x402_session_fetch for all future calls.
| Parameter | Type | Description |
|---|---|---|
endpoint * | string | Base URL to establish a session for (e.g., "https://api.example.com/v1") |
body | string | Request body for POST/PUT/PATCH session-start requests |
headers | object | Additional request headers |
label | string | Optional label for this session (e.g., "Premium API session") |
max_payment_eth | string | Maximum ETH to pay for this session. Rejects if price exceeds this. |
method | string | HTTP method for the initial request (default: GET) |
scope | string | "prefix": covers all paths under this URL (default). "exact": single URL only. |
timeout_ms | number | Request timeout in milliseconds (default: 30000) |
ttl_seconds | number | Session TTL in seconds (default: 3600 / 1 hour). Max: 30 days. |
x402_session_fetch
Make an HTTP request within an established x402 V2 session — NO payment required. The session token (signed by your wallet) is automatically attached to the request. The server recognises your session and grants access without a new on-chain payment. Requires a session_id from x402_session_start. Returns an error if the session has expired (call x402_session_start again to renew).
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID from x402_session_start |
url * | string | URL to fetch (must be covered by the session) |
body | string | Request body for POST/PUT/PATCH |
headers | object | Additional headers (session token is injected automatically) |
method | string | HTTP method (default: GET) |
timeout_ms | number | Timeout in milliseconds (default: 30000) |
x402_session_status
Check the status of x402 V2 payment sessions. Without arguments, lists all active sessions with TTL remaining. With a session_id, shows full details for that session including call count, payment info, and the signed session token.
| Parameter | Type | Description |
|---|---|---|
session_id | string | Specific session ID to inspect. Omit to list all active sessions. |
x402_session_end
Explicitly close an x402 V2 session before it expires naturally. After calling this, x402_session_fetch will return an error for the closed session. Useful for security hygiene or when you know a session is no longer needed.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID to close (from x402_session_start) |