DorkFiMCP
Provides tools for interacting with the DorkFi lending protocol on Algorand, including market discovery, user positions, health factors, liquidation candidates, TVL analytics, and transaction preparation (deposit, borrow, repay, withdraw, liquidate).
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DorkFiMCP show me liquidation candidates on Voi"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DorkFiMCP
Protocol MCP server for the DorkFi lending protocol on Voi and Algorand.
Architecture
DorkFiMCP is a protocol-level MCP that sits above the infrastructure MCP layer:
UluCoreMCP / UluVoiMCP / UluAlgorandMCP / UluWalletMCP / UluBroadcastMCP
↓
DorkFiMCP
↓
DorkFi API (reads)
On-chain (writes)Data sources:
DorkFi API (
dorkfi-api.nautilus.sh) — Pre-indexed market data, user health factors, TVL, and position data. Used for all read operations.On-chain (algod) — Used for transaction preparation (suggested params, ABI encoding).
DorkFiMCP handles:
Market discovery with live data from the DorkFi API
User position queries with pre-computed health factors
Liquidation candidate scanning (202+ indexed users on Voi)
TVL analytics across all chains and pools
Transaction preparation (unsigned)
DorkFiMCP does NOT:
Sign transactions (use UluWalletMCP)
Broadcast transactions (use UluBroadcastMCP)
Manage wallets
Related MCP server: Tinyman MCP
Tools
Markets
Tool | Description |
| List lending markets with live rates, deposits, borrows, and prices |
| Get total value locked per market and aggregate totals |
Positions
Tool | Description |
| Get a user's positions with per-pool health factors |
| Check health factor and risk level per pool |
Liquidations
Tool | Description |
| Find undercollateralized accounts from pre-indexed health data |
Transaction Preparation
Tool | Description |
| Build unsigned transactions to deposit (supply) tokens |
| Build unsigned transactions to borrow tokens |
| Build unsigned transactions to repay debt |
| Build unsigned transactions to withdraw supplied tokens |
| Build unsigned transactions to liquidate a position |
Agent Workflow
Agent calls DorkFiMCP: deposit_txn(chain, symbol, amount, sender)
→ returns { transactions: [base64, ...] }
Agent calls UluWalletMCP: wallet_sign_transactions(signerId, transactions)
→ returns signed transactions
Agent calls UluBroadcastMCP: broadcast_transactions(network, txns)
→ returns transaction IDsChain Support
All tools accept a chain parameter:
"voi"— Voi mainnet (pools: 47139778, 47139781)"algorand"— Algorand mainnet (pools: 3333688282, 3345940978)
Project Structure
index.js MCP server entry point (11 tools)
lib/
api.js DorkFi API client (dorkfi-api.nautilus.sh)
client.js Algod client factory, ABI definitions, simulation helpers
markets.js Market data from API with symbol resolution
positions.js User positions and health factors from API
liquidation.js Liquidation candidates from pre-indexed health data
builders.js Unsigned transaction group builders (on-chain)
data/
contracts.json Chain configs, pool IDs, and token definitionsSetup
npm installRun
node index.jsOr configure as an MCP server in your agent:
{
"mcpServers": {
"dorkfi": {
"command": "node",
"args": ["/path/to/DorkFiMCP/index.js"]
}
}
}DorkFi API
Read operations use the DorkFi API which provides pre-indexed data:
Endpoint | Used by |
|
|
|
|
|
|
|
|
Supported Markets
Voi (22 markets across 2 pools)
Pool 47139778: VOI, aUSDC, UNIT, POW, aALGO, aETH, aBTC, acbBTC, WAD (borrow-only)
Pool 47139781: WAD, GM, CORN, SHELLY, BUIDL, F, NODE, AMMO, IAT, bVOI, NV, EV, FV
Algorand (29 markets across 2 pools)
Pool 3333688282: ALGO, USDC, UNIT, POW, goBTC, aVOI, wBTC, goETH, wETH, LINK, SOL, AVAX, WAD (borrow-only)
Pool 3345940978: WAD, FINITE, FOLKS, COOP, HOG, USDt, xUSD, MONKO, HAY, BRO, ALPHA, COMPX, AKTA, PEPE, GOLD$, TINY
On-Chain ABI
Transaction preparation uses the verified ABI from DorkFiLendingPoolClient.ts:
Method | Signature |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Known Limitations
WAD in multiple pools — WAD appears in two pools per chain.
findMarketreturns the first match. For borrow-only WAD pools, specify the pool ID explicitly if needed.Transaction groups — The
prepare_*tools build simplified transaction groups. The DorkFi frontend usesulujsCONTRACT class for more sophisticated group construction with automatic box funding and resource sharing.Price scale — Prices from the API use 18 decimal precision referenced against aUSDC = 1,000,000. USD values in health/position responses are approximated by dividing raw values by 10^12.
API freshness — Read data comes from the DorkFi API which periodically refreshes from on-chain state. For the most current data, the API's POST endpoints can trigger a fresh blockchain query.
Available Tools
21 toolsborrow_txnA
Build unsigned transactions to borrow tokens from a DorkFi lending market. Requires sufficient collateral. Returns base64-encoded transactions for signing.
Inputs: chain (required), amount (required), sender (required), symbol (required).
deposit_txnA
Build unsigned transactions to deposit (supply) tokens into a DorkFi lending market. Returns base64-encoded transactions for signing via UluWalletMCP.
Inputs: chain (required), amount (required), sender (required), symbol (required).
fetch_price_feed_txnA
Build unsigned transactions to fetch the latest oracle price for a DorkFi lending market. Calls fetch_price_feed(uint64) on the pool contract. Returns base64-encoded transactions for signing.
Inputs: chain (required), sender (required), symbol (required).
get_global_userA
Get a user's aggregate on-chain collateral and borrow values across all pools by calling the pool contract's get_global_user ABI method via algod simulate.
Inputs: chain (required), address (required).
get_health_factorA
Check a user's health factor and risk level per pool. Health factor <= 1.0 means the position is liquidatable.
Inputs: chain (required), address (required).
get_liquidation_candidatesA
Find accounts eligible for liquidation using pre-indexed health data. Returns those below the health factor threshold.
Inputs: chain (required), limit, addresses, threshold.
get_marketA
Get a single DorkFi lending market's full on-chain data by calling the pool contract's get_market ABI method via algod simulate.
Inputs: chain (required), symbol (required).
get_marketsA
List DorkFi lending markets with live data (rates, deposits, borrows, prices). Optionally filter by symbol.
Inputs: chain (required), symbol.
get_positionA
Get a user's DorkFi lending positions across all markets. Returns per-pool health factors and portfolio summary.
Inputs: chain (required), address (required), symbol.
get_tvlA
Get total value locked (TVL) across DorkFi lending pools. Returns TVL per market and aggregate totals.
Inputs: chain.
get_userB
Get a user's on-chain position data for a specific DorkFi lending market by calling the pool contract's get_user ABI method via algod simulate.
Inputs: chain (required), symbol (required), address (required).
get_usersA
List all DorkFi users with aggregate health factors, collateral, borrows, and risk levels. Sorted by health factor (most at-risk first).
Inputs: chain (required).
is_pausedA
Check if DorkFi lending pool contracts are paused by calling the is_paused ABI method via algod simulate. Returns pause status for each pool.
Inputs: chain (required).
liquidate_txnA
Build unsigned transactions to liquidate an undercollateralized position. The liquidator repays part of the debt and receives collateral at a bonus. Returns base64-encoded transactions for signing.
Inputs: chain (required), amount (required), sender (required), borrower (required), +2 more.
repay_all_txnA
Build unsigned transactions to repay a user's entire borrow balance for a DorkFi lending market. Queries the on-chain borrow amount, wraps tokens if needed, then calls repay_all. Returns base64-encoded transactions for signing.
Inputs: chain (required), sender (required), symbol (required).
repay_on_behalf_txnA
Build unsigned transactions to repay another user's borrowed tokens to a DorkFi lending market. The sender pays the debt on behalf of the borrower. Returns base64-encoded transactions for signing.
Inputs: chain (required), amount (required), sender (required), symbol (required), +1 more.
repay_txnA
Build unsigned transactions to repay borrowed tokens to a DorkFi lending market. Returns base64-encoded transactions for signing.
Inputs: chain (required), amount (required), sender (required), symbol (required).
sync_market_txnA
Build unsigned transactions to sync a DorkFi lending market's state (interest accrual, index updates). Calls sync_market(uint64) on the pool contract. Returns base64-encoded transactions for signing.
Inputs: chain (required), sender (required), symbol (required).
sync_user_market_for_price_change_txnA
Build unsigned transactions to sync a user's market position after an oracle price change. Updates the user's collateral and borrow values in the pool contract. Returns base64-encoded transactions for signing.
Inputs: user (required), chain (required), sender (required), symbol (required).
withdraw_reserves_txnA
Build unsigned transactions to withdraw accumulated reserves from a DorkFi lending market. Owner/admin only. Returns base64-encoded transactions for signing.
Inputs: chain (required), amount (required), sender (required), symbol (required).
withdraw_txnA
Build unsigned transactions to withdraw supplied tokens from a DorkFi lending market. Returns base64-encoded transactions for signing.
Inputs: chain (required), amount (required), sender (required), symbol (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Most tools are distinct, but get_position, get_user, get_global_user, and get_health_factor all return overlapping user position data with only subtle differences, which can confuse an agent. Market-level getters and transaction builders are clearer, but the user-data cluster creates real selection ambiguity.
The naming is highly consistent: read operations use the get_ prefix (except is_paused) and transaction builders use the _txn suffix. This predictable pattern makes the tool surface easy to navigate.
At 21 tools, this server sits in the heavy 16-25 range, which feels like more than a typical MCP surface. The count is defensible given the depth of lending operations, but some user getter tools could be consolidated to reduce redundancy.
The tool set covers the full lending lifecycle: market data, user positions, deposits, borrows, repayments, withdrawals, liquidation, and admin/keeper actions like syncing and reserve withdrawals. There are no obvious dead ends for the stated purpose.
Maintenance
Related MCP Connectors
Official Aave MCP for V3 and V4 markets, positions, governance, and transaction preparation.
Analyse crypto wallets (EVM, Solana, Bitcoin) and compare DeFi lending, borrowing and pool rates.
Market data for agents: perps, OI, funding, Solana wallet swaps. Paid per call in USDC over x402.
Leveraged-yield router on Morpho. List strategies, simulate, and build UNSIGNED txs.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with the Algorand blockchain through 25+ specialized tools for account management, payments, asset creation, NFT operations, and network monitoring. Supports both mainnet and testnet with instant finality and low fees.41 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Tinyman AMM protocol on Algorand blockchain, supporting pool management, token swaps, liquidity operations, and analytics for both v1.1 and v2 protocols.19 npm1MIT
- AlicenseBqualityDmaintenanceProvides AI assistants with access to real-time DeFi lending rates and yield data across 14+ protocols and multiple blockchains. Enables querying borrow/supply rates, comparing platforms, calculating leverage strategies, and finding best earn opportunities.629 npm4MIT
- AlicenseAqualityDmaintenanceEnables interaction with the DorkFi lending protocol on Voi and Algorand, supporting market discovery, position queries, liquidation scanning, and transaction preparation without signing or broadcasting.10MIT