Are you the author? Sign in to claim
mcp-server-usdd
An MCP server for the USDD protocol across TRON, Ethereum, and BNB Smart Chain (plus internal testnets). Covers Vault/CDP, PSM, USDD Savings, token transfers, and protocol analytics.
Current implementation covers:
| Network | Key | Notes |
|---|---|---|
| TRON | tron | TRON-native vault and PSM support |
| Ethereum | eth | Vault, PSM, USDD Savings |
| BNB Smart Chain | bsc | Mirrors ETH deployment structure |
| TRON Nile | tron_nile | Internal testnet deployment |
| Ethereum Sepolia | eth_sepolia | Internal testnet deployment |
| BSC Testnet | bsc_testnet | Internal testnet deployment |
TRONGRID_API_KEY for more reliable TRON accessTRON_FULL_NODE and TRON_NILE_FULL_NODEETH_RPC_URLBSC_RPC_URLETH_SEPOLIA_RPC_URL and BSC_TESTNET_RPC_URLgit clone https://github.com/decentralized-usd/mcp-server-usdd
cd mcp-server-usdd
npm install
npm start
npm run start:http
npm run dev
The server supports two signing modes:
~/.agent-wallet/.For TRON writes, each Claude session shows a one-time signing-mode confirmation reminder before the first write.
You can also manage wallets via CLI or MCP tools:
The server uses @bankofai/agent-wallet for encrypted local wallet storage. On first startup it will automatically initialize ~/.agent-wallet/ and create a default wallet if none exists.
# Import an existing private key or mnemonic
npx agent-wallet add
# Generate a new wallet
npx agent-wallet generate
# List all wallets
npx agent-wallet list
# Switch active wallet
npx agent-wallet activate <wallet-id>
| Tool | Description |
|---|---|
get_wallet_address | Shows current address |
connect_browser_wallet | Connect TronLink / browser wallet for signing |
set_wallet_mode | Switch between browser and agent signing |
get_wallet_mode | Show current signing mode and addresses |
list_wallets | List wallets with per-family active status (tron and evm) |
set_active_wallet | Switch active wallet by ID, optionally scoped by walletType (tron/evm) |
Add the following config to:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"mcp-server-usdd": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@usdd/mcp-server-usdd"],
"env": {
"TRONGRID_API_KEY": "your_trongrid_api_key"
}
}
}
}
Create .mcp.json in the project root directory:
{
"mcpServers": {
"mcp-server-usdd": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@usdd/mcp-server-usdd"],
"env": {
"TRONGRID_API_KEY": "your_trongrid_api_key"
}
}
}
}
Add to .cursor/mcp.json:
{
"mcpServers": {
"mcp-server-usdd": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@usdd/mcp-server-usdd"],
"env": {
"TRONGRID_API_KEY": "your_trongrid_api_key"
}
}
}
}
For live RPC reads, the server also accepts TRON_FULL_NODE, TRON_NILE_FULL_NODE, ETH_RPC_URL, ETH_SEPOLIA_RPC_URL, BSC_RPC_URL, and BSC_TESTNET_RPC_URL. Protocol address lookup is Chainlog-backed: get_protocol_addresses uses a local Chainlog cache when fresh, refreshes from the on-chain Chainlog when needed, and falls back to a complete cache if live RPC is rate-limited. Chainlog root defaults are included for all supported networks and can be overridden with TRON_CHAINLOG_ADDRESS, TRON_NILE_CHAINLOG_ADDRESS, ETH_CHAINLOG_ADDRESS, ETH_SEPOLIA_CHAINLOG_ADDRESS, BSC_CHAINLOG_ADDRESS, and BSC_TESTNET_CHAINLOG_ADDRESS.
| Tool | Description | Write? |
|---|---|---|
get_supported_networks | List supported networks | No |
set_network | Set default network for one family (tron/eth/bsc), supports aliases like mainnet, nile | Yes |
get_network | Get per-family default networks | No |
get_wallet_mode | Get active wallet signing mode (agent/browser) | No |
set_wallet_mode | Switch active signing mode | Yes |
connect_browser_wallet | Connect a browser wallet and activate browser mode | Yes |
get_wallet_address | Show current address for the target network | No |
list_wallets | List wallets and per-family active pointers (tron/evm) | No |
set_active_wallet | Switch active wallet by ID (supports optional walletType) | Yes |
import_wallet | Import private key/mnemonic into encrypted local store | Yes |
| Tool | Description | Write? |
|---|---|---|
get_protocol_addresses | Show Chainlog-backed protocol addresses, configured ilks, and PSM markets | No |
get_chainlog_address | Resolve one Chainlog key such as MCD_USDD or MCD_JOIN_ETH_A | No |
get_protocol_overview | Show live protocol ceilings and debt metrics alongside configured deployments | No |
get_supported_ilks | List configured collateral types and PSM joins | No |
get_native_balance | Read native balance (TRX / ETH / BNB) | No |
get_token_balance | Read ERC20/TRC20 balance | No |
check_allowance | Read ERC20/TRC20 allowance and compare against an optional amount | No |
approve_token | Approve token allowance | Yes |
| Tool | Description | Write? |
|---|---|---|
get_oracle_status | Inspect oracle and liquidation configuration for an ilk | No |
get_user_vaults | List vault IDs for a wallet | No |
get_vault_summary | Show collateral, debt, and liquidation metrics | No |
analyze_vault_risk | Summarize risk with warnings | No |
open_vault | Open a new vault via DSProxy | Yes |
deposit_and_mint | Open-and-mint or add collateral and mint | Yes |
mint_usdd | Draw more USDD from a vault | Yes |
repay_usdd | Repay vault debt | Yes |
withdraw_collateral | Withdraw collateral from a vault | Yes |
close_vault | Wipe all debt and free collateral | Yes |
| Tool | Description | Write? |
|---|---|---|
get_psm_status | Inspect PSM fees and enablement | No |
get_psm_metrics | Get PSM swap metrics by route (fromToken/toToken/available/fee) | No |
psm_swap_to_usdd | Swap gem into USDD | Yes |
psm_swap_from_usdd | Swap USDD into gem | Yes |
| Tool | Description | Write? |
|---|---|---|
get_savings_status | Show USDD Savings metrics | No |
deposit_savings | Deposit USDD into sUSDD | Yes |
withdraw_savings | Withdraw USDD from sUSDD | Yes |
Two-step preview → confirm flow for safe asset transfers. The AI must present the transfer details to the user and wait for explicit confirmation before executing.
| Tool | Description | Write? |
|---|---|---|
prepare_token_transfer | Preview a native or token transfer; returns a confirmationId and transfer details for user review | No |
confirm_token_transfer | Execute a previously prepared transfer after user has explicitly confirmed | Yes |
Supports:
Read-only analytics from mainnet data feeds.
| Tool | Description | Write? |
|---|---|---|
get_protocol_metrics | Aggregated USDD protocol metrics (mainnet) | No |
get_chain_metrics | Chain-level metrics for tron, eth, or bsc | No |
get_collateral_prices | Latest collateral highest-price data from website API | No |
get_psm_metrics | PSM route metrics: fromToken, toToken, available liquidity, fees | No |
| Tool | Description | Write? |
|---|---|---|
get_treasury_summary | Latest USDD treasury report summary (mainnet) | No |
get_jst_buyback_stats | JST buyback and burn statistics from treasury data | No |
| Tool | Description | Write? |
|---|---|---|
get_smart_allocator_overview | Smart Allocator overview: debt, invested amount, earnings, APY | No |
get_assets_breakdown | Invested-asset breakdown by protocol, network, or asset | No |
get_proof_of_reserve | Proof-of-reserve style platform investment details | No |
get_debt_overview | Debt overview grouped by network vault | No |
| Prompt | Description |
|---|---|
open_usdd_vault | Open a vault and verify post-trade risk |
manage_vault_lifecycle | Run full vault lifecycle flows |
use_psm | Use PSM with fee checks |
use_savings | Use USDD Savings with inspection and verification |
review_vault_risk | Explain risk for a vault |
repay_and_close_vault | Repay and close with verification |
mcp-server-usdd/
├── src/
│ ├── core/
│ │ ├── chains.ts
│ │ ├── abis.ts
│ │ ├── tools.ts
│ │ ├── prompts.ts
│ │ ├── resources.ts
│ │ ├── browser-signer.ts
│ │ └── services/
│ │ ├── clients.ts
│ │ ├── contracts.ts
│ │ ├── protocol.ts
│ │ ├── vault.ts
│ │ ├── psm.ts
│ │ ├── savings.ts
│ │ ├── tokens.ts
│ │ ├── transfer.ts ← token/native transfer (prepare + confirm)
│ │ ├── treasury.ts ← treasury report and JST buyback stats
│ │ ├── smart-allocator.ts ← Smart Allocator analytics
│ │ ├── website-metrics.ts ← protocol metrics, chain metrics, collateral prices
│ │ ├── wallet.ts
│ │ └── utils.ts
│ ├── index.ts
│ └── server/
│ ├── server.ts
│ └── http-server.ts
└── build/
network argument. If the user has not named a chain, ask which network to use before calling any chain-dependent tool; do not infer TRON or use set_network defaults as an implicit choice.approve_token first.tron, tron_nile) via tronlink-signer (TronLink/TIP-6963 flow). EVM networks currently continue to use agent-wallet signing.deposit_and_mint is idempotent with respect to vault creation: it checks for an existing vault for the given ilk before opening a new one. If no vault exists, it submits two separate transactions — open then lockGemAndDraw — to avoid combined-tx reliability issues on TRON.prepare_token_transfer returns a preview and confirmationId; confirm_token_transfer executes only after the user explicitly approves. Pending confirmations expire after 10 minutes.get_protocol_metrics, get_chain_metrics, get_collateral_prices, etc.) read from mainnet data feeds only — they do not reflect testnet state.~/.agent-wallet/.AGENT_WALLET_PASSWORD is intended for automation and CI environments.approve_token.Vault
get_supported_ilks with network=eth and summarizes the supported vault collateral types.open_usdd_vault: checks wallet, reviews oracle status, executes deposit_and_mint (auto-opens a new vault if none exists for that ilk), then verifies the new vault risk.get_vault_summary and analyze_vault_risk, then explains the health factor and collateral buffer.manage_vault_lifecycle with action=repay: checks USDD balance and allowance, calls repay_usdd, then verifies the updated vault state.repay_and_close_vault: checks debt, balance, allowance, calls close_vault, then confirms the vault state after repayment.PSM
get_psm_status with network=eth and reports fee-in, fee-out, and whether swaps are enabled.get_psm_metrics with the PSM-USDT market and reports available amounts and fees for both directions.use_psm: checks PSM status, then calls psm_swap_to_usdd and reports the transaction result.get_psm_status, then executes psm_swap_from_usdd and reminds the user to re-check balances.Token & Balances
get_protocol_addresses to identify the USDD token address from Chainlog/cache, then calls get_token_balance.check_allowance with the token and PSM spender, then suggests approve_token only if needed.prepare_token_transfer and displays the transfer preview (from, to, amount, balance). After the user confirms, AI calls confirm_token_transfer to execute.prepare_token_transfer for native ETH, presents the details, then waits for user approval before executing.USDD Savings
get_savings_status and summarizes total assets, savings rate, and wallet shares.use_savings: checks savings status, calls deposit_savings, then re-checks savings metrics.get_savings_status, executes withdraw_savings, and confirms the updated share balance.Protocol Analytics
get_protocol_metrics and reports total collateral, debt ceiling, and utilization.get_chain_metrics with chain=tron and summarizes collateral breakdown and USDD supply on TRON.get_collateral_prices and lists each collateral type with its current highest price.Treasury & Smart Allocator
get_treasury_summary and reports reserve breakdown, collateral ratio, and recent changes.get_jst_buyback_stats and summarizes cumulative JST buyback volume and burn totals.get_smart_allocator_overview and reports total debt allocated, current invested amount, accumulated earnings, and APY.get_assets_breakdown with dimension=protocol and lists each DeFi protocol with its allocated amount.get_proof_of_reserve and details each platform investment with amounts and verification status.get_debt_overview and summarizes debt positions grouped by TRON/ETH/BSC vaults.MIT License Copyright (c) 2026 USDD
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows