Based Loans
官方以 Base 代幣抵押借入 USDC,無清算風險;也可出借 USDC。提供即時報價、代幣風險報告、持倉資訊及未簽署交易。無需登入,絕不持有金鑰。
你可以用 Based Loans MCP 做什麼?
- 以代幣抵押借款 — 針對指定代幣、抵押品數量和期限,取得精確的貸款報價和未簽署的借款計畫。
- 出借 USDC — 存入 USDC,並選擇要接受哪些代幣作為抵押品,每種代幣皆可設定限額。
- 查看部位與風險 — 取得錢包的即時市場資料、風險報告和目前部位。
- 建立未簽署的交易 — 取得依序排列的交易步驟,供使用者從自己的錢包簽署並送出;不會持有任何金鑰。
- 使用代理技能 — 依照
skills/based-loans和SKILL.md中記載的借貸工作流程操作。
託管 MCP 伺服器
npx add-mcp 'https://mcp.based.loans/mcp'可安裝到 Claude Code、Codex、Cursor 等客戶端
文件
代理程式的 Based Loans
讓 AI 代理程式和應用程式使用 Based Loans 的工具。Based Loans 是 Base 上不會清算借款人的借貸協議。
- **借款:**存入代幣,立即取得 USDC,並在到期日前以固定價格買回該代幣。價格波動絕不會觸發出售。
- **出借:**存入 USDC,選擇要借出 USDC 以換取哪些代幣,並為每種代幣設定限額。
這裡不會保管任何金鑰。所有內容都會傳回即時資料,或供使用者自己的錢包簽署的未簽署交易。
| 套件 | 說明 |
|---|---|
@basedloans/sdk | TypeScript SDK (viem)。提供市場、風險報告、精確貸款報價、部位及未簽署交易建構工具。 |
@basedloans/mcp | MCP 伺服器(stdio 和 Streamable HTTP),另提供 GET API,供無法使用 MCP 的代理程式使用。 |
@basedloans/agentkit | Coinbase AgentKit 動作提供者。 |
skills/based-loans | 代理程式技能(SKILL.md),包含借款和出借工作流程。其主要首頁(含安裝步驟和 Claude Code 外掛程式)位於 0xVarius/basedloans-skill。 |
plugins/base-mcp | Base MCP 的自訂外掛程式規格。 |
integrations/bankr | Bankr 技能(SKILL.md + catalog.json),供 BankrBot/skills 目錄使用。 |
docs | 抵押品類型指南和 llms.txt。 |
快速開始
# 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
開發
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
所有協議參數(費用、期限、最低額度、限額)都會從鏈上讀取。合約地址會在執行階段從 Core 解析。