clawpay — Claude Code MCP server: payments and setup
This MCP server gives AI agents wallet operations, x402 payments, and token actions. Use it when an agent must pay for requests or move funds.
claude mcp add --env AGENT_PRIVATE_KEY=<AGENT_PRIVATE_KEY> --env BASE_RPC_URL=<BASE_RPC_URL> --transport stdio clawpay -- npx -y clawpay-mcpWhat clawpay does
clawpay runs as a stdio MCP server and exposes tools for wallet management, x402 payments, spending policies, tokens, swaps, and transaction history. An agent can deploy or inspect a wallet, send a payment, check a budget, and work with token transfers through the connected client.
The setup uses AGENT_PRIVATE_KEY; wallet operations also need a wallet address, while BASE_RPC_URL can be supplied for the RPC endpoint. The signing key is loaded into the local Node.js process, and spending checks are enforced at the application layer. Keep the owner key separate from the agent key when human approval must remain meaningful, and test fund-moving actions on Base Sepolia first.
What it helps with
- configure a wallet for an AI agent
- send an x402 payment
- check a spending budget before a transfer
- read wallet transaction history
- swap or transfer tokens
Example prompts for the agent
- Connect
clawpayand show the wallet balance. - Pay for this request through x402 using the configured wallet.
- Check the spending budget before sending the transfer and stop if the policy blocks it.
How to install clawpay
Platform CLI
claude mcp add --env AGENT_PRIVATE_KEY=<AGENT_PRIVATE_KEY> --env BASE_RPC_URL=<BASE_RPC_URL> --transport stdio clawpay -- npx -y clawpay-mcpReplace <…> with your own values
Platform CLI
codex mcp add clawpay --env AGENT_PRIVATE_KEY=<AGENT_PRIVATE_KEY> --env BASE_RPC_URL=<BASE_RPC_URL> -- npx -y clawpay-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"clawpay": {
"command": "npx",
"args": [
"-y",
"clawpay-mcp"
],
"env": {
"AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>",
"BASE_RPC_URL": "<BASE_RPC_URL>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"clawpay": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"clawpay-mcp"
],
"env": {
"AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>",
"BASE_RPC_URL": "<BASE_RPC_URL>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e AGENT_PRIVATE_KEY=<AGENT_PRIVATE_KEY> -e BASE_RPC_URL=<BASE_RPC_URL> clawpay npx -y clawpay-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about clawpay
How do I install clawpay in Claude Code?
Run claude mcp add clawpay -e AGENT_PRIVATE_KEY=<AGENT_PRIVATE_KEY> -- npx -y clawpay-mcp. The signing key is passed through an environment variable.
What does clawpay do?
It exposes MCP tools for wallets, x402 payments, spending rules, token operations, swaps, and transaction history. An AI agent can call these tools through its MCP client.
Which networks does clawpay support for wallet runtime configuration?
The current wallet configuration supports Base mainnet and Base Sepolia. Payment, swap, bridge, and escrow actions can move funds and use gas.