Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mcp-optionsflow

MCP.Pizza Chef: twolven

The mcp-optionsflow is a specialized MCP server designed to provide comprehensive options market analysis through Yahoo Finance data. It enables large language models to access detailed options chain information, calculate key Greeks (delta, gamma, theta, vega, rho), and perform implied volatility and probability assessments. The server supports evaluation of popular options strategies such as Credit Call Spreads, Put Credit Spreads, Cash Secured Puts, and Covered Calls, including position Greeks and liquidity analysis. It also offers robust risk management features like bid-ask spread analysis, volume and open interest validation, position sizing recommendations, maximum loss calculations, and probability of profit estimates. Built for integration with MCP and Claude.ai, this server empowers AI agents to deliver actionable insights for options trading and risk assessment in real time.

Use This MCP server To

Analyze options chains with real-time market data Calculate Greeks for options risk assessment Evaluate common options strategies automatically Perform implied volatility and probability analysis Assess liquidity and bid-ask spreads for trades Recommend position sizing and risk metrics Estimate maximum loss and probability of profit Validate volume and open interest for options Integrate options data into AI trading assistants Support multi-step reasoning on options strategies

README

OptionsFlow MCP Server

A Model Context Protocol (MCP) server providing advanced options analysis and strategy evaluation through Yahoo Finance. Enables LLMs to analyze options chains, calculate Greeks, and evaluate basic options strategies with comprehensive risk metrics.

Features

Options Analysis

  • Complete options chain data processing
  • Greeks calculation (delta, gamma, theta, vega, rho)
  • Implied volatility analysis
  • Probability calculations
  • Risk/reward metrics

Strategy Analysis

  • Credit Call Spreads (CCS)
  • Put Credit Spreads (PCS)
  • Cash Secured Puts (CSP)
  • Covered Calls (CC)
  • Position Greeks evaluation
  • Liquidity analysis
  • Risk metrics calculation

Risk Management

  • Bid-ask spread analysis
  • Volume and open interest validation
  • Position sizing recommendations
  • Maximum loss calculations
  • Probability of profit estimates

Installation

# Install dependencies
pip install -r requirements.txt

# Clone the repository
git clone https://github.com/twolven/mcp-optionsflow.git
cd mcp-optionsflow

Usage

Add to your Claude configuration: In your claude-desktop-config.json, add the following to the mcpServers section:

{
    "mcpServers": {
        "optionsflow": {
            "command": "python",
            "args": ["path/to/optionsflow.py"]
        }
    }
}

Replace "path/to/optionsflow.py" with the full path to where you saved the optionsflow.py file.

Available Tools

  1. analyze_basic_strategies
{
    "symbol": str,                    # Required: Stock symbol
    "strategy": str,                  # Required: "ccs", "pcs", "csp", or "cc"
    "expiration_date": str,          # Required: "YYYY-MM-DD"
    "delta_target": float,           # Optional: Target delta for CSP/CC (default: 0.3)
    "width_pct": float              # Optional: Width for spreads (default: 0.05)
}

Strategy Analysis Response Format

{
    "symbol": str,
    "strategy": str,
    "current_price": float,
    "expiration": str,
    "days_to_expiration": int,
    "analysis": {
        # Credit Call Spread / Put Credit Spread
        "strikes": {
            "short_strike": float,
            "long_strike": float
        },
        "metrics": {
            "credit": float,
            "max_loss": float,
            "max_profit": float,
            "probability_of_profit": float,
            "risk_reward_ratio": float
        },
        "greeks": {
            "net_delta": float,
            "net_theta": float,
            "net_gamma": float
        }
        
        # Cash Secured Put
        "strike": float,
        "metrics": {
            "premium": float,
            "max_loss": float,
            "assigned_cost_basis": float,
            "return_if_otm": float,
            "downside_protection": float
        },
        "greeks": {
            "delta": float,
            "theta": float,
            "gamma": float
        }
        
        # Covered Call
        "strike": float,
        "metrics": {
            "premium": float,
            "max_profit": float,
            "max_profit_percent": float,
            "upside_cap": float,
            "premium_yield": float
        },
        "greeks": {
            "position_delta": float,
            "theta": float,
            "gamma": float
        }
    }
}

Requirements

  • Python 3.12+
  • mcp
  • yfinance
  • pandas
  • numpy
  • scipy

Limitations

  • Data sourced from Yahoo Finance with potential delays
  • Options data availability depends on market hours
  • Rate limits based on Yahoo Finance API restrictions
  • Greeks calculations are theoretical and based on Black-Scholes model
  • Early assignment risk not factored into probability calculations

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Todd Wolven - (https://github.com/twolven)

Acknowledgments

  • Built with the Model Context Protocol (MCP) by Anthropic
  • Data provided by Yahoo Finance
  • Developed for use with Anthropic's Claude

mcp-optionsflow FAQ

How do I install the mcp-optionsflow server?
Clone the GitHub repository and install dependencies using 'pip install -r requirements.txt'.
Which data source does mcp-optionsflow use for options information?
It uses Yahoo Finance to provide comprehensive options chain data and market metrics.
Can mcp-optionsflow calculate all major Greeks?
Yes, it calculates delta, gamma, theta, vega, and rho for detailed risk analysis.
Does mcp-optionsflow support options strategy evaluation?
Yes, it supports Credit Call Spreads, Put Credit Spreads, Cash Secured Puts, and Covered Calls.
How does mcp-optionsflow help with risk management?
It analyzes bid-ask spreads, validates volume/open interest, recommends position sizing, and estimates max loss and profit probabilities.
Is mcp-optionsflow compatible with multiple LLM providers?
Yes, it is designed for MCP and works with models like Claude.ai, OpenAI, and Gemini.
Can I use mcp-optionsflow for real-time options trading insights?
Yes, it provides up-to-date options data and risk metrics for timely decision-making.
What programming languages or frameworks are required?
The server is Python-based and requires standard Python dependencies listed in the requirements file.