Add DeFi Risk Checks to Your AI Agent

MCP server or REST API. 745 protocols. 4,000+ vaults. 5 minutes to integrate.

1Check if a Protocol Is Safe

MCP (Claude / Cursor)

Add to your MCP config and your agent gets a risk oracle. No SDK, no code changes.

claude_desktop_config.json
{
  "mcpServers": {
    "hindenrank": {
      "command": "npx",
      "args": ["-y", "hindenrank-mcp"],
      "env": {
        "HINDENRANK_API_KEY": "your-key-here"
      }
    }
  }
}

Now ask your agent: “Is Ethena safe to deposit into?” It calls get_protocol_risk and returns:

Response
Ethena (ethena)
Risk Grade: D+ (62/100 — lower is safer)
Value Grade: C (45/100 — higher is better)
TVL: $5.4B
Sector: Stablecoin

Top Risks:
  - Basis trade unwind risk in negative funding
  - Insurance fund covers <1% of USDe supply
  - Centralized custody of backing assets

Verdict: High-yield synthetic dollar with structural fragility...

REST API

curl
curl https://hindenrank.com/api/v1/protocols/ethena \
  -H "X-API-Key: your-key-here"
Response (JSON)
{
  "data": {
    "slug": "ethena",
    "name": "Ethena",
    "grade": "D+",
    "rawScore": 62,
    "sector": "Stablecoin",
    "tvl": 5400000000,
    "topRisks": [
      "Basis trade unwind risk in negative funding",
      "Insurance fund covers <1% of USDe supply"
    ],
    "verdict": "High-yield synthetic dollar with structural fragility..."
  }
}

2Screen Vaults by Risk

Find the safest yield opportunities. Filter 4,000+ vaults by risk grade, chain, and source.

MCP
> "Show me A-rated Hyperliquid vaults"

Showing 8 of 12 vaults:
- HYPE Maxi — Grade: A- (16/100) | TVL: $45.2M | APY: 12.50%
- ETH Delta Neutral — Grade: A (10/100) | TVL: $12.1M | APY: 8.20%
- BTC Basis — Grade: B+ (22/100) | TVL: $8.5M | APY: 15.30%
REST API
curl "https://hindenrank.com/api/v1/vaults?source=hyperliquid&maxGrade=B&rated=true&limit=10" \
  -H "X-API-Key: your-key-here"
Use source=beefy, source=hyperliquid, or source=morpho to filter by vault platform.

3Score Your Portfolio

Check the aggregate risk of a portfolio. Get concentration warnings and weakest links before your agent commits capital.

curl
curl -X POST https://hindenrank.com/api/v1/portfolio/risk \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-key-here" \
  -d '{
    "positions": [
      { "protocol": "aave-v3", "value": 50000 },
      { "protocol": "lido", "value": 30000 },
      { "protocol": "ethena", "value": 20000 }
    ]
  }'
Response
{
  "data": {
    "riskGrade": "C+",
    "riskScore": 38,
    "totalValue": 100000,
    "concentrationWarnings": [
      "50% in single protocol (aave-v3)"
    ],
    "weakestLinks": [
      { "protocol": "ethena", "grade": "D+", "rawScore": 62, "exposure": 20 }
    ]
  }
}
!Weakest links show positions with D+ or worse grades. Your agent should flag or avoid these.

Full Example

A complete script that finds the highest-yielding safe vault and checks portfolio risk before recommending it.

risk-aware-vault-selector.ts
// risk-aware-vault-selector.ts
// Finds the highest-yielding vault that meets your risk threshold.
// Run: HINDENRANK_API_KEY=hrk_live_xxx npx tsx risk-aware-vault-selector.ts

const API = "https://hindenrank.com/api/v1";
const KEY = process.env.HINDENRANK_API_KEY ?? "";
const headers: Record<string, string> = {
  "X-API-Key": KEY,
  "Content-Type": "application/json",
};

async function main() {
  // 1. Fetch A and B rated Hyperliquid vaults
  const res = await fetch(
    `${API}/vaults?source=hyperliquid&maxGrade=B&rated=true&limit=50`,
    { headers },
  );
  const { data: vaults } = await res.json();

  // 2. Sort by APY descending, pick top 5
  const ranked = vaults
    .filter((v: any) => v.apy !== null && v.apy > 0)
    .sort((a: any, b: any) => b.apy - a.apy);

  console.log(`Found ${ranked.length} safe vaults (A or B rated):\n`);
  for (const v of ranked.slice(0, 5)) {
    console.log(
      `  ${v.riskGrade} | ${v.name} | APY: ${(v.apy * 100).toFixed(1)}% | TVL: $${(v.tvl / 1e6).toFixed(1)}M`,
    );
  }

  // 3. Check portfolio risk if we add the top pick
  const top = ranked[0];
  if (!top) return console.log("No vaults matched filters.");

  const portfolio = await fetch(`${API}/portfolio/risk`, {
    method: "POST",
    headers,
    body: JSON.stringify({
      positions: [
        { protocol: "aave-v3", value: 50_000 },
        { protocol: "lido", value: 30_000 },
        { protocol: top.protocolSlugs[0], value: 20_000 },
      ],
    }),
  });
  const { data: risk } = await portfolio.json();

  console.log(`\nPortfolio with ${top.name}:`);
  console.log(`  Risk: ${risk.riskGrade} (${risk.riskScore}/100)`);

  if (risk.concentrationWarnings.length > 0) {
    console.log(`  Warnings: ${risk.concentrationWarnings.join(", ")}`);
  }
  if (risk.weakestLinks.length > 0) {
    console.log(`  Weakest: ${risk.weakestLinks.map((w: any) => `${w.protocol} (${w.grade})`).join(", ")}`);
  }
}

main();

Next Steps