OptionsFlow MCP Server
Enables advanced options analysis and strategy evaluation through Yahoo Finance data. Supports calculating Greeks, analyzing risk metrics, and evaluating credit spreads, cash secured puts, and covered calls 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
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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.