AgentWallet MCP Server

Permissionless wallet infrastructure for AI agents. Create wallets, sign transactions, and broadcast on-chain, on any EVM chain and Solana. Built-in guards. No KYC. Free to use.
Your keys can stay on your machine. Set one environment variable and every signature happens in your own process. No server sees the key, no company can freeze the wallet, and you can verify that claim by reading src/local-wallet.ts or by running the server with the API pointed at a closed port.
No KYC. No KYT. No approval process. No transaction monitoring. No one can block your wallet. Free: no fee per operation and no credit card.
Two modes
| Local (self-custody) | Hosted (custodial) |
|---|
| Who holds the key | You, in your own process | Encrypted on AgentWallet servers |
| Set up | One env var, no account needed | API key |
| Chains | EVM + Solana | EVM + Solana |
| Can anyone freeze it | No | Yes, that is what pause is for |
| Spend guards | AGENTWALLET_MAX_TX_NATIVE, AGENTWALLET_MAX_TX_TOKEN, AGENTWALLET_MAX_TX_SOL, AGENTWALLET_MAX_AUTOPAY | Server-side limits, pause, rate limits |
| Paywalls and usage | Needs an API key too | Included |
Run wallet_mode at any time and the server will tell you which one you are in, and which address it controls.
Local signing in one variable
{
"mcpServers": {
"agentwallet": {
"command": "npx",
"args": ["-y", "agentwallet-mcp"],
"env": {
"AGENTWALLET_PRIVATE_KEY": "0xyour_key",
"AGENTWALLET_RPC_8453": "https://your-own-rpc",
"AGENTWALLET_MAX_TX_NATIVE": "0.05"
}
}
}
}
Use AGENTWALLET_KEYFILE=/path/to/key instead if you would rather keep the key out of your shell config (one or the other: the server refuses to start when both are set). The key is read once, never written to disk, never logged, and never included in an error message.
AGENTWALLET_RPC_<chainId> (or AGENTWALLET_RPC_URL for all chains) points at an endpoint you trust (https; plain http only on localhost). Without it a public RPC is used, and a public RPC can see which addresses you ask about. Decimals for a token outside the registry come from that RPC and are accepted only up to 18; pin anything else with AGENTWALLET_TOKEN_DECIMALS.
AGENTWALLET_MAX_TX_NATIVE is a per-transaction ceiling in native units (ETH, MATIC and so on). In hosted mode the server enforces limits; in local mode there is no server, so these guards are the only ones there are. Set them.
AGENTWALLET_MAX_TX_TOKEN is the equivalent ceiling for ERC-20 movement, in human units of the token. Set this one too if you hold stablecoins. The native cap cannot see a token transfer: an ERC-20 send carries value = 0 with the amount in the calldata, so AGENTWALLET_MAX_TX_NATIVE alone leaves a USDC balance uncapped. AGENTWALLET_MAX_TX_TOKEN covers transfer, transferFrom, approve, increaseAllowance, EIP-2612 permit, Permit2 approve, and deposit() / withdraw(uint256) on the chain's own wrapped-native contract (so wrap_eth and unwrap_eth keep working under the cap), the approvals because an unbounded allowance is a drain waiting to happen. ERC-721 and ERC-1155 calldata (setApprovalForAll, safeTransferFrom) is refused while the cap is set, since nothing prices an NFT, and so are the ERC-721 transferFrom and approve, which share their selectors with ERC-20, whenever the target declines decimals(), since there the amount word is a token id (1.14.14); without the cap it passes the way an ERC-20 transfer of any size does, except that an operator grant is an unlimited approval and is refused everywhere by default (see AGENTWALLET_ALLOW_UNLIMITED_APPROVAL). Any other calldata sent to a token contract or to Permit2 is refused while the cap is set, because the guard cannot price it; set AGENTWALLET_ALLOW_UNKNOWN_TOKEN_CALLS=1 to allow such calls deliberately. increaseAllowance and the legacy increaseApproval are judged on the resulting total: the current allowance is read first and the call refuses if it cannot be, so two compliant increments cannot stack a standing allowance above the cap. What this server sent in the last five minutes counts as well, mined or not: an increase, an approve, an approveAndCall or a permit for the wallet's own allowance is held at the total it would leave, and the next increase starts from the largest of those and the figure the node reports. Nothing sent lowers a hold, so an increase sent within five minutes of lowering an allowance can be refused; approve with an absolute amount always works (1.14.23). Local sends on one chain are made one at a time, so nonces follow the order in which the cap judged the sends (1.14.26). Calls to other contracts (routers, bridges) pass, since they can only pull what an approval already allowed; a contract counts as "other" only when it demonstrably declines decimals(), so an absurd or malformed answer, or an RPC that cannot be reached, refuses rather than allows. One call to such a contract needs no approval and is priced as well: Aave Pool.withdraw(asset, amount, to), which pays the wallet's own deposit to any receiver, is compared with the cap on the asset it names, and an amount of uint256.max (the whole position) is refused (1.14.19). That is the only redemption the cap can see. A position held inside another protocol (a liquidity position, a staking deposit, a lending market that is not itself a token) is moved by that protocol's own calls, which no per-transaction cap can price; if the wallet holds such positions, set AGENTWALLET_POLICY, which refuses calldata it cannot price unless you list the contract. Decimals are resolved locally from the trusted registry, then the token's own decimals(); a token that resolves neither way is evaluated at 0 decimals, the only value that cannot fail open. For a token outside the registry the RPC is the only source of decimals, and an RPC you do not control could scale the amount and the cap together; pin such tokens with AGENTWALLET_TOKEN_DECIMALS (for example 8453:0x<token>=6) and the pin is used everywhere the RPC's answer would have been. In hosted mode the token's answer comes through the API host and is read the same way since 1.14.26: one 32-byte word, taken above 18 only from a pin, and refused otherwise.
Solana local signing
"env": {
"AGENTWALLET_SOLANA_KEY": "[12,34...]",
"AGENTWALLET_SOLANA_RPC": "https://your-own-rpc",
"AGENTWALLET_MAX_TX_SOL": "1",
"AGENTWALLET_MAX_TX_TOKEN": "25"
}
Accepts whichever format you already have: a solana-keygen id.json array, a base58 secret key as exported by Phantom, or base64. Use AGENTWALLET_SOLANA_KEYFILE to point at a file instead. Native SOL and SPL token transfers are both signed locally, and a missing associated token account is created for the recipient automatically.
Set either key, or both. They are independent: run EVM locally and Solana hosted, or the reverse.
An operation with no matching local key is refused, never silently routed to the hosted signer. If you have an EVM key configured and ask for a Solana transfer with no Solana key, the server stops and tells you which variable is missing. Quietly moving funds onto a key you do not hold, while you believe you are in self-custody, is the worst thing this server could do.
About the dependency tree
Local signing uses viem for EVM and @solana/web3.js for Solana, plus bs58 for key parsing. SPL instructions are built by hand rather than with @solana/spl-token, because that package pulls in bigint-buffer, which carries a high severity buffer overflow advisory. A wallet has no business shipping that to save a dozen lines of instruction encoding.
The release workflow fails on a high or critical advisory, in a checkout and in the tree an install produces, and its list of exceptions is empty (.github/audit-gate.mjs). Releases 1.14.20 through 1.14.24 carried one dated exception: viem pinned ws 8.21.0 exactly, which GHSA-37g9-w4hg-h9qr covers (a peer can exhaust memory through automatic pong replies), and nothing loaded that copy. As of 1.14.25 this package requires viem 2.58.10 or later, which pins ws 8.23.1, so the affected copy is no longer in the tree and the exception is removed. An install differs from a checkout in one way: as of 1.14.13, npx agentwallet-mcp carries four medium advisories, three in stream-json 1.9 and one in uuid 8, both pulled in by jayson 4 under @solana/web3.js 1.x. The overrides in package.json move them to clean versions inside this repository only; npm ignores a dependency's overrides, and until 1.14.13 this paragraph claimed they held for installs too. None of the four is reachable: @solana/web3.js loads only jayson's HTTP client, which uses uuid v4 for request ids (the advisory is in v3, v5 and v6 with a caller-supplied buffer), and stream-json is loaded by jayson's streaming server parsers, which that client never calls. jayson 5 drops both packages, but @solana/web3.js 1.x pins jayson 4 and its maintainers have closed the bump as out of scope for 1.x, so the four stay until this package stops depending on @solana/web3.js 1.x. Earlier releases carried advisories inside @modelcontextprotocol/sdk's HTTP transport dependencies; this server speaks stdio, so that code never loads. Run the audit yourself, on an install rather than a checkout. Publishing a tree you can inspect is the point.
Features