QuantOracle

Add 73 Quant Tools to Your AI Agent in 60 Seconds with MCP

LLMs trying to compute Black-Scholes prices in-context are wrong by 5-30% depending on moneyness. Kelly fractions get flipped. Sharpe ratios fail at annualization. The agent can't tell. The Model Context Protocol (MCP) gives you a one-line fix.

Published May 28, 2026

This walkthrough wires 63 deterministic quant calculators plus 10 composite workflows into any MCP-capable agent — Claude Desktop, Cursor, Cline, Continue, Zed, or your own custom MCP client — in about 60 seconds. The tools are exactly the math you'd trust in production: Black-Scholes with full Greeks, Kelly Criterion, Monte Carlo, Sharpe / Sortino / Calmar, VaR / CVaR, options strategy optimization, hedging recommendations. Free tier handles most agentic use cases.

What you get

The QuantOracle MCP server (quantoracle-mcp on npm) exposes the full API surface as MCP tools the agent can call by name:

  • Options & derivatives (14 tools) — Black-Scholes, American (binomial), barrier, Asian, lookback options. Greeks, implied vol, payoff diagrams, option-chain analysis, put-call parity, strategy optimizer, spread scanner, volatility surface.
  • Risk & portfolio (12 tools) — Sharpe, Sortino, Calmar, VaR (historical + parametric), CVaR, max drawdown, Kelly, position sizing, correlation matrix, portfolio risk, stress test, transaction cost.
  • Statistics (11 tools) — Hurst exponent, GARCH forecast, realized vol, cointegration, polynomial / linear regression, distribution fit, probabilistic Sharpe, normal distribution, z-score.
  • Fixed income & FX (8 tools) — Bond pricing, amortization, credit spread, yield curve interpolation, forward rate, interest rate parity, PPP, carry trade.
  • Crypto & DeFi (7 tools) — Liquidation price, impermanent loss, DEX slippage, funding rate, APY ↔ APR conversion, rebalance threshold, vesting schedule.
  • TVM, macro, indicators (11 tools) — NPV, IRR, CAGR, future / present value, real yield, inflation-adjusted return, Taylor rule, ATR, Bollinger bands, Fibonacci retracement, technical indicators.
  • Composites (10 tools, paid via x402) — Full risk audit, hedge recommendation, portfolio health, portfolio optimization, rebalance plan, options strategy optimizer, backtest strategy, pairs trading signal, trade evaluator, regime classifier. Each composite chains 5-15 calculators internally.

Free tier vs paid composites

63 calculators are free up to 1,000 calls per IP per day — no signup, no API key. The 10 composite workflows cost $0.04 USDC each, settled on-chain via the x402 protocol on Base mainnet or Solana mainnet. When the agent calls a paid composite, it pays from the wallet you wire into the MCP client — no upstream auth, no billing dashboard.

For most agent workloads (price an option, size a position, simulate a portfolio path), the free tier is enough. Paid composites are for the "run a full risk audit on this return series" or "rank hedge structures for this position" one-shots that would otherwise be 5-15 separate tool calls.

Setup — Claude Desktop

Add this to claude_desktop_config.json (location varies — on macOS it's ~/Library/Application Support/Claude/claude_desktop_config.json; on Windows it's %APPDATA%\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "quantoracle": {
      "command": "npx",
      "args": ["-y", "quantoracle-mcp"]
    }
  }
}

Restart Claude Desktop. The hammer icon will show 73 new tools. Try a prompt like "Price a 30-day call on NVDA, strike $185, spot $180, 28% IV" — Claude will call options_price and return exact Black-Scholes math plus the full Greek set.

Setup — Cursor

In Cursor, open Settings → Features → MCP and add:

{
  "mcpServers": {
    "quantoracle": {
      "command": "npx",
      "args": ["-y", "quantoracle-mcp"]
    }
  }
}

Same tools, same free tier. Useful inside Cursor when you're building a quant backtest or wiring an API and want the model to verify formulas against a known-good reference implementation.

Setup — custom MCP client

If you're building your own MCP host (e.g. with the MCP TypeScript SDK), install the package and spawn it as a stdio child:

npm install quantoracle-mcp

# or run directly via npx:
npx -y quantoracle-mcp

Configure it like any other stdio MCP server — command: 'npx', args: ['-y', 'quantoracle-mcp']. The server exposes the full toolbelt, and the agent picks the right one per request.

Your first call

Once it's wired, the agent calls tools by name with structured JSON args. A Black-Scholes request looks like this from the MCP server's perspective:

// Tool call from agent → MCP server
{
  "name": "options_price",
  "arguments": {
    "S": 180,
    "K": 185,
    "T": 0.082,    // 30 days in years
    "r": 0.05,
    "sigma": 0.28,
    "option_type": "call"
  }
}

// Response back to the agent
{
  "price": 3.2417,
  "intrinsic": 0,
  "time_value": 3.2417,
  "greeks": {
    "delta": 0.412,
    "gamma": 0.0386,
    "theta": -0.0729,
    "vega": 0.1987,
    "rho": 0.0612
  },
  "prob_itm": 0.378
}

The agent gets a deterministic answer it can cite — same inputs, same outputs, every time. Try it against an LLM's in-context Black-Scholes attempt and you'll see the drift firsthand.

Paying for composites with x402

When the agent calls a composite like risk_full_analysis or hedging_recommend, the MCP server returns an x402 payment-required object. The protocol is wallet-handled — you can use the Coinbase AgentKit or any x402-aware client to settle the payment automatically. Both Base mainnet (EIP-3009) and Solana mainnet (SPL transfer with memo) are supported.

For agents using the MCP server directly without a wallet client, the composite tools will return a clear 402 response and the agent can either stop and ask the user to wire payment, or call the underlying free calculators individually (slower, more tool calls, same math).

The full surface

The complete tool catalog with input schemas is at api.quantoracle.dev/openapi.json. Every MCP tool maps 1:1 to a REST endpoint, so if you ever need to bypass MCP (e.g. for batch processing, raw HTTP, or a non-agentic workflow), you can hit the same math directly. The MCP layer is sugar on top.

The 15 calculators most commonly called are also live as interactive web tools on quantoracle.dev — useful for spot-checking an MCP response or sanity-testing inputs before wiring them into an agent.

Why deterministic finance math matters for MCP agents

MCP gives agents tools, but the tools are only as good as the math behind them. There are three failure modes when LLMs do financial math in-context that grounded MCP tools fix:

  1. Black-Scholes drift. GPT-4o and Claude both get the Greeks wrong by 5-30% depending on moneyness. The model doesn't flag the uncertainty — it just commits to a number. With options_price available, the agent calls it instead of guessing.
  2. Compound interest skips steps. A 30-year projection at 8% loses meaningful precision over the token sequence. tvm_future_value and simulate_montecarlo are bytes-exact.
  3. Kelly and VaR are mis-applied. LLMs frequently confuse arithmetic vs geometric returns, fail to annualize, or apply the parametric formula to a non-normal distribution. The MCP tools are tested against Hull, Wilmott, and Lopez de Prado reference implementations across 120 accuracy benchmarks.

What's next

If you're building a quant agent with a specific framework, the deeper framework-native tutorials are linked below — Vercel AI SDK, AgentKit, and a chained x402 workflow that pairs risk_full_analysis with hedging_recommend in a single agent loop. For broader framework selection, the agent framework comparison covers AgentKit vs GOAT vs Vercel AI SDK vs LangChain vs elizaOS with decision tables and migration paths.

For one-off verification or exploration without writing any code, the live calculators at quantoracle.dev hit the same engine.

Keep building

More tutorials on wiring deterministic quant tools into AI agents.

Try the calculators

The same computations this tutorial wires into an agent, runnable in the browser.