tastytrade-mcp
The tastytrade-mcp server connects an AI agent to the Tastytrade brokerage platform, enabling market scanning, options analysis, account management, and optional live trading.
Read-Only Tools (Always Available)
get_connection_status— Check connectivity, verify credentials, and confirm active environment (sandbox vs. production)get_market_overview— Scan symbols for IV rank/percentile, IV, beta, liquidity, earnings dates, and last trade priceget_option_chain— Retrieve full option chains (expirations, strikes, symbols) for equities or futures; supports live Greeks (delta, gamma, theta, IV)get_strategies— Build delta-based iron condor candidates with live credit estimates, probability of profit, and four legsget_account_info— View balances, buying power, and deployment metricsget_positions— List open positions with quantities and P&Llist_accounts— List all accounts available to the authenticated sessionget_working_orders— View live/unfilled working orders for an accountget_watchlists— Retrieve private watchlists (all or by name)
Live Trading Tools (Only when ENABLE_LIVE_TRADING=true)
execute_trade— Place option orders (with dry-run validation and buying power checks)adjust_order— Modify existing working ordersclose_position— Close an open positionmanage_watchlist— Create, update, or delete watchlists
Safety Features: Live trading requires explicit opt-in (ENABLE_LIVE_TRADING=true) and dry_run=false; includes pre-flight validation, buying power buffer, account-wide deployment cap, and secure credential storage via OS keyring.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tastytrade-mcp Show me my account summary and open positions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
tastytrade-mcp
An MCP server that lets an autonomous AI agent (Claude, etc.) connect to Tastytrade — scan markets, build option strategies, inspect accounts/positions/orders, and (optionally) place and manage trades.
OAuth2 authentication via the official
tastytradePython SDK (session tokens auto-refresh; refresh tokens are long-lived).Credentials stored in the OS keyring (Windows Credential Manager / DPAPI, macOS Keychain, Linux Secret Service) — never in files, never in env vars, never logged.
Live trading is gated behind
ENABLE_LIVE_TRADING— disabled by default so an agent cannot place real orders without an explicit opt-in.stdio transport by default; optional HTTP transport hardened with CORS and per-IP rate limiting.
Install
pip install -e . # or: pip install -e .[dev] for testsRelated MCP server: tastytrade-mcp
1. Create a Tastytrade OAuth application
In the Tastytrade web app, open Manage → My Profile → API → OAuth Applications.
Create an application, select the scopes you need (read + trading), and add
http://localhost:8000as a valid redirect/callback URI.Save the client secret (shown once).
Create a grant to obtain a long-lived refresh token.
Never paste secrets into code,
.env, or version control.
2. Store credentials in the keyring
tastytrade-mcp secrets set
tastytrade-mcp secrets statusYou'll be prompted (hidden input) for the client secret, refresh token, and an
optional default account number. secrets status also shows which keyring backend
is active — useful for diagnosing credential issues on a new machine.
Headless Linux (servers, Docker, CI)
Desktop Linux uses GNOME Keyring or KWallet. On headless systems (no desktop daemon) the native backend is unavailable. Install the encrypted-file fallback:
pip install 'tastytrade-mcp[headless]'
export PYTHON_KEYRING_BACKEND=keyrings.alt.file.EncryptedKeyring
tastytrade-mcp secrets setEncryptedKeyring stores secrets in ~/.local/share/python_keyring/cryptedpass.cfg
encrypted with a master password you set on first use. Keep this file out of
version control. PYTHON_KEYRING_BACKEND selects the backend only; it is not a secret.
3. Configure
Copy .env.example to .env and adjust. Key flags:
Variable | Default | Meaning |
|
| Register order-placing tools |
|
| Force all orders to dry-run (propose-only mode) |
|
| Percent of buying power always kept in reserve (per order) |
|
| Account-wide cap on deployed buying power (from live positions) |
|
| Allowed CORS origin (HTTP transport) |
|
| Per-IP rate limit (HTTP transport) |
|
| HTTP bind address |
4. Run
tastytrade-mcp # stdio (default)
tastytrade-mcp --transport http # HTTP, CORS + rate limitedConnect an agent (stdio)
Claude Desktop / Claude Code MCP config:
{
"mcpServers": {
"tastytrade": {
"command": "tastytrade-mcp"
}
}
}Tools
Always available (read-only):
get_connection_status, get_market_overview, get_option_chain,
get_strategies, get_account_info, get_positions, list_accounts,
get_working_orders, get_watchlists.
Only when ENABLE_LIVE_TRADING=true:
execute_trade, adjust_order, close_position, manage_watchlist.
Order tools default to dry_run=true (validate without submitting).
Underlying last price
get_market_overview now includes a last field (most recent trade price
from DXLink) alongside the IV metrics for each symbol. Pass it directly as
around_price in get_strategies and get_option_chain:
get_market_overview({ "symbols": ["XSP"] })
// -> { "ok": true, "metrics": [{ "symbol": "XSP", "last": 736.55,
// "implied_volatility_index_rank": "0.48", ... }] }last is streamed in parallel with the metrics fetch (best-effort, 4 s timeout).
It is omitted per symbol when the DXLink feed is unavailable — fall back to the
ATM strike from get_option_chain in that case.
Futures options
Both get_option_chain and get_strategies work with futures-options underlyings.
Pass the futures root symbol prefixed with /:
get_option_chain({ "symbol": "/ES", "expiration": "2026-06-27",
"include_greeks": true, "around_price": 5650.0 })
get_strategies({ "symbol": "/ES", "target_dte": 0, "short_delta": 0.10,
"wing_width": 25, "around_price": 5650.0 })The response shape is identical to equity options. instrument_type on each leg
will be "Future Option" instead of "Equity Option" — use the correct value
when constructing order legs for execute_trade. contract_multiplier in the
get_strategies response reflects the option-to-futures ratio (typically 1.0);
the dollar value per point depends on the underlying futures contract's own
multiplier (e.g. $50/point for /ES, $5/point for /MES) — verify before sizing.
Delta-based iron condor construction
get_strategies builds a complete iron condor candidate with live credit and POP
estimates. Pass around_price (the underlying's last price from get_market_overview)
so strike selection uses live greeks from the DXLink feed — without it, the
tool cannot center its greeks window and falls back to a positional heuristic
that will pick the wrong strikes on large chains (e.g. XSP, SPX):
get_strategies({
"symbol": "XSP",
"target_dte": 0,
"short_delta": 0.15,
"wing_width": 5,
"around_price": 738.50 // always pass — required for delta-accurate strikes
})
// -> {
// "ok": true,
// "strategy": "iron_condor",
// "net_credit": 1.20,
// "net_credit_per_contract": 120.0,
// "estimated_pop": 0.70,
// "quotes_complete": true,
// "greeks_used_for_strike_selection": true, // false = fell back to heuristic
// "legs": {
// "short_put": { "strike_price": "736", "symbol": "XSP...P736", ... },
// "long_put": { "strike_price": "731", "symbol": "XSP...P731", ... },
// "short_call": { "strike_price": "739", "symbol": "XSP...C739", ... },
// "long_call": { "strike_price": "744", "symbol": "XSP...C744", ... }
// }
// }greeks_used_for_strike_selection — check this field before acting on the
result. When false, the greeks feed was unavailable and the tool fell back to
picking the lower/upper third of the full strike list, which is rarely the right
delta on a large chain. Cross-check the returned strikes against get_option_chain
deltas before entry.
quotes_complete — when false, net_credit is null (the DXLink quote
feed was temporarily unavailable). Do not estimate credit from strike prices;
retry next iteration.
Per-strike greeks on the option chain
get_option_chain returns instrument fields per strike by default. Pass
include_greeks=true to merge live delta, gamma, theta, and iv
(annualized implied volatility) into each strike — useful for verifying strike
placement, detecting put/call skew from per-strike IV, and assessing 0DTE gamma
risk:
get_option_chain({
"symbol": "XSP",
"expiration": "2026-06-20", // recommended with greeks (bounds the fetch)
"include_greeks": true,
"strike_count": 15, // ATM window: 15 strikes each side (default); null = full chain
"around_price": 581.40, // center on the underlying's last price
"greeks_timeout": 6.0
})
// -> chain[expiration] = [
// { "strike_price": "580", "option_type": "Put", "symbol": "...",
// "streamer_symbol": ".XSP...", "delta": -0.18, "gamma": 0.042,
// "theta": -0.95, "iv": 0.187 }, ... ]Greeks come from the DXLink streaming feed (not the chain endpoint), so this
adds latency and is opt-in. With include_greeks and no expiration, the tool
defaults to the nearest expiration to bound the subscription. An ATM window
is applied by default (strike_count defaults to 15 strikes each side of the
money, centered on around_price or the median strike) to keep the subscription
small and fast; pass strike_count: null for the full chain. If the feed is slow
or unavailable, the chain is still returned and greeks_complete / greeks_received
report coverage rather than failing.
Order safety layers
A live order requires all of the following, so it cannot happen by accident:
ENABLE_LIVE_TRADING=true— otherwise the order tools are not registered at all.FORCE_DRY_RUN=false— when set totrue, every order is forced to dry-run regardless of what the agent requests ("propose-only" mode).The agent explicitly passes
dry_run=falseon the call.
Before any submission, execute_trade / adjust_order run a pre-flight
dry-run and validate buying power: the order is rejected if it would leave
projected buying power below the required reserve (BUYING_POWER_BUFFER_PCT of
current buying power; with the default 0 it only blocks orders that would go
negative), or if the API returns errors. Rejections return
{"ok": false, "error": "pre-flight validation failed", "problems": [...]} and
nothing is submitted. The projected buying-power effect — including
required_reserve and buffer_pct when a buffer is set — is returned on every
call under "buying_power".
Account-wide deployment cap. ACCOUNT_DEPLOY_LIMIT_PCT adds a ceiling on
total deployed buying power (vs. the per-order BUYING_POWER_BUFFER_PCT). It is
derived from live account state — used_derivative_buying_power vs.
derivative_buying_power — not an in-memory counter. Capacity = used + available;
the limit is that percent of capacity, and an order is rejected if it would push
deployed buying power past it. Because it reads the account each time, it counts
buying power consumed by existing positions (even ones this server didn't
place) and stays correct across restarts and multiple server instances. The
figures (account_deployed_current, account_deployed_after,
account_deploy_limit, account_buying_power_capacity) appear in the
"buying_power" block.
Safety
Account numbers are masked in logs to the last 4 digits (
****1234); secrets are never logged.HTTP transport restricts CORS to a single configured origin and rate-limits to 120 requests/minute per IP (HTTP 429 when exceeded).
Development
pip install -e .[dev]
pytest # unit + integration tests (SDK mocked, no network)
pytest --cov # with coverage reportLive integration tests
A separate, opt-in suite hits the real Tastytrade API using your stored
credentials to confirm the SDK + OAuth + API contract works end-to-end. It is
skipped by default and never submits a real order (the test server runs with
force_dry_run=true). To run it:
tastytrade-mcp secrets set # if not already stored
RUN_LIVE=1 pytest -m live -vTests that depend on endpoints which are intermittently unavailable (e.g.
/market-metrics) skip themselves on a 5xx rather than failing.
Disclaimer
This software can place real orders against a live brokerage account. It is provided "as is", with no warranty, and is not financial advice. You are solely responsible for any trades it places and any resulting losses. Review the order-safety controls above before enabling live trading. The built-in risk checks reduce — but do not eliminate — the risk of an unintended or oversized order.
This is an independent project and is not affiliated with, endorsed by, or
sponsored by tastytrade. It uses the unofficial third-party
tastytrade SDK.
License
MIT © 2026 Jon Covington
Available Tools
9 toolsget_account_infoA
Retrieve account balances and buying power.
Args: account_number: Specific account to query. Defaults to the stored default account, or the first account on the session.
Inputs: account_number. Returns: object
get_connection_statusA
Check Tastytrade connectivity and report environment configuration.
Returns whether credentials are present, the active environment (sandbox vs production), whether live trading is enabled, and how many accounts the session can see.
Inputs: no named parameters. Returns: object
get_market_overviewA
Scan symbols for market metrics.
Returns implied volatility rank/percentile, IV, beta, liquidity, and upcoming earnings (when available) for each underlying symbol.
Args: symbols: Underlying ticker symbols, e.g. ["SPY", "QQQ", "AAPL"].
Inputs: symbols (required). Returns: object
get_option_chainA
Retrieve the option chain for an underlying symbol.
Returns expirations and strikes with their option symbols, grouped by expiration date.
Args: symbol: Underlying ticker symbol, e.g. "SPY".
Inputs: symbol (required). Returns: object
get_positionsA
List open positions with quantities and P&L for an account.
Args: account_number: Specific account to query. Defaults to the stored default account, or the first account on the session.
Inputs: account_number. Returns: object
get_strategiesA
Build candidate iron condor setups for an underlying.
Selects an expiration near target_dte and proposes an iron condor
with short strikes around the given target delta and the requested wing
width. Returns the four legs (short/long put, short/long call) and an
estimated probability of profit.
Args: symbol: Underlying ticker symbol, e.g. "SPY". target_dte: Desired days to expiration (default 45). wing_width: Distance in strikes between short and long legs. short_delta: Target absolute delta for the short strikes (~0.16 corresponds to roughly a 1-standard-deviation short strike).
Inputs: symbol (required), target_dte, wing_width, short_delta. Returns: object
get_watchlistsA
Retrieve the user's private watchlists.
Args: name: If given, return only the watchlist with this name; otherwise return all private watchlists.
Inputs: name. Returns: object
get_working_ordersA
List live (working / unfilled) orders for an account.
Args: account_number: Specific account to query. Defaults to the stored default account, or the first account on the session.
Inputs: account_number. Returns: object
list_accountsA
List all accounts available to the authenticated session.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct aspect: account info, connection status, market metrics, option chains, positions, strategy building, watchlists, orders, and account listing. No two tools have overlapping purposes, minimizing agent confusion.
All tools use a consistent 'get_' prefix except 'list_accounts', which deviates. Additionally, 'get_strategies' implies retrieval but actually builds setups. Overall, the pattern is mostly uniform.
With 9 tools, the set is well-scoped for a trading platform's core operations: account management, market data, options, positions, orders, and watchlists. Not excessive nor sparse.
The surface lacks critical trading actions like placing, modifying, or canceling orders. It also misses trade history and account transactions, making it incomplete for a trading platform's lifecycle.
Maintenance
Related MCP Connectors
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
MCP server for OpenMM — exposes market data, account, trading, and strategy tools to AI agents
Production MCP server for US equity and options intelligence: real-time IV radar, Monte Carlo simulation, options pressure, strategy backtesting, AI prediction, pre-trade risk analysis, and automated stock research reports.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Related MCP Servers
- FlicenseAqualityDmaintenanceA security-hardened MCP server that wraps the eToro public API, enabling AI assistants to trade, access market data, manage portfolios, and interact with social feeds via 34 tools.6-
- AlicenseAqualityDmaintenanceMCP server for the tastytrade brokerage API, providing tools for account management, market data, and order execution.18MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Interactive Brokers that exposes portfolio data, market quotes, trading, and analysis to any MCP-compatible AI client, with support for EU investors and safety-gated trading.1MIT

cpzai-mcp-serverofficial
AlicenseNot gradedqualityCmaintenanceMCP server for CPZAI platform, enabling AI agents to manage trading strategies, run backtests, route orders across brokers, and access portfolios, risk analytics, and market data through natural language.1MIT