Based Loans
Borrow USDC against Base tokens with no liquidations, or lend USDC. Quotes, risk data, unsigned txs.
Should I use this
Quality & Safety
Findings (4)
- LOWin get_loan
- LOWin explain_collateral_types
- LOWin build_claim_collateral
- LOWin build_set_auto_redeploy
Based on automated analysis of tool definitions and protocol compliance.
Context Cost
This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.
Install
One-Click Install
Add this to your `claude_desktop_config.json` file:
{
"mcpServers": {
"basedloans": {
"command": "npx",
"args": [
"@basedloans/mcp"
]
}
}
}Runnable packages
0.1.3stdioRemote endpoints
https://mcp.based.loans/mcpstreamable-httpWhat it can do
Tool inventory
Tools (19)
🟢get_protocol_info
Live protocol parameters: loan fee, the three loan terms with their durations and buyback costs, minimum loan and deposit sizes, per-token lending limit bounds, and whether the protocol is paused.
Input Schema
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢list_markets(only_with_funds)
Every token currently accepted as collateral, with price, max loan-to-value, USDC available to borrow against it, active loans, and how it is priced. Set only_with_funds to see only tokens lenders are currently backing.
Input Schema
{
"type": "object",
"properties": {
"only_with_funds": {
"type": "boolean",
"description": "Only tokens with USDC available to borrow right now"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_market(asset)
Price, max loan-to-value, USDC available to borrow, active loans and pricing type for one token.
Input Schema
{
"type": "object",
"properties": {
"asset": {
"type": "string",
"minLength": 1,
"description": "Token contract address on Base (preferred) or its symbol, e.g. WETH, VIRTUAL, esALB"
}
},
"required": [
"asset"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_risk_report(asset, skip_depth)
Live risk data for lending against (or borrowing with) a token: how many price sources it has and whether they cross-check each other, how far back its pool price history goes, how much trading it would take to move its pool price 2x and 10x, USDC available to borrow against it, its active loan limit, and plain-language explanations of every flag. Use this before setting a lending limit on a token.
Input Schema
{
"type": "object",
"properties": {
"asset": {
"type": "string",
"minLength": 1,
"description": "Token contract address on Base (preferred) or its symbol, e.g. WETH, VIRTUAL, esALB"
},
"skip_depth": {
"type": "boolean",
"description": "Skip the pool depth calculation (faster)"
}
},
"required": [
"asset"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢quote_borrow(asset, collateral_amount, loan_amount_usdc, term)
Exact loan quote using the same math the contract runs: USDC you receive after the fee, buyback cost, due date, and how much collateral is used. It replays the lender queue, so the funded amount matches what the loan would really get, and warns (with a suggested amount) when a loan would be funded short.
Input Schema
{
"type": "object",
"properties": {
"asset": {
"type": "string",
"minLength": 1,
"description": "Token contract address on Base (preferred) or its symbol, e.g. WETH, VIRTUAL, esALB"
},
"collateral_amount": {
"type": "string",
"pattern": "^\\d+(\\.\\d+)?$",
"description": "Collateral to offer, in token units, e.g. 0.5"
},
"loan_amount_usdc": {
"type": "string",
"pattern": "^\\d+(\\.\\d+)?$",
"description": "Loan amount before the fee. Omit to borrow the most the collateral allows."
},
"term": {
"anyOf": [
{
"type": "string",
"enum": [
"short",
"medium",
"long"
]
},
{
"type": "integer",
"minimum": 0,
"maximum": 2
}
],
"description": "Loan term: short, medium or long (or 0/1/2). Durations and costs come from get_protocol_info."
}
},
"required": [
"asset",
"collateral_amount",
"term"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_loan(loan_id)
Status, collateral, buyback cost and remaining amount, due date and lenders for one loan.
Input Schema
{
"type": "object",
"properties": {
"loan_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d+$"
},
{
"type": "integer",
"minimum": 0
}
],
"description": "Loan ID"
}
},
"required": [
"loan_id"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_borrower_loans(borrower)
Every loan a wallet has opened, with status (active, partially_repaid, repaid, defaulted), buyback remaining and time until due.
Input Schema
{
"type": "object",
"properties": {
"borrower": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$",
"description": "Borrower wallet address on Base"
}
},
"required": [
"borrower"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_lender_position(lender)
A lender's deposit, USDC in active loans, USDC available to withdraw, per-token limits, and every loan they funded with any repaid USDC or defaulted collateral they can claim.
Input Schema
{
"type": "object",
"properties": {
"lender": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$",
"description": "Lender wallet address on Base"
}
},
"required": [
"lender"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢request_token_listing(token)
Check whether a token is accepted as collateral. If it is not, returns a pre-filled link to the Based Loans request form for the user to open and submit. Nothing is submitted automatically.
Input Schema
{
"type": "object",
"properties": {
"token": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$",
"description": "Token contract address on Base"
}
},
"required": [
"token"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢explain_collateral_types
How Based Loans prices different kinds of collateral (regular tokens, two-hop priced tokens, staked and share tokens, escrowed tokens), with examples, and what each means for borrowers and lenders.
Input Schema
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢build_borrow(asset, collateral_amount, loan_amount_usdc, term, borrower, ...)
Returns the unsigned transactions to open a loan: an approval (only if needed) then openLoan. Includes the quote and warnings. The user's wallet must sign and send each step in order.
Input Schema
{
"type": "object",
"properties": {
"asset": {
"type": "string",
"minLength": 1,
"description": "Token contract address on Base (preferred) or its symbol, e.g. WETH, VIRTUAL, esALB"
},
"collateral_amount": {
"type": "string",
"pattern": "^\\d+(\\.\\d+)?$",
"description": "Collateral to offer, in token units, e.g. 0.5. It is a maximum: only what the loan needs is taken"
},
"loan_amount_usdc": {
"type": "string",
"pattern": "^\\d+(\\.\\d+)?$",
"description": "Loan amount before the fee, in USDC. Omit to borrow the most the collateral allows"
},
"term": {
"anyOf": [
{
"type": "string",
"enum": [
"short",
"medium",
"long"
]
},
{
"type": "integer",
"minimum": 0,
"maximum": 2
}
],
"description": "Loan term: short, medium or long (or 0/1/2). Durations and costs come from get_protocol_info."
},
"borrower": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$",
"description": "Wallet that will sign; used to skip unneeded approvals and check balances"
},
"max_shortfall_bps": {
"type": "integer",
"minimum": 0,
"maximum": 10000,
"description": "Max gap between requested and funded amount in basis points. Omit for the protocol default."
}
},
"required": [
"asset",
"collateral_amount",
"term",
"borrower"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢build_buyback(loan_id, payment_usdc, borrower)
Returns the unsigned transactions to pay back a loan and get collateral back: a USDC approval (only if needed) then buyback. Omit payment_usdc to pay the full remaining amount.
Input Schema
{
"type": "object",
"properties": {
"loan_id": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d+$"
},
{
"type": "integer",
"minimum": 0
}
],
"description": "Loan ID"
},
"payment_usdc": {
"type": "string",
"pattern": "^\\d+(\\.\\d+)?$",
"description": "USDC to pay. Omit to pay everything left and get all collateral back"
},
"borrower": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$",
"description": "Borrower wallet that will sign; must be the wallet that opened the loan"
}
},
"required": [
"loan_id",
"borrower"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢build_deposit(amount_usdc, lender, limits)
Returns the unsigned transactions to deposit USDC for lending, optionally setting per-token lending limits in the same transaction (needed before a first deposit can be lent). Check get_risk_report for each token first.
Input Schema
{
"type": "object",
"properties": {
"amount_usdc": {
"type": "string",
"pattern": "^\\d+(\\.\\d+)?$",
"description": "USDC to deposit, e.g. 500"
},
"lender": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$",
"description": "Lender wallet that will sign; used to skip unneeded approvals and check balances"
},
"limits": {
"type": "array",
"items": {
"type": "object",
"properties": {
"asset": {
"type": "string",
"minLength": 1,
"description": "Token contract address on Base (preferred) or its symbol, e.g. WETH, VIRTUAL, esALB"
},
"limit_usdc": {
"type": "string",
"pattern": "^\\d+(\\.\\d+)?$",
"description": "Max USDC to lend against this token; 0 removes it"
}
},
"required": [
"asset",
"limit_usdc"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 50,
"description": "Per-token lending limits to set in the same transaction. A first deposit needs at least one to be lent"
}
},
"required": [
"amount_usdc",
"lender"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢build_set_limits(limits, lender)
Returns the unsigned transaction to add, change or remove per-token lending limits. A limit cannot be set below what is already in active loans for that token.
Input Schema
{
"type": "object",
"properties": {
"limits": {
"type": "array",
"items": {
"type": "object",
"properties": {
"asset": {
"type": "string",
"minLength": 1,
"description": "Token contract address on Base (preferred) or its symbol, e.g. WETH, VIRTUAL, esALB"
},
"limit_usdc": {
"type": "string",
"pattern": "^\\d+(\\.\\d+)?$",
"description": "Max USDC to lend against this token; 0 removes it"
}
},
"required": [
"asset",
"limit_usdc"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 50,
"description": "Tokens and the max USDC to lend against each"
},
"lender": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$",
"description": "Lender wallet that will sign"
}
},
"required": [
"limits",
"lender"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢build_withdraw(amount_usdc, lender, as_musdc)
Returns the unsigned transaction to withdraw USDC that is not in active loans. Use "max" for everything available. as_musdc receives vault shares and skips the 0.25% withdrawal fee.
Input Schema
{
"type": "object",
"properties": {
"amount_usdc": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d+(\\.\\d+)?$"
},
{
"type": "string",
"const": "max"
}
],
"description": "USDC to withdraw, or \"max\" for everything not in active loans"
},
"lender": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$",
"description": "Lender wallet that will sign"
},
"as_musdc": {
"type": "boolean",
"description": "Receive mUSDC vault shares instead of USDC, skipping the 0.25% withdrawal fee"
}
},
"required": [
"amount_usdc",
"lender"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢build_claim_proceeds(loan_ids, mode)
Returns the unsigned transaction to claim repaid USDC from loans you funded (mode withdraw) or put it straight back into lending (mode redeploy). Get loan IDs from get_lender_position.
Input Schema
{
"type": "object",
"properties": {
"loan_ids": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d+$"
},
{
"type": "integer",
"minimum": 0
}
],
"description": "Loan ID"
},
"minItems": 1,
"maxItems": 50,
"description": "IDs of loans you funded, from get_lender_position (1 to 50)"
},
"mode": {
"type": "string",
"enum": [
"withdraw",
"redeploy"
],
"description": "withdraw sends the USDC to your wallet (default); redeploy puts it back into lending"
}
},
"required": [
"loan_ids"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢build_claim_collateral(loan_ids)
Returns the unsigned transaction for a lender to claim their share of collateral from loans that passed their due date without a full buyback.
Input Schema
{
"type": "object",
"properties": {
"loan_ids": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d+$"
},
{
"type": "integer",
"minimum": 0
}
],
"description": "Loan ID"
},
"minItems": 1,
"maxItems": 50,
"description": "IDs of past-due loans you funded, from get_lender_position (1 to 50)"
}
},
"required": [
"loan_ids"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢build_set_auto_redeploy(enabled)
Returns the unsigned transaction to turn automatic re-lending of repaid principal on or off.
Input Schema
{
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "true to re-lend repaid principal automatically, false to keep it available to withdraw"
}
},
"required": [
"enabled"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢simulate_transaction(to, data, value, from)
Dry-runs one prepared transaction from a wallet against the latest block and explains the failure in plain language if it would revert. Steps that depend on an earlier approval only pass after that approval is mined.
Input Schema
{
"type": "object",
"properties": {
"to": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$",
"description": "The step's to address, as returned by a build_ tool"
},
"data": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]*$",
"description": "The step's calldata, as returned by a build_ tool"
},
"value": {
"type": "string",
"pattern": "^\\d+$",
"description": "Native value in wei. Always 0 for Based Loans calls"
},
"from": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$",
"description": "Wallet that would send the transaction"
}
},
"required": [
"to",
"data",
"from"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Community
Evidence