
Connects Claude to 19 crypto futures calculators that return exact numbers instead of LLM estimates. You get PnL, liquidation prices, position sizing, funding costs, and carry trade analysis with formulas verified against 22 test vectors. Ask naturally and it routes to the right tool: "long BTC at $83k with 10x leverage, where's liquidation?" or "size my position for 1% risk with stop at $81k." Runs over streamable HTTP, so no local install needed. Free tier gives you 20 calls per day anonymous, 200 with an API key. Useful when you're building trading bots or agent pipelines where wrong math costs real money.
Public tool metadata for what this MCP can expose to an agent.
workflow.run_pnl_planningCalculate net PnL, ROE, fees and gross profit/loss for a futures trade. Use when user asks "what's my profit/loss on this trade?" Returns: grossPnl, fees, netPnl, netPnlUsdt, roe (%).6 paramsCalculate net PnL, ROE, fees and gross profit/loss for a futures trade. Use when user asks "what's my profit/loss on this trade?" Returns: grossPnl, fees, netPnl, netPnlUsdt, roe (%).
entryPricenumberexitPricenumberfeeClosePctnumberfeeOpenPctnumbersidestringlong · shortsizenumberworkflow.run_liquidation_safetyCalculate the liquidation price for an isolated-margin futures position. Use when user asks "where will I get liquidated?" or "how close is my liq price?". Returns: liquidationPrice, distancePct (how far from entry).4 paramsCalculate the liquidation price for an isolated-margin futures position. Use when user asks "where will I get liquidated?" or "how close is my liq price?". Returns: liquidationPrice, distancePct (how far from entry).
entryPricenumberleveragenumbermmrnumbersidestringlong · shortworkflow.run_breakeven_planningCalculate the break-even exit price that covers all trading fees. Use when user asks "what price do I need to just break even?" Returns: breakevenPrice, totalFees.5 paramsCalculate the break-even exit price that covers all trading fees. Use when user asks "what price do I need to just break even?" Returns: breakevenPrice, totalFees.
entryPricenumberfeeClosePctnumberfeeOpenPctnumbersidestringlong · shortsizeBasenumberworkflow.run_position_sizingCalculate the correct position size given a maximum risk in USDT and a stop-loss price. Use when user asks "how many coins should I buy?" or "size my position so I risk exactly $X". Returns: positionSize (base), positionUsdt, marginRequired.7 paramsCalculate the correct position size given a maximum risk in USDT and a stop-loss price. Use when user asks "how many coins should I buy?" or "size my position so I risk exactly $X". Returns: positionSize (base), positionUsdt, marginRequired.
entryPricenumberfeeClosePctnumberfeeOpenPctnumberleveragenumberriskUsdtnumbersidestringlong · shortstopLossnumberworkflow.run_funding_costCalculate the total funding cost (or income) for holding a perpetual futures position. Use when user asks "how much funding will I pay holding X days?" or "is funding eating my profit?". Returns: totalFundingUsdt (negative = you pay, positive = you receive), perIntervalUsdt.5 paramsCalculate the total funding cost (or income) for holding a perpetual futures position. Use when user asks "how much funding will I pay holding X days?" or "is funding eating my profit?". Returns: totalFundingUsdt (negative = you pay, positive = you receive), perIntervalUsdt.
daysnumberentryPricenumberfundingRatenumbersidestringlong · shortsizeBasenumberprimitive.average_entryCalculate the weighted average entry price from multiple buy/sell fills (DCA). Use when user has filled at multiple prices and asks "what's my average entry?" Returns: averagePrice, totalSize, totalCost.3 paramsCalculate the weighted average entry price from multiple buy/sell fills (DCA). Use when user has filled at multiple prices and asks "what's my average entry?" Returns: averagePrice, totalSize, totalCost.
exchangeCodestringinputobjectsymbolstringworkflow.run_exit_targetCalculate the exact exit price needed to hit a target PnL or ROE percentage. Use when user asks "at what price do I take profit to make $500?" or "where should I set TP for 20% ROE?". Returns: targetExitPrice.8 paramsCalculate the exact exit price needed to hit a target PnL or ROE percentage. Use when user asks "at what price do I take profit to make $500?" or "where should I set TP for 20% ROE?". Returns: targetExitPrice.
entryPricenumberfeeClosePctnumberfeeOpenPctnumberleveragenumbersidestringlong · shortsizeBasenumbertargetModestringpnl · roetargetValuenumberworkflow.run_scenario_planningRun a scenario analysis: compute PnL for multiple price-change percentages at once. Use when user asks "show me my P&L if BTC moves -10%, -5%, +5%, +10%". Returns: array of { deltaPct, exitPrice, netPnl, roe }.6 paramsRun a scenario analysis: compute PnL for multiple price-change percentages at once. Use when user asks "show me my P&L if BTC moves -10%, -5%, +5%, +10%". Returns: array of { deltaPct, exitPrice, netPnl, roe }.
deltasPctarrayentryPricenumberfeeClosePctnumberfeeOpenPctnumbersidestringlong · shortsizenumberworkflow.run_max_leverageCalculate the maximum safe leverage based on account size, max acceptable drawdown, and asset daily volatility. Use when user asks "what's the max leverage I should use on BTC?" or "how much leverage is safe given 3% daily volatility?". Returns: maxLeverage, marginAtRisk.4 paramsCalculate the maximum safe leverage based on account size, max acceptable drawdown, and asset daily volatility. Use when user asks "what's the max leverage I should use on BTC?" or "how much leverage is safe given 3% daily volatility?". Returns: maxLeverage, marginAtRisk.
accountSizenumbermaxDrawdownPctnumbermmrnumbervolatilityPctnumberprimitive.hedge_ratioCalculate the short perpetual futures position size needed to hedge a spot holding. Use when user asks "how much should I short to hedge my BTC?" or "what margin do I need for a 100% hedge?". Returns: hedgeNotional, requiredMargin, estimatedFundingCost.4 paramsCalculate the short perpetual futures position size needed to hedge a spot holding. Use when user asks "how much should I short to hedge my BTC?" or "what margin do I need for a 100% hedge?". Returns: hedgeNotional, requiredMargin, estimatedFundingCost.
fundingRatePctnumberhedgeRationumberleveragenumberspotSizenumberworkflow.run_funding_arbitrageCalculate funding rate arbitrage profit: annualized yield, net profit, and breakeven days for a long/short basis trade across two exchanges. Use when user asks "is this funding arb worth it?" or "how many days to break even on transfer fees?". Returns: netProfitUsdt, annualize...6 paramsCalculate funding rate arbitrage profit: annualized yield, net profit, and breakeven days for a long/short basis trade across two exchanges. Use when user asks "is this funding arb worth it?" or "how many days to break even on transfer fees?". Returns: netProfitUsdt, annualize...
durationDaysnumberintervalHoursnumber8 · 1longFundingRatenumberpositionSizenumbershortFundingRatenumbertransferFeePctnumberworkflow.run_compound_fundingProject capital growth from reinvesting perpetual futures funding income (compounding carry). Use when user asks "how much will I make compounding 0.01% funding for 90 days?" or "what's my APY on this carry position?". Returns: finalCapital, totalEarned, apy, growthTable.5 paramsProject capital growth from reinvesting perpetual futures funding income (compounding carry). Use when user asks "how much will I make compounding 0.01% funding for 90 days?" or "what's my APY on this carry position?". Returns: finalCapital, totalEarned, apy, growthTable.
durationDaysnumberfundingRatePctnumberinitialCapitalnumberintervalHoursnumber8 · 1reinvestPctnumberworkflow.run_pre_trade_checkFull pre-trade decision card: orchestrates position sizing, breakeven, liquidation, and funding cost in one call. Use when user describes a full trade setup and asks "should I take this trade?" or "run the numbers on this setup". Provide exchange+symbol to fetch live funding r...13 paramsFull pre-trade decision card: orchestrates position sizing, breakeven, liquidation, and funding cost in one call. Use when user describes a full trade setup and asks "should I take this trade?" or "run the numbers on this setup". Provide exchange+symbol to fetch live funding r...
account_balancenumberentry_pricenumberexchangestringfee_close_pctnumberfee_open_pctnumberfunding_ratenumberhold_hoursnumberleveragenumbermmrnumberrisk_pctnumbersidestringlong · shortstop_lossnumbersymbolstringworkflow.run_risk_rewardFull risk:reward analysis — the single best tool when user describes a trade with entry, stop, and target. Calculates R:R ratio, position size, liquidation price, breakeven, and P&L at both stop and target. Returns a verdict: strong (3:1+) / good (2:1+) / marginal / poor. Use...10 paramsFull risk:reward analysis — the single best tool when user describes a trade with entry, stop, and target. Calculates R:R ratio, position size, liquidation price, breakeven, and P&L at both stop and target. Returns a verdict: strong (3:1+) / good (2:1+) / marginal / poor. Use...
account_balancenumberentry_pricenumberfee_close_pctnumberfee_open_pctnumberleveragenumbermmrnumberrisk_pctnumbersidestringlong · shortstop_lossnumbertake_profitnumberworkflow.run_dca_entryDCA entry planner: weighted average entry price, breakeven, and per-level contribution from multiple fill prices and sizes. Use when user bought at several prices and asks "what's my average entry?" or "where is my DCA breakeven?". Returns: averageEntry, breakeven, per-level s...4 paramsDCA entry planner: weighted average entry price, breakeven, and per-level contribution from multiple fill prices and sizes. Use when user bought at several prices and asks "what's my average entry?" or "where is my DCA breakeven?". Returns: averageEntry, breakeven, per-level s...
entriesarrayfee_close_pctnumberfee_open_pctnumbersidestringlong · shortworkflow.run_scale_outScale-out planner: P&L, ROI, and cumulative P&L for each partial exit level. Use when user wants to take profit at multiple targets — "close 30% at $90k, 30% at $95k, 40% at $100k — what's my total P&L?". Returns: per-level pnl, weightedAvgExitPrice, totalRoi.6 paramsScale-out planner: P&L, ROI, and cumulative P&L for each partial exit level. Use when user wants to take profit at multiple targets — "close 30% at $90k, 30% at $95k, 40% at $100k — what's my total P&L?". Returns: per-level pnl, weightedAvgExitPrice, totalRoi.
entry_pricenumberexitsarrayfee_close_pctnumberfee_open_pctnumbersidestringlong · shorttotal_sizenumberworkflow.run_carry_tradeDelta-neutral carry trade (funding arbitrage) analysis. Use when user asks "is this carry trade worth it?" — long on exchange A, short on exchange B, collect the funding rate spread. Returns: netYieldPct, grossProfit, netProfit, breakevenDays, verdict (profitable/marginal/loss).6 paramsDelta-neutral carry trade (funding arbitrage) analysis. Use when user asks "is this carry trade worth it?" — long on exchange A, short on exchange B, collect the funding rate spread. Returns: netYieldPct, grossProfit, netProfit, breakevenDays, verdict (profitable/marginal/loss).
funding_rate_longnumberfunding_rate_shortnumberhold_daysnumberinterval_hoursnumber1 · 8notionalnumbertransfer_fee_pctnumberworkflow.run_funding_breakevenPrice move needed to cover funding cost + fees over a holding period. Use when user asks "how much does BTC need to move for me to profit after funding?" or "is funding killing my edge on this trade?". Returns: breakevenWithFunding, breakevenWithoutFunding, requiredMovePct.7 paramsPrice move needed to cover funding cost + fees over a holding period. Use when user asks "how much does BTC need to move for me to profit after funding?" or "is funding killing my edge on this trade?". Returns: breakevenWithFunding, breakevenWithoutFunding, requiredMovePct.
entry_pricenumberfee_close_pctnumberfee_open_pctnumberfunding_ratenumberhold_hoursnumbersidestringlong · shortsizenumbersystem.verifyRun the full regression suite — 22 canonical test vectors across all 12 calculators — and return a pass/fail report with counts and timestamp. Call this before using results in production workflows to confirm the computation layer is operating correctly.Run the full regression suite — 22 canonical test vectors across all 12 calculators — and return a pass/fail report with counts and timestamp. Call this before using results in production workflows to confirm the computation layer is operating correctly.
No parameter schema in public metadata yet.
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."
32 deterministic tools across trade planning, risk & margin, funding/carry, market-structure (Market Profile) analysis, chain-agnostic on-chain tools — Solana (token safety, swap price impact, bonding curve) plus Solana + 5 EVM chains for market cap comparison and wallet flag check — and prediction-market odds from Kalshi's public crypto-price category. Formulas verified against 35 canonical test vectors: same inputs always produce the same outputs. Every response is also signed with ECDSA P-256, so you can verify offline that it actually came from us. 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 |
| Full API & MCP reference | https://docs.tradingcalc.io/api | None |
| Verification proof | https://tradingcalc.io/verify | None |
MCP transport: Streamable HTTP (MCP spec 2024-11-05)
Add to claude_desktop_config.json:
{
"mcpServers": {
"tradingcalc": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://tradingcalc.io/api/mcp"]
}
}
}
{
"tradingcalc": {
"url": "https://tradingcalc.io/api/mcp"
}
}
For coding agents that support the skills.sh ecosystem (Claude Code, Cursor,
GitHub Copilot, and others) — installs a SKILL.md that teaches the agent when to reach for these
tools instead of estimating trade math itself:
npx skills add SKalinin909/tradingcalc-mcp
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_liquidation_safety",
"arguments": {
"side": "long",
"entryPrice": 95000,
"leverage": 10
}
}
}'
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?"
Token safety check
"Is this Solana token a rug pull risk? Mint: DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"
Swap price impact
"How much slippage will I eat swapping 50,000,000 BONK to USDC?"
Bonding curve
"How many tokens do I get buying with 1 SOL on a pump.fun curve that's already raised 20 SOL?"
Market cap comparison
"If I put $1,000 into BONK and it reaches JUP's market cap, what's it worth?"
Wallet flag check
"Is this wallet address flagged for anything? [address]" (Solana or EVM)
Odds converter
"What odds does a 35% probability work out to?"
Market-implied odds
"What does the market think BTC will be worth by year end?"
Prediction market edge
"I think this event is 60% likely but the market prices it at 40%. Should I bet, and how much with a $10k bankroll?"
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.
| Category | Tools |
|---|---|
| Trade Planning | PnL, break-even, exit target, scenario, DCA entry, scale-out (6) |
| Risk & Margin | Liquidation safety, position sizing, max leverage, risk/reward (4) |
| Funding & Carry | Funding cost, funding arbitrage, compound funding, funding break-even, carry trade (5) |
| Market Structure (Market Profile) | Open analysis, session structure, value migration, breakout acceptance (4) |
| Primitives | Average entry, hedge ratio (2) |
| Integrated Decision | Pre-trade check — sizing + liquidation + breakeven + funding + go/no-go in one call (1) |
| On-chain (Solana + 5 EVM chains, per tool) | Token risk check, swap price impact, bonding curve, market cap comparison, wallet flag check (5) |
| Prediction Markets (Kalshi crypto-price) | Odds converter, market-implied odds, prediction-market edge (3) |
| System | system.verify — run 35 canonical test vectors, get a pass/fail report; system.pubkey — get the public key to verify signed responses offline (2) |
Full tool-by-tool reference (every input/output schema, request/response examples, per-tool descriptions): docs.tradingcalc.io/api
Formulas normalized across 16 exchanges: Binance, OKX, Bybit, Aster, Hyperliquid, MEXC, KuCoin, Gate, Deribit, Kraken, HTX, WOO, Phemex, Blofin, Backpack, dYdX.
| 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 35 canonical test vectors before trusting results:
{
"jsonrpc": "2.0", "id": 1,
"method": "tools/call",
"params": { "name": "system.verify", "arguments": {} }
}
Response: { "status": "pass", "passed": 35, "failed": 0, "total": 35 }
Live proof: tradingcalc.io/verify
system.verify proves the formulas are correct. It doesn't prove the specific response you got
wasn't altered by a proxy, cache, or MITM in between. Every tools/call result carries a second
content block signed with ECDSA P-256, plus X-TradingCalc-Signature/Kid/Signed-At headers.
Call system.pubkey (or GET /api/mcp/pubkey) for the public key (PEM + JWK) and the canonical
string format needed to verify offline, no callback required.
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).
import { RiskAgent, preTradeGate } from './examples/risk-agent-wrapper';
const agent = new RiskAgent({ apiKey: 'tc_your_key', minLiqDistancePct: 3.0 });
const result = await agent.evaluate({
symbol: 'BTCUSDT', exchange: 'bybit',
side: 'long', entry_price: 83000, stop_loss: 81000,
account_balance: 10000, risk_pct: 1, leverage: 5,
funding_rate: 0.0001, hold_hours: 24,
});
if (result.approved) {
// execute trade: result.recommended_size, result.liquidation_price
} else {
console.log('Rejected:', result.rejection_reason);
}
// Binary gate for execution bots
const ok = await agent.isSafe({ symbol: 'ETHUSDT', side: 'short', ... });
// Standalone function (minimal integration)
const { approved, size, liqPrice } = await preTradeGate({ ... }, 'tc_your_key');
For code-first integrations, use tradingcalc-sdk instead of raw JSON-RPC:
npm install tradingcalc-sdk
import { TradingCalcClient } from 'tradingcalc-sdk';
const tc = new TradingCalcClient({ apiKey: 'tc_your_key' });
// Workflows: orchestrated decisions
const check = await tc.workflows.preTradeCheck({ side: 'long', entry_price: 83000, leverage: 5, funding_rate: 0.0001, account_balance: 5000 });
// Primitives: single formula
const avg = await tc.primitives.averageEntry({ symbol: 'BTCUSDT', input: { fills: [{ price: 83000, quantity: 0.1 }] } });
// System
const report = await tc.system.verify();
tc.call() is available for raw MCP access. Full docs: npmjs.com/package/tradingcalc-sdk