ironclaw-mcp-server
v1.0.0
Published
MCP server for IronClaw Bank - autonomous lending protocol on HSK Testnet (Chain ID: 133).
Readme
IronClaw MCP Server
MCP server for IronClaw Bank - autonomous lending protocol on HSK Testnet (Chain ID: 133).
Features
Lending Tools (9 tools)
| Tool | Description |
|------|-------------|
| ironclaw_supply | Supply tokens to a lending market |
| ironclaw_borrow | Borrow tokens from a market |
| ironclaw_redeem | Redeem cTokens for underlying |
| ironclaw_repay | Repay borrowed tokens |
| ironclaw_enter_market | Enter a market as collateral |
| ironclaw_get_markets | Get all market info (TVL, APY) |
| ironclaw_get_account_liquidity | Check account health factor |
| ironclaw_check_allowance | Check token allowance for cToken |
| ironclaw_approve | Approve cToken spending |
DEX Tools (2 tools)
| Tool | Description |
|------|-------------|
| ironclaw_swap | Swap USDT <> IRONCLAW on DEX (5% slippage) |
| ironclaw_get_swap_quote | Get swap quote before executing |
Token Tools (2 tools)
| Tool | Description |
|------|-------------|
| ironclaw_burn_token | Burn IRONCLAW tokens |
| ironclaw_mint_token | Mint test tokens (USDT, WHSK) |
Price Tools (1 tool)
| Tool | Description |
|------|-------------|
| ironclaw_get_all_prices | Get all token prices (USDT=$1, IRONCLAW from DEX, WHSK=$0.14) |
Wallet Tools (2 tools)
| Tool | Description |
|------|-------------|
| ironclaw_get_wallet_info | Get wallet address and token balances |
| ironclaw_send_erc20 | Send ERC20 tokens |
Total: 16 tools
Installation
npm install
npm run buildConfiguration
Create .env file:
CHAIN_ID=133
RPC_URL=https://testnet.hsk.xyz
AGENT_MODE=readonly
# PRIVATE_KEY=your_private_key_here (for transaction mode)Usage
node dist/index.jsContract Addresses (HSK Testnet)
| Contract | Address |
|----------|---------|
| System | |
| Comptroller | 0xe16fc30ed366bda7764b37f7e1f3e7967377b36a |
| PriceOracle | 0x3e5957426b53ce61473a03313ab00e9b38d1394b |
| InterestRateModel | 0x1eb2f36cc5d19196855eac446f3db9002441abfb |
| cTokens | |
| cUSDT | 0x2dff0b38df9334c0aad2cf48f2016e1baac6f743 |
| cIRONCLAW | 0x173a5339abea3b1b0cb99c78fbfdfe2e652ec7a2 |
| cWHSK | 0x789add591489a60993e8aa827b67d51ece060c99 |
| Tokens | |
| USDT | 0x1514df4c03058624a0226ecc9b03b4f30ba4753 |
| IRONCLAW | 0xffa94555f448964d67483aae242f9acf3331daf7 |
| WHSK | 0x1a8e1e91c73b9fc5c19b8b04cf7b174670c6f6b7 |
| DEX | |
| Router | 0xcf71fc8a2b479c8e6d622c694afb2733fa2c5087 |
| Factory | 0x0ef6f40d7f5b05e6008f723ac2492ecb4c99c760 |
Supported Tokens
- Lending Markets: USDT, IRONCLAW, WHSK
- DEX Swap: Only USDT <> IRONCLAW pair is supported
Price Calculation
- USDT: Fixed at $1.00
- IRONCLAW: From DEX
getAmountsOut(1e6, [USDT, IRONCLAW])or fallback $0.10 - WHSK: Hardcoded fallback $0.14
Interest Rate Model
Uses JumpRateModelV2_Time with time-based interest (SECONDS_PER_YEAR = 31,536,000).
Network
- Chain ID: 133 (HSK Testnet)
- RPC: https://testnet.hsk.xyz
- Explorer: https://testnet-explorer.hsk.xyz
