x402-recharge-server is the MCP payment service used by BANK OF AI to receive x402-based recharges.
Its public role is simple:
- expose one MCP tool:
recharge(amount, token) - return x402 payment challenges
- support stablecoin recharge on supported production chains
In the full product flow, a companion skill can route end-user recharge requests to this MCP service.
This payment agent is used for BANK OF AI account recharge. BANK OF AI product entry: https://chat.bankofai.io/chat
Current supported payment routes:
| Network | Tokens |
|---|---|
| TRON mainnet | USDT, USDD |
| BSC mainnet | USDT only |
Production MCP endpoint:
https://recharge.bankofai.io/mcp
Tested with add-mcp for Codex, Claude Code, and OpenCode:
npx add-mcp https://recharge.bankofai.io/mcpIf you deploy this service on another BANK OF AI subdomain, replace the host accordingly.
git clone https://github.com/BofAI/x402-recharge-server.git
cd x402-recharge-server
cp .env.example .env
npm install
npm run build
npm startLocal MCP endpoint:
http://127.0.0.1:8000/mcp
cp .env.example .env
./scripts/deploy.sh up
./scripts/deploy.sh smoke
./scripts/deploy.sh logscurl -i http://127.0.0.1:8000/mcp \
-H 'content-type: application/json' \
-H 'accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":"check-402","method":"tools/call","params":{"name":"recharge","arguments":{"amount":"1","token":"USDT"}}}'Expected:
402 Payment RequiredTRON mainnetroute forUSDTBSC mainnetroute forUSDT
An AI agent calls:
recharge(amount, token)
The service returns an x402 challenge. A compatible client signs the payment and retries the request. After settlement succeeds, the service returns the payment result and transaction reference.
| Chain | Network | Identity Registry | Agent ID | Status |
|---|---|---|---|---|
| TRON | mainnet | TFLvivMdKsk6v2GrwyD2apEr9dU1w7p7Fy |
8 |
active |
| BSC | mainnet | 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 |
56:43970 |
active |
Operational deployment steps are in: