Deterministic crypto futures calculations for AI agents.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Ask Claude or Cursor trade questions and get exact numbers back β not AI guesses.
"What's my PnL if I buy 0.5 BTC at $80k and sell at $95k with 5x leverage?" "Size my position: $10k account, 1% risk, long BTC at $83k, stop at $81k." "Is this carry trade worth it? 0.01% funding long, 0.05% short, $50k, 30 days."
23 deterministic tools across trade planning, risk & margin, funding/carry, and market-structure (Market Profile) analysis. Formulas verified against 22 canonical test vectors β same inputs always produce the same outputs. Free, no signup.
Access via MCP (Claude Desktop / Cursor / VS Code) or a plain HTTP POST to the MCP endpoint. Free, no signup.
| Surface | URL | Auth |
|---|---|---|
| MCP | https://tradingcalc.io/api/mcp | Bearer optional (free) |
| For agents / setup | https://tradingcalc.io/for-agents | None |
| Verification proof | https://tradingcalc.io/verify | None |
MCP transport: Streamable HTTP (MCP spec 2024-11-05)
Add to claude_desktop_config.json:
After connecting, just ask naturally β the AI picks the right tool automatically:
Trade P&L
"I bought 0.5 BTC at $80,000 and want to sell at $95,000 with 5x leverage. What's my net profit after fees?"
Position sizing
"I have a $10,000 account and want to risk 1% going long BTC at $83,000 with a stop at $81,000. How many coins should I buy?"
Liquidation check
"Long ETH at $3,200 with 10x leverage β where do I get liquidated?"
Full pre-trade check
"Analyze this setup: long BTC at $83,000, stop $81,000, target $90,000, $10k account, 1% risk, 5x leverage. Is it worth taking?"
Funding cost
"I'm holding 0.5 BTC long on Bybit at $83,000 with 0.01% funding rate. How much will funding cost me over 3 days?"
Carry trade
"Is this carry trade worth it? Long on Bybit at 0.01% funding, short on Binance at 0.05%, $50k notional, 30 days."
DCA average entry
"I bought BTC at $78k (0.2 BTC), $80k (0.3 BTC), and $82k (0.1 BTC). What's my average entry and breakeven?"
Scale-out plan
"I'm long 1 BTC from $80k. I want to close 30% at $88k, 40% at $92k, 30% at $96k. What's my total P&L?"
Tool naming follows the workflow.run_* / primitive.* / system.* namespace convention.
Old flat names (pnl, liquidation, etc.) are accepted for backward compatibility. All tools are
free via MCP β no signup; 20 calls/day anonymously, 200/day with a free API key.
| Tool | Description |
|---|---|
workflow.run_pnl_planning | Net PnL, fees and gross profit/loss for a futures trade |
workflow.run_breakeven_planning | Break-even price accounting for entry/exit fees |
workflow.run_exit_target | Exit price required to hit a target PnL or ROE |
workflow.run_scenario_planning | Multi-scenario P&L analysis across price targets |
workflow.run_dca_entry | DCA across N price levels β avg entry, breakeven, level contribution |
workflow.run_scale_out | Partial exits at multiple levels β P&L per exit, weighted avg, overall ROI |
| Tool | Description |
|---|---|
workflow.run_liquidation_safety | Liquidation price for long/short isolated margin |
workflow.run_position_sizing | Position size based on account size and max risk % |
workflow.run_max_leverage | Maximum safe leverage based on drawdown tolerance and volatility |
workflow.run_risk_reward | Full R:R analysis: sizing + liquidation + breakeven + P&L at stop and target |
| Tool | Description |
|---|---|
workflow.run_funding_cost | Cumulative funding cost over a holding period |
workflow.run_funding_arbitrage | Annualized yield from long/short basis trades across two exchanges |
workflow.run_compound_funding | Capital growth projection from reinvesting funding income |
workflow.run_funding_breakeven | Price move needed to cover funding cost + fees over holding period |
workflow.run_carry_trade | Delta-neutral carry setup: net yield, ROI, breakeven days, verdict |
| Tool | Description |
|---|---|
workflow.run_open_analysis | Open location + type (OD/OTD/ORR/OAIR), VAH/VAL/VPOC/IB, scenario framing |
workflow.run_session_structure | Day-type classifier β trend / balance / neutral_trend / normal / normal_var |
workflow.run_value_migration | Value-area migration across sessions β directional conviction vs balance |
workflow.run_breakout_acceptance | Breakout acceptance vs rejection beyond the value area (optional delta) |
| Tool | Description |
|---|---|
primitive.average_entry | Average entry price after DCA into a position |
primitive.hedge_ratio | Short perp size and funding cost to hedge a spot position |
| Tool | Description |
|---|---|
workflow.run_pre_trade_check | Full pre-trade decision: position size, liquidation, breakeven, funding cost, go/no-go signal. Accepts live exchange + symbol. |
| Tool | Description |
|---|---|
system.verify | Run 22 canonical test vectors against all calculators. Returns pass/fail report. |
Formulas normalized across 7 exchanges: Binance, Bybit, OKX, Hyperliquid, Aster, KuCoin, MEXC.
| Access | Req/day | Price |
|---|---|---|
| Anonymous | 20 | Free |
| Free API key | 200 | Free |
The Service is free. Need a higher-limit key β email hi@tradingcalc.io.
Pass key as: Authorization: Bearer <your-api-key>
Agents can verify all 22 canonical test vectors before trusting results:
Response: { "status": "pass", "passed": 22, "failed": 0, "total": 22 }
Live proof: tradingcalc.io/verify
LLMs asked directly give plausible but potentially wrong numbers. TradingCalc MCP returns exact calculations β same inputs always produce the same outputs. No hallucination risk for financial data.
examples/risk-agent-wrapper.ts β a drop-in TypeScript wrapper for risk-gated trade execution.
Integrates with any agent framework (ElizaOS, CrewAI, AutoGen, Hummingbot, Freqtrade).
For code-first integrations, use tradingcalc-sdk instead of raw JSON-RPC:
tc.call() is available for raw MCP access. Full docs: npmjs.com/package/tradingcalc-sdk
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/tradingcalc-2)<a href="https://allmcps.com/mcp/tradingcalc-2"><img src="https://allmcps.com/api/badge/tradingcalc-2?style=directory" alt="Tradingcalc on AllMCPs" /></a>