MCP trading calculator
for AI agents
Give your AI agent exact crypto futures math via MCP — not hallucinated estimates. TradingCalc is the deterministic computation layer your agent calls for position size, liquidation price, funding cost, PnL, and more.
Why AI agents need exact calculations
When an LLM answers “what's my liquidation price at 10× leverage?”, it approximates. For a position at $83,000 BTC, the difference between “approximately $75,000” and the exact $75,155 could mean the difference between holding through a dip and getting liquidated on one.
workflow.run_liquidation_safety. Gets the exact number from a verified formula. Same inputs, same outputs.Install in 30 seconds
// ~/.claude/claude_desktop_config.json
{
"mcpServers": {
"tradingcalc": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://tradingcalc.io/api/mcp"]
}
}
}{
"tradingcalc": {
"url": "https://tradingcalc.io/api/mcp"
}
}{
"mcpServers": {
"tradingcalc": {
"command": "npx",
"args": [
"-y", "mcp-remote",
"https://tradingcalc.io/api/mcp",
"--header", "Authorization: Bearer tc_your_key"
]
}
}
}Example — pre-trade risk check
One MCP call that orchestrates position sizing, liquidation, break-even, and funding cost together.
{
"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
}
}{
"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
}19 tools across 4 suites
- Position size from account balance and max risk %
- Liquidation price — isolated and cross margin
- Max safe leverage from volatility and drawdown
- Full pre-trade risk check in one call
- Net PnL with all fees
- Break-even price
- Target exit price for any profit goal
- Scenario table across price range
- Cumulative funding cost over hold period
- Carry trade yield and verdict
- Funding arbitrage between two exchanges
- Compound funding projection
- Weighted average entry (DCA)
- Scale-out P&L and weighted average exit
- Hedge ratio for spot positions
Full tool reference at tradingcalc.io/for-agents — includes parameters, schemas, and workflow examples.
Self-verifiable formulas
22 canonical test vectors
Each formula validated against exact arithmetic proof. Vectors run on every deployment.
system.verify tool
Call via MCP to run all vectors and confirm correctness before using results in your agent.
Public proof page
SSR, no cache — runs the full test suite live on every request. Verifiable independently.
Start in 30 seconds
No signup required for free tier. Add to Claude Desktop, Cursor, or VS Code using the config above.