rlp-agent-kit
RLP Agent Kit
An MCP server that lets any AI agent borrow and repay ETH on the Robinhood Lending Protocol (Robinhood Chain, chainId 4663). Install it into Claude Code, Claude Desktop, Cursor, or any MCP-capable agent, and RLP becomes a set of tools the agent can call.
What the agent gets
| Tool | What it does | Signs? |
|---|---|---|
rlp_markets |
List collateral tokens and protocol stats | No |
rlp_credit |
A wallet's credit score, tier, and borrow limit | No |
rlp_loans |
A wallet's loans and payoff amounts | No |
rlp_quote_borrow |
Preview borrow terms without executing | No |
rlp_borrow |
Borrow ETH against a token | Yes |
rlp_repay |
Repay a loan in full and reclaim collateral | Yes |
Read tools work with no wallet. The two write tools sign from a dedicated agent wallet and are bounded by hard caps you set.
The safety fence
The agent signs on its own, but only inside a fence you control:
- A dedicated agent wallet. You fund it with collateral tokens and a little ETH for gas. It is not your main wallet, so the blast radius is only what you put in it.
- Per-loan cap (
RLP_MAX_LOAN_ETH, default 0.05). - Daily cap (
RLP_MAX_DAILY_ETH, default 0.2), tracked in a persistent ledger so it survives restarts. - Whitelist only. Borrows are restricted to RLP-whitelisted tokens (enforced by the protocol server-side too).
- Funds can only ever move to the RLP treasury and back. There is no tool that sends funds anywhere else.
Leave RLP_AGENT_PRIVATE_KEY unset and the kit is read-only: the agent can research markets and credit but cannot move anything.
Install
npm install
npm run build
Configure
Environment variables:
| Variable | Default | Purpose |
|---|---|---|
RLP_AGENT_PRIVATE_KEY |
(none) | The agent wallet key. Omit for read-only mode. |
RLP_MAX_LOAN_ETH |
0.05 |
Max ETH per single loan. |
RLP_MAX_DAILY_ETH |
0.2 |
Max ETH borrowed per UTC day. |
RLP_ALLOW_WRITES |
(on) | Set to 0 to force read-only even with a key present. |
RLP_API_URL |
production | RLP API base URL. |
RLP_RPC_URL |
public RH RPC | Robinhood Chain RPC. |
Claude Code
claude mcp add rlp -- node /absolute/path/to/agent-kit/dist/index.js
Then set the env vars in your shell, or add an env block to the generated config.
Claude Desktop / Cursor (mcp config JSON)
{
"mcpServers": {
"rlp": {
"command": "node",
"args": ["/absolute/path/to/agent-kit/dist/index.js"],
"env": {
"RLP_AGENT_PRIVATE_KEY": "0x...",
"RLP_MAX_LOAN_ETH": "0.05",
"RLP_MAX_DAILY_ETH": "0.2"
}
}
}
}
Example agent flow
"Check my RLP credit, then borrow 0.02 ETH against my HOPPY for 3 days."
rlp_creditreports the score and limit.rlp_quote_borrowpreviews the exact terms.rlp_borrowlocks the collateral and disburses the ETH, within the caps.
Later:
"Repay loan 1183."
rlp_loans finds the payoff, rlp_repay sends it and reclaims the collateral, which lifts the credit score for next time.
Security notes
- Treat the agent wallet key like any hot-wallet key. Fund it with only what the caps allow it to spend.
- The caps are the whole safety story. Set them to the smallest values that let the agent do its job.
- This kit signs Robinhood Chain (EVM) loans. Solana-collateral loans are not covered.