Skip to main content
Glama
LendsProtocol

lends-mcp-server

Official

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LENDS_RPC_URLNoRPC 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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/LendsProtocol/lends-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server