Kaskad Protocol MCP Server
kaskad-mcp
MCP (Model Context Protocol) server for Kaskad Protocol — reads live on-chain state from the Igra Galleon Testnet, executes transactions, and exposes tokenomics data via 11 tools.
Tools
Tool | Description |
| Live APY, utilization, liquidity for all active reserves |
| Wallet collateral, debt, health factor, supplied/borrowed positions, staking balance |
| Live DAO-voted parameters from KaskadGovernor (emission split, eligibility thresholds, treasury ratios) |
| KSKD emission state: epoch, vault depletion, supplier/borrower split, TWAL TVL |
| Claimable KSKD rewards for a wallet address |
| Static metadata + full AGENTS.md integration guide |
| Subgraph data: liquidations, APY snapshots, user transaction history |
| Supply an asset into the lending pool |
| Borrow an asset against collateral |
| Repay outstanding debt |
| Withdraw supplied assets |
Related MCP server: Graph AAVE MCP
Quick Start
npm install
npm run build
npm test # 19 unit tests (pure functions, no network)
node dist/index.jsWallet Setup
Security — read before proceeding
The MCP server requires a private key to sign transactions. Always use a dedicated testnet wallet with no real funds. Never use a wallet that holds mainnet assets.
Never commit your private key to git. The
credentials/directory is gitignored.
The server requires a wallet private key to sign transactions. Use MCP_WALLET_KEY — it is the only recommended method.
Recommended — Environment variable
export MCP_WALLET_KEY=0xYOUR_TESTNET_PRIVATE_KEY
node dist/index.jsFor MCP clients (Claude Desktop, OpenClaw, etc.), inject it via the env block in your client config (see MCP Client Config section below). The key never touches the filesystem.
Why not
wallet.json? The server also supportscredentials/wallet.jsonand~/.kaskad-mcp/wallet.jsonas fallback paths for local development convenience. However, Anton (SC Architect) flagged these as an unnecessary attack surface — file-based key storage introduces git-commit risk, filesystem exposure, and misconfigured permission vectors. Do not usewallet.jsonin any shared, CI, or production-adjacent environment. If you must use a file locally, ensurecredentials/stays gitignored (it is by default) and restrict file permissions (chmod 600).
Trust boundary: The server enforces a minimum 100 iKAS reserve in the wallet at all times (to cover gas fees).
MCP Client Config
Add to your MCP client (e.g. Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"kaskad": {
"command": "node",
"args": ["/path/to/kaskad-mcp/dist/index.js"],
"env": {
"MCP_WALLET_KEY": "0xYOUR_PRIVATE_KEY"
}
}
}
}Network
Property | Value |
Chain ID | 38836 |
Network | Igra Galleon Testnet |
RPC |
|
Explorer |
|
dApp |
|
Gas note: Igra Galleon requires minimum 2000 Gwei gas price.
eth_estimateGasunderestimates — all transactions use staticgasLimit: 1_700_000n.
Contract Addresses (current deploy)
Contract | Address |
Pool |
|
PoolAddressesProvider |
|
PriceOracle |
|
UIPoolDataProvider |
|
RewardsController |
|
ActivityTracker |
|
EmissionManager |
|
EmissionVault |
|
KaskadGovernor |
|
stKSKD Vault |
|
WrappedTokenGateway |
|
Token | Address |
USDC |
|
WETH |
|
WBTC |
|
IGRA |
|
WIKAS (iKAS) |
|
KSKD |
|
Architecture
src/
├── abi/ # ABI JSON fragments from Foundry artifacts
├── contracts.ts # Addresses, token registry, dead pool list
├── rpc.ts # Raw JSON-RPC client (fetch-based, no ethers Provider)
├── typed-contracts.ts # Typed wrappers (Pool, Oracle, ERC20, Governor, Rewards, etc.)
├── index.ts # MCP server + health HTTP endpoint
└── tools/
├── getMarkets.ts
├── getPosition.ts
├── getGovernanceParams.ts
├── getTokenomics.ts # getEmissions + getUserRewards
├── getHistory.ts # Subgraph queries
├── getProtocolInfo.ts
└── executeTransaction.ts # supply/borrow/repay/withdrawMaintenance Notes
APY formula:
currentLiquidityRatefromgetReserveDatais in RAY (1e27).rate / 1e25 = APY%. Do NOT multiply by seconds_per_year.Dead pools: 7 deprecated reserve addresses from prior deploys are filtered from all output.
iKAS: Native gas token. Balance via
provider.getBalance(), not ERC20. WIKAS is the wrapped form used by the pool.Address updates: After testnet redeploy, re-extract from dApp bundle (
/assets/index-*.js) and updatesrc/contracts.ts.
Available Tools
17 toolsborrowA
Borrow an asset from the Kaskad Protocol lending pool. Requires sufficient collateral. Uses variable rate by default. Trust boundary: max 10% of available borrows per action. Testnet only.
Inputs: asset (required), amount (required), interestRateMode.
checkHealthFactorA
Check a wallet's health factor against a threshold. Returns alert:true if HF is below threshold. Use in agent monitoring loops: call on a cron interval and trigger repay() or supply() when alert:true. Alert levels: safe | warning (below threshold) | danger (HF < 1.2) | critical (HF < 1.05, liquidation imminent).
Inputs: address (required), threshold.
claimRewardsA
Claim all accrued KSKD rewards for the MCP wallet from the RewardsController. Checks claimable balance first - skips the transaction if nothing to claim. Rewards are earned by meeting epoch uptime and minimum position thresholds.
Inputs: no named parameters.
getEmissionsA
Returns KSKD emission state: current epoch, emission vault balance (remaining vs total), epoch timing, supplier/borrower split, and TWAL TVL from activity tracker. Use this to understand current emission APY context and vault depletion trajectory.
Inputs: no named parameters.
getGovernanceParamsA
Returns live DAO-voted governance parameters from KaskadGovernor (last finalized epoch). Includes: EMISSION_SUPPLIERS_SHARE_BPS (supplier vs borrower KSKD split), eligibility thresholds, treasury allocation ratios, and undistributed emission recycling rate. ALWAYS call this before strategizing positions — these params directly affect KSKD emission yield.
Inputs: no named parameters.
getHistoryB
Returns historical data from the Kaskad Protocol subgraph: recent liquidations, current market APY snapshots, and optionally a user's transaction history (supplies, borrows, repays) and active positions over time. Pass an address to get user-specific history.
Inputs: limit, address.
getMarketsA
Returns the current state of all Kaskad Protocol lending markets on the Igra Galleon Testnet. Includes supply/borrow APY, total supply/borrow in USD, utilization rate, and available liquidity for each asset.
Inputs: no named parameters.
getPositionB
Returns a wallet's current lending/borrowing position on Kaskad Protocol. Includes total collateral, total debt, available borrows, health factor, and per-asset breakdown.
Inputs: address (required).
getProtocolInfoA
Returns static metadata about Kaskad Protocol: network info, contract addresses, supported assets, documentation links, and the full AGENTS.md integration guide (includes emission schedule, eligibility rules, gas requirements, and strategy context).
Inputs: no named parameters.
getStakingInfoA
Get stKSKD vault state for a wallet: stKSKD balance, KSKD wallet balance, holding duration.
Inputs: address (required).
getUserRewardsA
Returns claimable KSKD rewards for a wallet address. Shows accrued and claimable amounts from emission incentives. Eligibility requires meeting uptime and minimum position thresholds.
Inputs: address (required).
repayA
Repay a borrowed asset on Kaskad Protocol. Pass amount=-1 to repay full debt. Testnet only.
Inputs: asset (required), amount (required), interestRateMode.
setCollateralA
Enable or disable an asset as collateral for the connected wallet on Kaskad Protocol. Required to switch between isolated (WiKAS/IKAS) and standard collateral modes. In Aave v3 isolation mode, only one isolated asset can be active as collateral at a time — disable other collaterals first before enabling an isolated asset.
Inputs: asset (required), useAsCollateral (required).
stakeKSKDA
Stake KSKD tokens into the stKSKD vault (1:1). Grants governance eligibility (isEligibleSupplier / isEligibleBorrower). Requires MCP_WALLET_KEY.
Inputs: amount (required).
supplyA
Supply (deposit) an asset into the Kaskad Protocol lending pool. Earns supply APY. Trust boundary: max 10% of wallet balance per asset per action. Testnet only.
Inputs: asset (required), amount (required).
unstakeKSKDA
Unstake stKSKD shares back to KSKD (1:1). Warning: if balance drops to 0, governance eligibility resets. Requires MCP_WALLET_KEY.
Inputs: shares (required).
withdrawA
Withdraw a supplied asset from the Kaskad Protocol lending pool. Pass amount=-1 to withdraw all. Testnet only.
Inputs: asset (required), amount (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Each tool targets a distinct operation or data query, and pairs like getUserRewards/claimRewards or getPosition/checkHealthFactor are clearly separated by action versus state or threshold alerting. No true duplicates exist, though a few overlapping data points (APY, health factor) appear in multiple tools.
Most names follow a verbNoun camelCase pattern, but the verb style is inconsistent: core lending actions use bare verbs (supply, borrow, repay, withdraw), while queries use get*, monitoring uses check*, and staking tools embed the asset name (stakeKSKD) unlike the lending verbs. The pattern is readable but not uniform enough for a higher score.
17 tools is on the higher end of the ideal range but is well-scoped for a lending protocol that also includes staking, emissions, governance parameters, and rewards. Each tool covers a distinct part of the domain and none feels redundant or gratuitous.
The tool surface covers the full lending lifecycle—supply, borrow, repay, withdraw, collateral management—plus health factor monitoring, rewards claiming, staking, and protocol context. There are no obvious missing operations that would prevent an agent from executing or monitoring core protocol flows.
Maintenance
Related MCP Connectors
HiveCapital MCP Server — autonomous investment layer for AI agents
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP server providing unified access to over 144 tools for lending, trading, and staking across six major DeFi protocols on the Stacks Bitcoin Layer 2. It enables AI agents to perform complex blockchain operations and interact with the DeFi ecosystem using natural language commands.3MIT
- AlicenseAqualityCmaintenanceMCP server for querying AAVE V2/V3 lending protocol and governance data via The Graph subgraphs. Exposes 14 tools and 5 guided prompts that any AI agent (Claude, Cursor, Copilot, etc.) can use to query lending markets, user positions, health factors, liquidations, flash loans, rate history, and AAVE governance — across 7 chains (Ethereum, Base, Arbitrum, Polygon, Optimism, Avalanche, Fantom) via40339 npm2MIT
- AlicenseNot gradedqualityDmaintenanceMCP (Model Context Protocol) server for the MAIN DEX on Base. Provides AI agents (Claude, Cursor, etc.) with tools to interact with the protocol: swap tokens, manage liquidity, enter/exit ALM strategies(10% APY), and more.MIT
- AlicenseNot gradedqualityDmaintenanceAgent-native, self-hosted MCP server for crypto trading and DeFi management. Enables agents to query balances, execute trades, and manage positions with a policy engine and secure key storage.8Apache 2.0