TradingCalc MCP Server
Provides tools for calculating trade PnL, position sizing, liquidation prices, breakeven, and funding costs for Binance futures.
Provides a risk agent wrapper that integrates with CrewAI workflows for pre-trade risk evaluation and execution gating.
Provides tools for calculating trade PnL, position sizing, liquidation prices, breakeven, and funding costs for KuCoin futures.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TradingCalc MCP ServerSize my position: $10k account, 1% risk, long BTC at $83k, stop at $81k."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TradingCalc MCP Server
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.
Endpoints
Surface | URL | Auth |
MCP |
| Bearer optional (free) |
For agents / setup |
| None |
Verification proof |
| None |
MCP transport: Streamable HTTP (MCP spec 2024-11-05)
Related MCP server: mcp-binance-futures
Quick Start
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"tradingcalc": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://tradingcalc.io/api/mcp"]
}
}
}Cursor / VS Code
{
"tradingcalc": {
"url": "https://tradingcalc.io/api/mcp"
}
}Direct HTTP
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
}
}
}'Example prompts
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?"
Tools (23)
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.
Trade Planning
Tool | Description |
| Net PnL, fees and gross profit/loss for a futures trade |
| Break-even price accounting for entry/exit fees |
| Exit price required to hit a target PnL or ROE |
| Multi-scenario P&L analysis across price targets |
| DCA across N price levels → avg entry, breakeven, level contribution |
| Partial exits at multiple levels → P&L per exit, weighted avg, overall ROI |
Risk & Margin
Tool | Description |
| Liquidation price for long/short isolated margin |
| Position size based on account size and max risk % |
| Maximum safe leverage based on drawdown tolerance and volatility |
| Full R:R analysis: sizing + liquidation + breakeven + P&L at stop and target |
Funding & Carry
Tool | Description |
| Cumulative funding cost over a holding period |
| Annualized yield from long/short basis trades across two exchanges |
| Capital growth projection from reinvesting funding income |
| Price move needed to cover funding cost + fees over holding period |
| Delta-neutral carry setup: net yield, ROI, breakeven days, verdict |
Market Structure (Market Profile)
Tool | Description |
| Open location + type (OD/OTD/ORR/OAIR), VAH/VAL/VPOC/IB, scenario framing |
| Day-type classifier — trend / balance / neutral_trend / normal / normal_var |
| Value-area migration across sessions — directional conviction vs balance |
| Breakout acceptance vs rejection beyond the value area (optional delta) |
Primitives
Tool | Description |
| Average entry price after DCA into a position |
| Short perp size and funding cost to hedge a spot position |
Integrated Decision
Tool | Description |
| Full pre-trade decision: position size, liquidation, breakeven, funding cost, go/no-go signal. Accepts live exchange + symbol. |
System
Tool | Description |
| Run 22 canonical test vectors against all calculators. Returns pass/fail report. |
Formulas normalized across 7 exchanges: Binance, Bybit, OKX, Hyperliquid, Aster, KuCoin, MEXC.
Rate Limits
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>
Self-Verification
Agents can verify all 22 canonical test vectors before trusting results:
{
"jsonrpc": "2.0", "id": 1,
"method": "tools/call",
"params": { "name": "system.verify", "arguments": {} }
}Response: { "status": "pass", "passed": 22, "failed": 0, "total": 22 }
Live proof: tradingcalc.io/verify
Use Cases
Trading bots — check liquidation price before every trade
AI agents — deterministic risk calculations without hallucination risk
Multi-agent systems — drop-in risk management agent in analyst + risk + execution pipelines
Dashboards — embed calculations programmatically
Why deterministic?
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.
Risk Agent Wrapper
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');TypeScript SDK
For code-first integrations, use tradingcalc-sdk instead of raw JSON-RPC:
npm install tradingcalc-sdkimport { 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
Links
For agents: tradingcalc.io/for-agents
For agents: tradingcalc.io/for-agents
Verification proof: tradingcalc.io/verify
Web calculators: tradingcalc.io
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceEnables users to search, analyze, and trade on Kalshi prediction markets directly through MCP-compatible clients. It supports portfolio management, market data retrieval, and limit order execution with production-grade authentication and rate limiting.Last updatedMIT
- AlicenseAqualityCmaintenanceMCP server for Binance USDT-M Futures trading — exposes tools for market data, account state, order management, and position/margin control.Last updated236Apache 2.0
- AlicenseAqualityBmaintenance63 deterministic quant computation tools for autonomous financial agents. Options pricing, derivatives, risk metrics, portfolio optimization, statistics, crypto/DeFi, macro/FX, time value of money. 1,000 free calls/day, no signup required.Last updated7410MIT
- AlicenseAqualityBmaintenanceA Model Context Protocol server that gives any MCP client two economic-safety tools: realizable quote and pretrade check, paid per call in USDC with no accounts.Last updated2640MIT
Related MCP Connectors
Hosted MCP for stocks, options, Greeks, brokers, order previews, alerts, and workflows.
No-KYC managed MCP for AI agents: sandboxed TypeScript trading SDK, isolated sub-accounts, futures.
Solana MCP for wallets, trades, markets, PnL, transfers, onchain data, signable swaps and API tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/SKalinin909/tradingcalc-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server