home / mcp / quant companion mcp server
Provides real-time options analytics, pricing, backtesting, and Monte Carlo simulations via MCP for Claude-based assistants.
Configuration
View docs{
"mcpServers": {
"ademscodeisnotsobad-quant-companion-mcp": {
"url": "https://mcp.example.com/quant-companion/mcp",
"headers": {
"POLYGON_API_KEY": "your_key_here"
}
}
}
}Quant Companion MCP is a server that connects Claude-based assistants to real-time options analytics, pricing, risk metrics, backtesting, and Monte Carlo simulations. It enables you to ask natural-language questions and receive deterministic, data-driven results without coding, using real market data and established math.
You interact with the MCP using a client that speaks the MCP protocol. Start Claude Desktop, ensure the MCP server is running, and then ask for real-time prices, option Greeks, volatility analyses, or backtests. You can request market data like current prices, historical prices, and options chains, or perform pricing with Black–Scholes and Monte Carlo methods. You can run strategy backtests, volatility comparisons, and risk analyses all through natural-language prompts.
Typical usage patterns include asking for current prices (e.g., a stock’s real-time price), requesting an option price with Greeks, running a Monte Carlo scenario, backtesting a moving-average strategy, or comparing forecast models. The system uses real data and deterministic mathematical models, so results should be consistent and explainable.
Prerequisites you need before starting: node.js 18+ installed on your machine and Claude Desktop installed.
Step 1: Clone the project repository and build the MCP server.
git clone https://github.com/ademscodeisnotsobad/quant-companion-mcp.git
cd quant-companion-mcp
npm install
npm run buildStep 2: Find the Claude config file on your system. Use the path that matches your operating system. If the file does not exist, create it.
Windows example path: %APPDATA%\Claude\claude_desktop_config.json (usually C:\Users\YourName\AppData\Roaming\Claude\claude_desktop_config.json)
macOS example path: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux example path: ~/.config/Claude/claude_desktop_config.json
Step 3: Add the MCP server configuration to your Claude config. Use the absolute path to the built MCP tool index file.
{
"mcpServers": {
"quant_companion": {
"command": "node",
"args": ["C:/full/path/to/quant-companion-mcp/packages/mcp-tools/dist/index.js"],
"env": {
"POLYGON_API_KEY": ""
}
}
}
}Important: Use the full absolute path. On Windows, you may use forward slashes or escaped backslashes.
Step 4: Completely quit Claude Desktop (not just close the window) and reopen it to apply the new MCP server configuration.
Step 5: Verify the server is working by asking for a real-time price in a new chat. For example, ask for AAPL’s price right now and confirm you receive a live quote.
Optional: Enable richer data access with Polygon.io by providing an API key. This increases rate limits for options data. If you have a Polygon API key, place it in the config as shown.
{
"mcpServers": {
"quant_companion": {
"command": "node",
"args": ["C:/path/to/packages/mcp-tools/dist/index.js"],
"env": {
"POLYGON_API_KEY": "your_key_here"
}
}
}
}The system will fall back to Yahoo Finance data if Polygon rate limits are reached.
Market Data: get_current_price, get_historical_prices, get_options_chain.
Options Pricing: price_option_black_scholes, price_option_monte_carlo, compute_implied_vol.
Volatility Analysis: compute_historical_vol, get_vol_smile, get_vol_surface, summarize_vol_regime.
Simulations & Forecasting: simulate_price, simulate_price_with_local_vol, compare_models_forecast_distribution, backtest_forecast_accuracy.
Risk & Strategy: compute_risk_metrics, run_backtest, detect_unusual_activity.
Claude / AI Assistant communicates via MCP Protocol (stdio) to the mcp-tools backend, which provides a suite of 18 MCP tool definitions and multiple market data providers. The core math and analytics live in a pure functional library, with Black–Scholes pricing, Monte Carlo simulations, IV/volatility calculations, and risk/strategy tooling.
Run tests and build locally to contribute or customize further.
# Run tests
npm test
# Build all packages
npm run build
# Dev mode with auto-rebuild
npm run devClaude says it can't access the tools - Ensure the config path is absolute and correct - Ensure you built the MCP tools - Fully restart Claude Desktop (quit completely) and reopen it Getting rate limited - Add a Polygon API key for higher limits - Space out rapid-fire options chain requests Numbers look wrong - Check if the market is open; prices may be stale after hours - Options data can be delayed on free tiers Models like Heston/SABR may be slow on first use - The initial calibration can take a couple of seconds; subsequent calls are faster
Known issues include Yahoo Finance rate limits for options chains, potential slowness on first Heston calibration, and interpolation quirks at far out-of-the-money strikes.
MIT
Fetches the real-time price for stocks or ETFs.
Retrieves OHLCV data for a specified date range.
Returns the full options chain with strikes and expirations.
Prices European options using the Black-Scholes model and provides Greeks.
Prices options using Monte Carlo simulations with confidence intervals.
Backs out implied volatility from an observed option price.
Calculates realized volatility from price history.
Generates the implied vol curve across strikes for a single expiration.
Builds a full IV surface across strikes and maturities.
Interprets HV vs IV regimes and provides actionable takeaways.
GBM price simulations with probability analysis.
Skew-adjusted simulations using a vol surface.
Compares forecast distributions across models (GBM, Local Vol, SABR, Heston).
Evaluates historical accuracy of forecast models.
Calculates Sharpe, Sortino, max drawdown, and VaR.
Backtests of strategies like MA crossover, momentum, mean reversion, or dual momentum.
Analyzes options flow for unusual activity signals.