MCP Hub
Back to servers

FinSight

What it does: * Portfolio risk profiling (per-asset and portfolio-level) * Target allocation based on risk profile (conservative/moderate/aggressive) * Diversification scoring via HHI index * Sharpe proxy calculation * Concentration risk detection * Rule-based rebalance recommendations

glama
Forks
1
Updated
Mar 22, 2026

FinSight

A paid financial portfolio analytics API for AI agents, built on MPP (Machine Payments Protocol). Agents send portfolio data and pay micro-amounts in USDC per request to receive risk metrics, rebalance suggestions, diversification scores, and stress test simulations.

Quick Start

Make sure you have an mppx account set up:

npx mppx account create
npx mppx account view --show-key

Then call any endpoint directly:

npx mppx https://finsight-mpp.YOUR-SUBDOMAIN.workers.dev/analyze/risk \
  --method POST \
  --body '{"holdings":[{"asset":"ETH","weight":0.5},{"asset":"BTC","weight":0.3},{"asset":"USDC","weight":0.2,"isStable":true}]}'

Endpoints

MethodPathPriceDescription
GET/freeService info
GET/pricingfreeAll endpoint prices
POST/analyze/risk$0.01Portfolio risk profiling
POST/analyze/rebalance$0.02Rebalance recommendations
POST/analyze/diversification$0.01Diversification scoring (HHI)
POST/analyze/stress$0.03Stress test under 5 market scenarios
POST/analyze/report$0.05Full report combining all modules

Example: Full Report

Portfolio: ETH 50%, BTC 30%, USDC 20%

npx mppx https://finsight-mpp.YOUR-SUBDOMAIN.workers.dev/analyze/report \
  --method POST \
  --body '{
    "holdings": [
      { "asset": "ETH", "weight": 0.5, "avgReturn": 0.15, "volatility": 0.65, "maxDrawdown": 0.55 },
      { "asset": "BTC", "weight": 0.3, "avgReturn": 0.12, "volatility": 0.55, "maxDrawdown": 0.45 },
      { "asset": "USDC", "weight": 0.2, "isStable": true }
    ],
    "profile": "balanced"
  }'

Expected response:

{
  "risk": {
    "portfolioRisk": 57.3,
    "portfolioVolatility": 0.3714,
    "riskTier": "high",
    "assets": [
      { "asset": "ETH", "riskScore": 74.3 },
      { "asset": "BTC", "riskScore": 62.5 },
      { "asset": "USDC", "riskScore": 5.0 }
    ]
  },
  "rebalance": {
    "profile": "balanced",
    "suggestions": [
      { "asset": "ETH", "currentWeight": 0.5, "targetWeight": 0.42, "action": "reduce", "delta": -0.08 },
      { "asset": "BTC", "currentWeight": 0.3, "targetWeight": 0.28, "action": "hold", "delta": -0.02 },
      { "asset": "USDC", "currentWeight": 0.2, "targetWeight": 0.30, "action": "increase", "delta": 0.10 }
    ]
  },
  "diversification": {
    "hhi": 3800,
    "effectiveAssets": 2.63,
    "grade": "moderate",
    "stableRatio": 0.2,
    "topHolding": { "asset": "ETH", "weight": 0.5 },
    "warnings": ["Over 50% in a single asset (ETH at 50%)"]
  },
  "stressTest": {
    "baseValue": 10000,
    "scenarios": [
      { "name": "market_crash", "description": "Broad market decline of 40%", "portfolioValue": 7400, "change": -0.26, "worstAsset": { "asset": "ETH", "change": -0.52 }, "bestAsset": { "asset": "USDC", "change": 0 } }
    ]
  },
  "generatedAt": "2026-03-22T12:00:00Z",
  "version": "1.0.0"
}

Deploy

cd finsight-mpp
npm install
npx wrangler deploy

Change Recipient Wallet

Open src/index.ts and replace 0xYOUR_WALLET_HERE with your wallet address:

tempo({
  currency: '0x20c0000000000000000000000000000000000000',
  recipient: '0xYOUR_WALLET_HERE', // <-- replace this
})

Then redeploy with npx wrangler deploy.

License

MIT

Reviews

No reviews yet

Sign in to write a review