Based Loans
Borrow USDC against Base tokens with no liquidations, or lend USDC. Quotes, risk data, unsigned txs.
Installation
Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).
claude mcp add --transport http based-loans 'https://mcp.based.loans/mcp'
{
"mcpServers": {
"based-loans": {
"type": "http",
"url": "https://mcp.based.loans/mcp"
}
}
}
@basedloans/mcpclaude mcp add based-loans -e 'BASE_RPC_URL=<your base_rpc_url>' -e 'BASEDLOANS_READ_ONLY=<BASEDLOANS_READ_ONLY>' -- npx -y @basedloans/mcp@0.1.1
{
"mcpServers": {
"based-loans": {
"command": "npx",
"args": [
"-y",
"@basedloans/mcp@0.1.1"
],
"env": {
"BASE_RPC_URL": "<your base_rpc_url>",
"BASEDLOANS_READ_ONLY": "<BASEDLOANS_READ_ONLY>"
}
}
}
}
Variables d'environnement
BASE_RPC_URLsecret Base mainnet RPC URL. Defaults to the public endpoint.BASEDLOANS_READ_ONLYSet to 1 to expose only read tools.
Documentation
Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.
Based Loans for agents
Tools that let AI agents and apps use Based Loans, the no-liquidation lending protocol on Base.
- Borrow: deposit a token, get USDC now, buy the token back at a fixed price before the due date. Price swings never trigger a sale.
- Lend: deposit USDC and choose which tokens to lend against, with a limit per token.
Nothing here holds keys. Everything returns live data or unsigned transactions for the user's own wallet.
| Package | What it is |
|---|---|
@basedloans/sdk | TypeScript SDK (viem). Markets, risk reports, exact loan quotes, positions, unsigned transaction builders. |
@basedloans/mcp | MCP server (stdio and Streamable HTTP) plus a GET API for agents that cannot speak MCP. |
@basedloans/agentkit | Coinbase AgentKit action provider. |
skills/based-loans | Agent skill (SKILL.md) with borrowing and lending workflows. |
plugins/base-mcp | Custom plugin spec for Base MCP. |
docs | Collateral types guide and llms.txt. |
Quick start
# MCP server for Claude Desktop, Cursor, etc.
npx -y @basedloans/mcp
import { createBasedLoans } from "@basedloans/sdk"
const bl = createBasedLoans({ rpcUrl: process.env.BASE_RPC_URL })
const quote = await bl.quoteBorrow({ asset: "0x4200000000000000000000000000000000000006", collateralAmount: "0.5", term: "short" })
const plan = await bl.buildBorrow({ asset: quote.asset, collateralAmount: "0.5", term: "short", borrower: "0xYou" })
// plan.steps: sign and send in order with your wallet
Development
nvm use # Node 24
npm install
npm run build
npm run typecheck
node packages/sdk/scripts/e2e-fork.mjs http://127.0.0.1:8545 # against an Anvil fork of Base
node packages/mcp/scripts/smoke.mjs # stdio + HTTP server checks
npm run sync:assets # refresh the token list from the frontend
All protocol parameters (fees, terms, minimums, limits) are read on-chain. Contract addresses are resolved from Core at runtime.
Questions fréquentes
Qu'est-ce que Based Loans ?
Borrow USDC against Base tokens with no liquidations, or lend USDC. Quotes, risk data, unsigned txs.
Comment installer Based Loans ?
Il fonctionne comme serveur distant. Dans Claude Code : claude mcp add --transport http based-loans 'https://mcp.based.loans/mcp'. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.
Faut-il une clé API pour Based Loans ?
Oui. Il attend BASE_RPC_URL, à renseigner dans sa configuration.
Based Loans est-il open source ?
Oui. Son code est sur GitHub sous licence MIT.
Qui maintient Based Loans ?
Il est publié par 0xVarius. AI.tn le référence sans le maintenir ni le recommander.
Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.