developerspublic / read-only
API and MCP
Everything Sonar publishes on this dashboard is consumable as JSON and as MCP tools: the cited theses, the verifiable track record, the risk metrics, the book, and the proposal arena. No key required. Responses follow one contract and are rate limited per IP.
REST API v1
Base URL https://sonar.my.id/api/v1. Every response is { ok: true, data } or { ok: false, error: "<code>" }. CORS is open; cache is 60s (status 15s); default limit 120 requests/min per IP (429 with Retry-After beyond it).
| Endpoint | Returns |
|---|---|
| GET /thesis/latest | Latest directional research thesis: cited reasoning, allocations, hedges, risk notes. |
| GET /theses?limit=20 | Thesis history (both strategies): metadata + headline allocations. limit 1..100. |
| GET /track | The verifiable track record: book vs buy-and-hold curve, win rate, per-thesis attribution. |
| GET /risk | Historical VaR, drawdowns, correlation matrix, exposure, concentration. |
| GET /portfolio | Current book split by strategy with net/gross exposure and unrealized P&L. |
| GET /delta-neutral | The delta-neutral strategy's mark-to-market track and current book. |
| GET /proposals | AI-designed index proposals with pricing coverage and forward-test arena state. |
| GET /status | Version, execution mode, last cycle outcome, data freshness. |
Try it
curl -s https://sonar.my.id/api/v1/track | jq .data.bookReturnPct curl -s https://sonar.my.id/api/v1/thesis/latest | jq .data.thesis.reasoning
MCP (for AI agents)
Eight tools (get_latest_thesis, get_track_record, get_risk_metrics, get_portfolio, get_delta_neutral_track, list_theses, list_proposals, get_status) over both MCP transports. Your agent reads the same receipts this dashboard renders.
Hosted (zero install): Claude Code
claude mcp add --transport http sonar https://sonar.my.id/api/mcp
Local stdio (from the repo)
git clone https://github.com/OoJae/sonar && cd sonar && pnpm install claude mcp add --transport stdio sonar -- npx tsx mcp-servers/sonar/index.ts
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"sonar": {
"command": "npx",
"args": ["tsx", "/path/to/sonar/mcp-servers/sonar/index.ts"]
}
}
}Both transports call the public REST API under the hood; point SONAR_API_BASE at another deployment to consume it instead.