# tradingcalc-mcp

19 deterministic crypto futures calculators and workflows across 4 suites. Trade planning, risk & margin, funding & carry. Formulas normalized across 7 exchanges (Binance, Bybit, OKX, Hyperliquid, ME…

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add tradingcalc/tradingcalc-mcp

# Browse available tools
npx -y @smithery/cli@latest tool list tradingcalc/tradingcalc-mcp

# Get full schema for a tool
npx -y @smithery/cli@latest tool get tradingcalc/tradingcalc-mcp workflow.run_pnl_planning

# Call a tool
npx -y @smithery/cli@latest tool call tradingcalc/tradingcalc-mcp workflow.run_pnl_planning '{}'
```

## Direct MCP Connection

Endpoint: `https://tradingcalc-mcp--tradingcalc.run.tools`

## Tools (19)

- `workflow.run_pnl_planning` — Calculate net PnL, ROE, fees and gross profit/loss for a futures trade. Use when user asks "what's my profit/loss on th…
- `workflow.run_liquidation_safety` — Calculate the liquidation price for an isolated-margin futures position. Use when user asks "where will I get liquidate…
- `workflow.run_breakeven_planning` — Calculate the break-even exit price that covers all trading fees. Use when user asks "what price do I need to just brea…
- `workflow.run_position_sizing` — Calculate the correct position size given a maximum risk in USDT and a stop-loss price. Use when user asks "how many co…
- `workflow.run_funding_cost` — Calculate the total funding cost (or income) for holding a perpetual futures position. Use when user asks "how much fun…
- `primitive.average_entry` — Calculate the weighted average entry price from multiple buy/sell fills (DCA). Use when user has filled at multiple pri…
- `workflow.run_exit_target` — Calculate the exact exit price needed to hit a target PnL or ROE percentage. Use when user asks "at what price do I tak…
- `workflow.run_scenario_planning` — Run a scenario analysis: compute PnL for multiple price-change percentages at once. Use when user asks "show me my P&L …
- `workflow.run_max_leverage` — Calculate the maximum safe leverage based on account size, max acceptable drawdown, and asset daily volatility. Use whe…
- `primitive.hedge_ratio` — Calculate the short perpetual futures position size needed to hedge a spot holding. Use when user asks "how much should…
- `workflow.run_funding_arbitrage` — Calculate funding rate arbitrage profit: annualized yield, net profit, and breakeven days for a long/short basis trade …
- `workflow.run_compound_funding` — Project capital growth from reinvesting perpetual futures funding income (compounding carry). Use when user asks "how m…
- `workflow.run_pre_trade_check` — Full pre-trade decision card: orchestrates position sizing, breakeven, liquidation, and funding cost in one call. Use w…
- `workflow.run_risk_reward` — Full risk:reward analysis — the single best tool when user describes a trade with entry, stop, and target. Calculates R…
- `workflow.run_dca_entry` — DCA entry planner: weighted average entry price, breakeven, and per-level contribution from multiple fill prices and si…
- `workflow.run_scale_out` — Scale-out planner: P&L, ROI, and cumulative P&L for each partial exit level. Use when user wants to take profit at mult…
- `workflow.run_carry_trade` — Delta-neutral carry trade (funding arbitrage) analysis. Use when user asks "is this carry trade worth it?" — long on ex…
- `workflow.run_funding_breakeven` — Price move needed to cover funding cost + fees over a holding period. Use when user asks "how much does BTC need to mov…
- `system.verify` — Run the full regression suite — 22 canonical test vectors across all 12 calculators — and return a pass/fail report wit…

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get tradingcalc/tradingcalc-mcp <tool-name>
```
