Metadata-Version: 2.4
Name: options-trader-x-mcp
Version: 0.2.1
Summary: MCP server for Options Trader X — options screening, portfolio analytics, and strategy comparison via Claude Desktop
License-Expression: MIT
Requires-Python: >=3.10
Requires-Dist: httpx<1.0,>=0.24
Requires-Dist: mcp<2.0,>=1.6
Provides-Extra: test
Requires-Dist: anyio; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-anyio; extra == 'test'
Description-Content-Type: text/markdown

# Options Trader X MCP Server

MCP server for Options Trader X — 20 tools and 2 resources for options screening, chain browsing, trade finding, portfolio management, and market data. Connect Claude Desktop, Cursor, or any MCP-compatible AI assistant.

## Tools (20)

| Category | Tool | Description |
|----------|------|-------------|
| Screening | `screen_csp` | Screen for cash-secured puts |
| Screening | `screen_cc` | Screen for covered calls |
| Screening | `screen_credit_spreads` | Screen for credit spreads (bull put / bear call) |
| Screening | `screen_long_calls` | Screen for long call options |
| Screening | `screen_long_puts` | Screen for long put options |
| Screening | `screen_debit_spreads` | Screen for debit spreads (bull call / bear put) |
| Trade Finding | `find_trades` | Find best strategies for a ticker given thesis, goal, and capital. Progressive fallback — never returns empty. |
| Trade Finding | `compare_strategies` | Compare CSP vs LEAP strategies side-by-side |
| Market Data | `get_chain` | Browse raw options chain for a ticker with filtering by expiration, type, volume, and open interest |
| Market Data | `get_option_quote` | Get detailed quote for a single option contract — pricing, greeks, activity, valuation, probabilities |
| Market Data | `get_iv_rank` | Get IV rank and IV percentile for any ticker |
| Market Data | `get_earnings` | Get earnings data or upcoming earnings calendar. 5-level fallback chain for reliable data. |
| Portfolio | `get_portfolio` | Get portfolio details, metrics, open trades, positions, and spreads |
| Portfolio | `get_positions` | Get stock positions (shares held) |
| Portfolio | `add_trade` | Add a trade (BUY/SELL, PUT/CALL) |
| Portfolio | `close_trade` | Close a trade with exit price |
| Portfolio | `add_spread` | Add a spread (12 types supported) |
| Portfolio | `close_spread` | Close a spread with exit price |
| Portfolio | `add_position` | Add a stock position |
| Portfolio | `refresh_prices` | Refresh live market prices |

## Resources (2)

- `otx://watchlists` — List all watchlists and tickers
- `otx://watchlist/{id}` — Get a specific watchlist

## Key Features

- **Filter rejection summaries** — Screeners explain WHY contracts were filtered out when results are empty
- **Progressive fallback** — `find_trades` widens DTE, tries all defined-risk strategies, and returns diagnostics with suggestions
- **5-level earnings fallback** — `get_earnings` chains multiple data sources for reliable coverage
- **Staleness timestamps** — All read tools show when data was last retrieved

## Setup

1. Generate an API key at your account page (Pro subscription required)
2. Install: `pip install options-trader-x-mcp`
3. Set environment variables and add to Claude Desktop config

See the full setup guide at `/docs/mcp-setup` on the Options Trader X website.
