lends-mcp-server
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LENDS_RPC_URL | No | RPC URL for on-chain read tools. Required only for on-chain read tools; transaction builders and math tools work offline. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| lends_assert_chainA | Verify that LENDS_RPC_URL serves the configured deployment chain. |
| lends_get_protocol_stateA | Read a block-consistent snapshot of public LENDS protocol and PSM state. |
| lends_get_marketsA | List configured collateral markets with risk parameters and oracle state. |
| lends_get_marketA | Read one collateral market by token address. |
| lends_get_positionB | Read a borrower's collateral position and derived debt, health, and capacity. |
| lends_get_staking_stateA | Read public sleUSD pool, capacity, cooldown, claim, and vesting state. |
| lends_get_unstake_requestA | Read one sleUSD unstake request by unsigned request ID. |
| lends_get_liquidation_planA | Read liquidation eligibility and projected coverage without executing liquidation. |
| lends_get_token_stateB | Read ERC-20 metadata, owner balance, total supply, and selected allowances. |
| lends_quote_psm_swap_inB | Quote exact USDG-to-leUSD PSM conversion and current availability. |
| lends_quote_psm_swap_outA | Quote exact leUSD-to-USDG PSM conversion and current availability. |
| lends_quote_stakeA | Preview sleUSD shares for a raw leUSD amount using current pool state. |
| lends_prepare_approveB | Construct an exact ERC-20 approval transaction; amount 0 revokes approval. |
| lends_prepare_approve_collateralC | Construct collateral approval for the LENDS protocol. |
| lends_prepare_approve_leusd_for_repayA | Construct leUSD approval for protocol repayment. |
| lends_prepare_approve_usdg_for_psmA | Construct USDG approval for a PSM swap into leUSD. |
| lends_prepare_approve_leusd_for_psmA | Construct leUSD approval for a PSM swap out to USDG. |
| lends_prepare_approve_leusd_for_stakingA | Construct leUSD approval for sleUSD staking. |
| lends_prepare_depositA | Construct a collateral deposit transaction. |
| lends_prepare_withdrawB | Construct a collateral withdrawal transaction. |
| lends_prepare_borrowB | Construct a leUSD borrowing transaction against collateral. |
| lends_prepare_repayA | Construct a leUSD repayment transaction with a maximum raw amount. |
| lends_prepare_accrue_feeB | Construct a permissionless vault fee-accrual transaction. |
| lends_prepare_psm_swap_inB | Construct an exact USDG-to-leUSD PSM transaction. |
| lends_prepare_psm_swap_outB | Construct an exact leUSD-to-USDG PSM transaction. |
| lends_prepare_stakeB | Construct a leUSD stake transaction with an explicit minimum sleUSD share output. |
| lends_prepare_request_unstakeC | Construct an sleUSD unstake-request transaction. |
| lends_prepare_complete_unstakeB | Construct a transaction to complete a claimable unstake request. |
| lends_prepare_cancel_expired_unstakeA | Construct a transaction to recover shares from an expired unstake request. |
| lends_math_pending_vault_feeA | Calculate projected simple vault fees with contract-equivalent floor rounding. |
| lends_math_scale_price_to_e8C | Normalize a positive oracle answer to 8 decimals. |
| lends_math_collateral_valueB | Calculate raw 6-decimal leUSD collateral value. |
| lends_math_max_borrowB | Calculate maximum raw leUSD debt at a borrow LTV. |
| lends_math_health_factorA | Calculate health factor in basis points; returns null when debt is zero. |
| lends_math_withdrawable_collateralB | Calculate maximum raw collateral withdrawal while retaining borrow-LTV safety. |
| lends_math_liquidation_priceA | Calculate the 8-decimal liquidation price; returns null without debt or collateral. |
| lends_math_convert_decimals_exactA | Convert raw units between decimal scales, returning null if downscaling is inexact. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 37 tools
Tools are grouped by category (math/get/quote/prepare/assert) and mostly map to distinct resources and actions. Some overlap exists between the generic approve tool and the five purpose-specific approval tools, but descriptions are clear enough to disambiguate.
All tools share the lends_ prefix and follow a consistent lends_<category>_<action/noun> snake_case pattern. Even long names remain predictable and readable.
At 37 tools, the surface is well above the 25-tool threshold and feels heavy, especially with six approval variants and eight math helpers. The protocol scope is broad, but consolidation would make the set more manageable.
Core user lifecycle operations for collateral, borrowing, PSM swaps, staking, and unstaking are well covered. However, there is no prepare or execute liquidation transaction despite the presence of get_liquidation_plan, leaving a notable gap in the liquidation workflow.