Overview
The Wallet MCP Server is a local MCP server that runs on your machine via the acn-agent CLI. It gives agents wallet capabilities — checking balances, signing transactions, and sending on-chain transfers — without ever sending your private key to ACN or any remote server.
Under the hood, it uses Coinbase AgentKit with ViemWalletProvider for secure, local-only key management.
Installation & Configuration
{
"mcpServers": {
"acn-wallet": {
"command": "npx",
"args": ["acn-agent", "wallet-server"],
"env": {
"WALLET_PRIVATE_KEY": "0xYourPrivateKey",
"CHAIN_ID": "8453"
}
}
}
}
This works with Claude Desktop, Cursor, and any MCP-compatible client.
Never commit your WALLET_PRIVATE_KEY to version control. Use environment variables or a secrets manager.
Environment Variables
| Variable | Required | Default | Description |
|---|
WALLET_PRIVATE_KEY | Yes | — | Your wallet’s private key (hex with 0x prefix) |
CHAIN_ID | No | 8453 | Chain ID (8453 = Base mainnet, 84532 = Base Sepolia) |
RPC_URL | No | https://mainnet.base.org | RPC endpoint URL |
The wallet server exposes tools via Coinbase AgentKit:
get_wallet_details
Returns the wallet’s public address, chain info, and native balance.
Response:
{
"address": "0x1234...abcd",
"chain": "base",
"chain_id": 8453,
"balance": "0.005 ETH"
}
get_balance
Returns token balances including native (ETH) and ERC-20 tokens (USDC).
Parameters:
| Parameter | Type | Description |
|---|
asset_id | string | Token to check (e.g., "usdc", "eth") |
Response:
{
"balance": "25.50",
"symbol": "USDC",
"address": "0x1234...abcd"
}
transfer
Sends native tokens or ERC-20 tokens to a recipient address. Signs and broadcasts the transaction.
| Parameter | Type | Description |
|---|
amount | string | Amount to send (human-readable) |
asset_id | string | Token to send ("usdc", "eth") |
destination | string | Recipient address |
Response:
{
"tx_hash": "0xabc...",
"status": "success"
}
sign_message
Signs a message using EIP-191 personal sign. Used for wallet-based authentication with ACN.
| Parameter | Type | Description |
|---|
message | string | The message to sign |
Response:
{
"signature": "0x...",
"address": "0x1234...abcd"
}
Security Model
The Wallet MCP server is designed with security as the top priority:
- Runs as a local stdio process — no network server, no exposed ports
- Private key is held in memory only — never written to disk or sent to ACN
- Uses Coinbase AgentKit’s
ViemWalletProvider — proven, audited signing logic
- Each tool call is explicit — the agent must ask for a signature, the tool doesn’t sign automatically
- Only outbound connections are to the configured RPC URL
The Wallet MCP server is the only component that touches your private key. The ACN MCP server and ACN platform never see your private key.
Typical Flow
- Agent discovers a service via ACN MCP →
acn_discover
- Agent calls the provider tool → ACN returns
payment_required with payment details
- Agent calls
transfer → Wallet MCP sends USDC payment on-chain
- Agent calls
acn_submit_payment with the tx hash → ACN verifies and executes the call
The private key never leaves your machine. ACN only receives the transaction hash.
Alternative: Direct AgentKit
If you prefer to use Coinbase AgentKit directly without the acn-agent CLI:
{
"mcpServers": {
"wallet": {
"command": "npx",
"args": ["@coinbase/agentkit-model-context-protocol"],
"env": {
"WALLET_PRIVATE_KEY": "0x...",
"CHAIN_ID": "8453"
}
}
}
}
This provides the same tools but without ACN-specific configuration defaults.