MCP · STREAMABLE HTTP · REST · 31 TOOLS
API & MCP Reference
One JSON-RPC endpoint, 31 deterministic tools across 7 suites. This page is the full reference: install instructions, the complete tool catalog, and worked request/response examples.
https://tradingcalc.io/api/mcp
01INSTALL
Install in 30 seconds
CLAUDE DESKTOP
claude_desktop_config.json
{ "mcpServers": { "tradingcalc": { "command": "npx", "args": ["-y", "mcp-remote", "https://tradingcalc.io/api/mcp"] } }}CURSOR / VS CODE
mcp.json
{ "tradingcalc": { "url": "https://tradingcalc.io/api/mcp" }}REST API (DIRECT JSON-RPC)
curl
curl -X POST https://tradingcalc.io/api/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "liquidation", "arguments": { "side": "long", "entryPrice": 95000, "leverage": 10, "marginType": "isolated" } } }'WITH AN API KEY (HIGHER RATE LIMITS)
curl
curl -X POST https://tradingcalc.io/api/mcp \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", ... }' // MCP config with key{ "mcpServers": { "tradingcalc": { "command": "npx", "args": ["-y", "mcp-remote", "https://tradingcalc.io/api/mcp", "--header", "Authorization: Bearer YOUR_API_KEY"] } }}Free tier: 20 calls/day anonymously, 200/day with a free API key. No paid plan.
02TOOL SUITES
31 MCP tools across 7 suites
TRADE PLANNING
workflow.run_pnl_planningNet PnL, ROE, fees and gross P&L for a futures tradeworkflow.run_breakeven_planningBreak-even price accounting for entry and exit feesworkflow.run_exit_targetExit price required to hit a target PnL or ROEworkflow.run_position_sizingPosition size from account balance and max risk %primitive.average_entryAverage entry price after DCA into a positionworkflow.run_scenario_planningMulti-scenario P&L table across price targetsworkflow.run_dca_entryWeighted average entry, breakeven, and per-level contribution from multiple fillsworkflow.run_scale_outP&L, ROI, and cumulative P&L for each partial exit levelRISK & MARGIN
workflow.run_liquidation_safetyLiquidation price for long/short with cross or isolated marginworkflow.run_max_leverageMaximum safe leverage given account size and volatilityprimitive.hedge_ratioShort perp size to fully hedge a spot position, including funding costworkflow.run_risk_rewardFull R:R analysis: position size, liquidation, breakeven, P&L at stop and target. Returns verdict.FUNDING & CARRY
workflow.run_funding_costCumulative funding cost over a holding periodworkflow.run_funding_arbitrageAnnualized funding arbitrage yield between two exchangesworkflow.run_compound_fundingCompound funding cost with position size decayworkflow.run_carry_tradeDelta-neutral carry: net yield, gross/net profit, breakeven days. Returns verdict.workflow.run_funding_breakevenPrice move needed to cover funding cost + fees over a holding periodINTEGRATED DECISION
workflow.run_pre_trade_checkFull pre-trade risk analysis: position size, liquidation price, breakeven, funding cost, and safety classification in one callMARKET STRUCTURE
workflow.run_open_analysisMarket Profile open analysis: open location, open type (OD/OTD/ORR/OAIR), VAH/VAL/VPOC/IB, and scenario framingworkflow.run_session_structureDay-type classifier: trend / balance / neutral_trend / normal / normal_varworkflow.run_value_migrationValue-area migration across sessions: directional conviction vs balanceworkflow.run_breakout_acceptanceBreakout acceptance vs rejection beyond the value area (with optional delta)ON-CHAIN
workflow.run_token_risk_checkSolana token rug-pull mechanism check: mint/freeze authority, LP lock, mutable metadata, named scam-pattern flagsworkflow.run_swap_price_impactLive price-impact quote for a Solana swap, routed through Jupiter across every pool it knows aboutworkflow.run_bonding_curvePump.fun-style bonding curve: exact tokens received, price impact, and graduation progressworkflow.run_market_cap_comparisonLive market-cap ratio between two tokens (Solana or 5 EVM chains) projected onto an investmentworkflow.run_wallet_flag_checkWallet address check against independent flag databases (GoPlus, Webacy, ScamSniffer): sanctions, phishing, exchange labelsPREDICTION MARKETS
workflow.run_odds_converterConverts a probability into decimal/American odds and breakeven win rate, live from a Kalshi crypto-price marketworkflow.run_market_implied_oddsReads Kalshi's live BTC/ETH year-end price ladder: median and mode price bucket, probability at/above any boundaryworkflow.run_prediction_market_edgeCompares your probability estimate against a Kalshi market price and sizes a bet with fractional Kelly03REQUEST & RESPONSE
Examples: request & response
PnL on a BTC long
workflow.run_pnl_planningrequest
curl -X POST https://tradingcalc.io/api/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "workflow.run_pnl_planning", "arguments": { "side": "long", "entryPrice": 83000, "exitPrice": 85000, "size": 0.1, "feeOpenPct": 0.0002, "feeClosePct": 0.0005 } } }'result.content[0].text
{ "pnl": 194.09, "pnlPct": 0.02339, "fees": 5.91, "gross": 200.00}Position size from risk %
workflow.run_position_sizingrequest
curl -X POST https://tradingcalc.io/api/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "workflow.run_position_sizing", "arguments": { "side": "long", "entryPrice": 83000, "stopLoss": 81000, "riskUsdt": 100, "leverage": 5 } } }'result.content[0].text
{ "sizeBase": 0.04861, "sizeQuote": 4034.56, "margin": 806.91, "stopDistPct": 2.41}Full pre-trade risk check
workflow.run_pre_trade_checkrequest
curl -X POST https://tradingcalc.io/api/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "workflow.run_pre_trade_check", "arguments": { "side": "long", "entry_price": 83000, "stop_loss": 81000, "account_balance": 5000, "risk_pct": 2, "leverage": 5, "funding_rate": 0.0001, "hold_hours": 24 } } }'result.content[0].text
{ "safety": "ok", "recommended_size": 0.04861, "notional": 4034.56, "margin_required": 806.91, "liquidation_price": 66895.00, "liquidation_distance_pct": 19.40, "breakeven_price": 83023.51, "funding_cost_24h": 1.21, "summary_a": "Notional 4034.56 USDT · margin 806.91 USDT", "summary_b": "Liquidation 19.4% away, stop 2.4%", "summary_c": "Over 24h breakeven rises: 83023.51 → 83123.51 USDT"}04SELF-VERIFICATION
Self-verification
Agents can call system.verify before using results. Returns pass/fail for all 35 canonical test vectors. Every formula is traceable to exchange documentation: see Methodology for how.
tools/call · system.verify
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "system.verify", "arguments": {} }} // result.content[0].text{ "status": "pass", "passed": 35, "failed": 0, "total": 35, "timestamp": "2026-09-18T..."}