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
README
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
| Method | Path | Price | Description |
|---|---|---|---|
| GET | / |
free | Service info |
| GET | /pricing |
free | All endpoint prices |
| POST | /analyze/risk |
$0.01 | Portfolio risk profiling |
| POST | /analyze/rebalance |
$0.02 | Rebalance recommendations |
| POST | /analyze/diversification |
$0.01 | Diversification scoring (HHI) |
| POST | /analyze/stress |
$0.03 | Stress test under 5 market scenarios |
| POST | /analyze/report |
$0.05 | Full 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.