Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
AGENTWALLET_PASSYesYour AgentWallet API key.
AGENTWALLET_USERYesYour AgentWallet username.
AGENTWALLET_WALLET_IDNoOptional. Set it to enable x402 auto-pay — when you exceed the free tier without a credit card, the MCP server will automatically pay for operations with USDC from this wallet.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

AgentWallet gives AI agents their own blockchain wallets. Private keys are encrypted server-side and never exposed: agents sign and broadcast transactions without ever touching raw keys.

Getting Started

  1. Call list_wallets to see existing wallets, or create_wallet to make a new one.

  2. Fund the wallet by sending tokens to its address from an external source.

  3. Use transfer (native tokens) or transfer_token (ERC-20/SPL tokens) to send funds.

Supported Chains

  • EVM chains: Ethereum (1), Base (8453), Arbitrum (42161), Optimism (10), Polygon (137), Avalanche (43114), BSC (56), Zora (7777777), PulseChain (369)

  • Solana: Mainnet (900), Devnet (901), Testnet (902)

  • Call get_chains for the full list with native tokens and stablecoin contract addresses.

EVM vs Solana

  • Addresses: EVM uses 0x-prefixed hex (42 chars). Solana uses Base58 (32-44 chars).

  • Native tokens: EVM = ETH/POL/BNB/etc (18 decimals, wei). Solana = SOL (9 decimals, lamports).

  • Token standards: EVM uses ERC-20. Solana uses SPL tokens.

  • EVM-only tools: approve_token, get_allowance, wrap_eth, unwrap_eth, call_contract, get_token_info. These do not work on Solana.

  • Works on both: create_wallet, transfer, transfer_token, send_transaction, sign_transaction, get_balance, get_token_balance.

Common Workflows

Send native tokens (ETH, SOL, etc.)

Use the transfer tool with a human-readable amount (e.g. "0.1" ETH). It auto-converts to wei/lamports.

Send ERC-20 or SPL tokens

Use transfer_token. You need: wallet_id, token contract address, recipient, amount, chain_id, and decimals (6 for USDC, 18 for most ERC-20s). Call get_chains to find stablecoin addresses.

Interact with DeFi (EVM only)

  1. Check allowance with get_allowance.

  2. If needed, call approve_token to let the DeFi contract spend your tokens.

  3. Use send_transaction with the contract's calldata to execute the interaction.

Wrap/unwrap native tokens (EVM only)

Use wrap_eth to convert ETH → WETH (required by many DeFi protocols). Use unwrap_eth to convert back.

Read on-chain data (EVM only)

Use call_contract for gas-free read-only calls (eth_call). Provide ABI-encoded calldata.

x402 Payments — Paying for Resources

The pay_x402 tool handles the full x402 payment flow automatically:

  1. Fetches the URL.

  2. If the server returns HTTP 402, parses the payment requirements.

  3. Pays on-chain using your wallet.

  4. Retries the request with proof of payment. Always set max_payment to prevent overspending (e.g. "1.00" for max 1 USDC).

x402 Paywalls — Accepting Payments

Create paywalls to charge other agents for accessing your resources:

  1. create_paywall — set price, token, chain, and the resource URL to protect.

  2. Share the access URL. Clients that pay on-chain get the resource; others get HTTP 402.

  3. list_paywalls and get_paywall_payments to track revenue.

  4. get_x402_revenue for aggregate stats across all paywalls.

Wallet Security

  • Use pause_wallet to immediately freeze a wallet if compromised. No transactions can be signed while paused.

  • Use unpause_wallet to resume operations.

  • Use delete_wallet to permanently disable a wallet.

  • Wallets have server-enforced spending limits.

Tool Selection Guide

Goal

Tool

Send ETH/SOL/native tokens

transfer

Send USDC/ERC-20/SPL tokens

transfer_token

Check native balance

get_balance

Check token balance

get_token_balance

Look up token details

get_token_info (EVM only)

Approve DeFi spending

approve_token (EVM only)

Check approval amount

get_allowance (EVM only)

Read smart contract

call_contract (EVM only)

Custom transaction

send_transaction

Sign without broadcasting

sign_transaction

Pay for x402 resource

pay_x402

Charge for your resource

create_paywall

Check usage (hosted is free)

get_usage

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
create_walletA

Create a new EVM or Solana wallet. Returns the wallet ID and address. Private key is encrypted server-side and never exposed.

list_walletsA

List all wallets owned by the authenticated user. Returns wallet IDs, addresses, labels, chain IDs, and status.

get_walletA

Get details for a specific wallet by ID. Returns address, label, chain, spending limits, and pause status.

get_balanceA

Get the native token balance for a wallet on a specific chain. Returns balance in both wei (or lamports for Solana) and human-readable format.

sign_transactionA

Sign a transaction with a wallet's private key. For EVM: returns signed raw transaction hex. For Solana: returns base64 signed transaction. Does NOT broadcast. Use send_transaction for sign + broadcast. A signed transaction is a spend: under a spend policy it is checked, reserved on the ledger and counted against the budgets exactly as send_transaction is, because the caller can broadcast it.

send_transactionB

Sign and broadcast a transaction. Returns the transaction hash (EVM) or signature (Solana) on success. The transaction is signed server-side and broadcast via RPC.

transferA

Send native tokens (ETH, AVAX, BNB, POL, PLS, SOL) to an address. Specify the amount in human-readable format (e.g. "0.1" for 0.1 ETH). The amount is converted to wei/lamports automatically. Signs and broadcasts the transaction.

get_token_balanceA

Get the ERC-20 or SPL token balance for a wallet on a specific chain. Returns the raw balance and human-readable balance. Use get_chains to find stablecoin addresses for each chain.

transfer_tokenB

Send ERC-20 tokens (EVM) or SPL tokens (Solana) to an address. Specify the amount in human-readable format (e.g. "100" for 100 USDC). Signs and broadcasts the transaction. Use get_chains to find stablecoin addresses.

call_contractA

Execute a read-only call against a smart contract (eth_call). Returns the raw hex result. Does not cost gas or modify state. Useful for reading on-chain data like token balances, prices, positions.

approve_tokenA

Approve a spender contract to transfer ERC-20 tokens on your behalf. Required before interacting with any DeFi protocol (DEXs, lending, etc.). Specify an exact amount. "max" (an unlimited allowance) is refused by default and always under a spend policy; only the operator can allow it, with AGENTWALLET_ALLOW_UNLIMITED_APPROVAL=1 while no policy is set. Under a spend policy an approval is a spend: it counts against the budgets and the spender is checked as a recipient.

get_allowanceA

Check how many ERC-20 tokens a spender is approved to transfer. Returns the allowance in both raw and human-readable format. Use this to check if an approval is needed before a DeFi transaction.

wrap_ethA

Wrap native tokens (ETH, AVAX, BNB, POL, PLS) into their wrapped ERC-20 version (WETH, WAVAX, etc.). Required for most DeFi protocols that use ERC-20 tokens instead of raw native tokens. Specify amount in human-readable format (e.g. "0.5" for 0.5 ETH).

unwrap_ethB

Unwrap wrapped tokens (WETH, WAVAX, WBNB, etc.) back to native tokens. Specify amount in human-readable format (e.g. "0.5" for 0.5 WETH).

get_token_infoA

Get the name, symbol, and decimals of any ERC-20 token by its contract address. Useful for discovering token details before transfers or approvals.

pay_x402A

Handle an x402 payment flow. Fetches a URL, and if the server returns HTTP 402 Payment Required, parses the payment requirements (v1 body or v2 PAYMENT-REQUIRED header), signs an EIP-3009 TransferWithAuthorization for the "exact" scheme (no gas, nothing broadcast by the payer), and retries the request with the payment header. AgentWallet paywalls are paid by on-chain transfer instead. The "upto" scheme is settled with a Permit2 authorization bounded by the cap. Returns the final response and the settlement receipt. Supports the x402 open payment standard (https://x402.org). max_payment can only lower the operator's cap for one call.

check_approvalA

Status of a payment approval created when pay_x402 exceeded the cap on a hosted wallet. Returns pending, approved, denied or expired. Once approved, call pay_x402 again with approval_id.

approve_permit2A

One-time ERC-20 approval of a token to the Permit2 contract, needed before paying x402 "upto" endpoints with that token. A normal on-chain transaction (needs gas). Pass amount to grant a bounded allowance; with no amount it asks for the maximum, which is refused by default, under AGENTWALLET_MAX_TX_TOKEN, and always under a spend policy (where the allowance counts against the budgets). Only the operator can allow a maximum approval, with AGENTWALLET_ALLOW_UNLIMITED_APPROVAL=1 while no policy is set. Permit2 itself only moves what each signed authorization allows.

check_token_riskA

Assess an ERC-20 token before approving or swapping it: honeypot, taxes, owner powers, verified source, holder concentration, DEX liquidity. Uses GoPlus Security (free, no key) with an on-chain fallback. A warning for the caller to weigh, never a block.

get_usageA

Get the current month's usage statistics. Hosted AgentWallet is free: returns the operations count and what is left under the fair-use ceiling.

buy_verification_creditsA

Hosted AgentWallet is free and x402 verifications carry no fee, so there are no credits to buy: this call reports that and spends nothing. Kept so existing agent configurations do not break.

pause_walletA

Emergency pause a wallet. No transactions can be signed while paused.

unpause_walletB

Resume a paused wallet so transactions can be signed again.

get_chainsA

List all supported chains (EVM + Solana) with their chain IDs, native tokens, stablecoins, and RPC configuration status.

delete_walletA

Delete (soft-delete) a wallet. The wallet will no longer appear in listings and cannot be used for transactions. The wallet is read first and the delete names its address, so a wallet that cannot be read is never deleted.

create_paywallA

Create an x402 paywall that charges agents/clients for accessing a resource. Returns a public access URL that returns HTTP 402 until paid. Agents pay on-chain, then retry with proof to get the content.

list_paywallsA

List all your x402 paywalls. Returns paywall IDs, names, pricing, access URLs, payment counts, and revenue totals.

get_paywallA

Get details for a specific x402 paywall by ID. Returns pricing, access URL, payment stats, and configuration.

update_paywallC

Update an x402 paywall configuration. Can change price, resource URL, active status, or any other field.

delete_paywallB

Delete an x402 paywall. The access URL will return 404 after deletion.

get_paywall_paymentsA

Get payment history for a specific x402 paywall. Returns verified payments with TX hashes, payer addresses, amounts, and timestamps.

get_x402_revenueA

Get aggregate x402 revenue statistics across all your paywalls. Returns total payments and revenue broken down by chain and token.

quote_x402A

Ask what an x402 endpoint charges without paying: fetches the URL, parses the 402 requirements, says which option this wallet would pay (chain, asset, amount, recipient), whether the per-payment cap, the spend policy and the rolling budgets would allow it, and nothing is signed. Call it before pay_x402 when the price is unknown.

discover_x402A

Find x402-paid APIs by subject in the public x402 index (the Bazaar published by the CDP facilitator). Returns resources with their method, price and chain, re-priced from this client's own registry. Listings are sellers' own words. Nothing is paid; follow up with quote_x402 or pay_x402.

list_paymentsB

Spends recorded in this wallet's ledger (x402 payments, transfers, auto-pay), newest first, each with its latest outcome (signed, settled, declined, unknown, broadcast, void). The ledger is a hash-chained append-only file when AGENTWALLET_LEDGER or a policy names one; otherwise this process only.

export_receiptsA

Every spend in the ledger as CSV or JSONL text (oldest first), for expense records. Returns the text; write it wherever it belongs.

spend_policyA

The spend policy this server enforces (AGENTWALLET_POLICY), its sha256, the rolling budgets with what is spent and what remains, per-host spending, the ledger's path and integrity, and whether the connected client can answer approval questions. Read-only.

simulate_transactionA

Dry-run an EVM transaction with nothing signed: the local guards (native cap, token cap, fee cap), the spend policy, the node's gas estimate (which fails when the call would revert), the worst-case fee, whether the balance covers it, and the call's return data. Local mode runs the full check; hosted mode runs the policy and an eth_call.

wallet_modeA

Report whether this server is signing locally (self-custody, the private key never leaves this machine) or through the hosted AgentWallet API (custodial). Use this to verify custody before moving funds.

export_wallet_keyA

Explain how to export the private key of a hosted (custodial) AgentWallet so it can be moved to self-custody or any other wallet. Export itself is deliberately human-gated and is not performed by this tool.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.4/5.0

Scored across 40 tools

Disambiguation4/5

Most tools have clearly distinct targets: sign_transaction vs send_transaction vs transfer vs transfer_token are separated by explicit descriptions, and pay_x402/quote_x402/discover_x402 form a clear read-vs-pay gradient. The weakest area is the payments/reporting cluster (get_paywall_payments, get_x402_revenue, list_payments, export_receipts, get_usage), where an agent must read carefully to pick the right history/aggregate view, and approve_token vs approve_permit2 requires understanding Permit2.

Naming Consistency4/5

The dominant pattern is snake_case verb_noun (get_balance, create_paywall, list_wallets, check_token_risk), which is applied broadly and predictably. Deviations are minor but present: bare-verb or noun-only names such as transfer, spend_policy, wallet_mode, buy_verification_credits, and pay_x402/quote_x402/discover_x402 which lead with the domain noun instead of the verb.

Tool Count2/5

40 tools is well past the point where the surface stays legible for a single agent, and several do not earn their place: buy_verification_credits is an explicit no-op kept only for backwards compatibility, export_wallet_key explains rather than performs, and get_usage/wallet_mode are near-informational. The domain is genuinely broad (wallets, EVM+Solana transfers, DeFi approvals, x402 paywalls, ledger/policy), but the set could be consolidated to roughly 20-25 without losing capability.

Completeness4/5

Coverage is strong across the lifecycle: wallet create/list/get/delete/pause/unpause, native and token balances, transfers, approvals and allowance checks, contract calls, simulation, paywall CRUD, x402 discover/quote/pay, plus ledger, receipts and policy introspection. Gaps are modest — no wallet metadata/limit update, no lookup of a transaction or payment by hash, and no explicit transaction-status polling after broadcast.

Maintenance

ActivityActive
ResponsivenessMixed handling