Tastyworks API integration to handle trading activities on Tastytrade
A Model Context Protocol server for TastyTrade brokerage accounts. Enables LLMs to monitor portfolios, analyze positions, and execute trades.
uvx tasty-agent
Set up credentials (stored in system keyring):
uvx tasty-agent setup
Or use environment variables:
TASTYTRADE_USERNAME
TASTYTRADE_PASSWORD
TASTYTRADE_ACCOUNT_ID
(optional)get_balances()
- Account balances and buying powerget_positions()
- All open positions with current valuesget_net_liquidating_value_history(time_back='1y')
- Portfolio value history ('1d', '1m', '3m', '6m', '1y', 'all')get_history(start_date=None)
- Transaction history (format: YYYY-MM-DD, default: last 90 days)get_quote(symbol, option_type=None, strike_price=None, expiration_date=None, timeout=10.0)
- Real-time quotes for stocks and options via DXLink streamingget_market_metrics(symbols)
- IV rank, percentile, beta, liquidity for multiple symbolsmarket_status(exchanges=['Equity'])
- Market hours and status ('Equity', 'CME', 'CFE', 'Smalls')search_symbols(symbol)
- Search for symbols by name/tickerget_live_orders()
- Currently active ordersplace_order(symbol, order_type, action, quantity, price, strike_price=None, expiration_date=None, time_in_force='Day', dry_run=False)
- Simplified order placement for stocks and optionsdelete_order(order_id)
- Cancel orders by IDget_public_watchlists(name=None)
- Get public watchlists (all watchlists if name=None, specific watchlist if name provided)get_private_watchlists(name=None)
- Get private watchlists (all watchlists if name=None, specific watchlist if name provided)create_private_watchlist(name, entries=[], group_name='main')
- Create new private watchlistadd_symbol_to_private_watchlist(watchlist_name, symbol, instrument_type)
- Add symbol to existing watchlistremove_symbol_from_private_watchlist(watchlist_name, symbol, instrument_type)
- Remove symbol from watchlistdelete_private_watchlist(name)
- Delete private watchlistWatchlist entries use this format:
[
{
"symbol": "AAPL",
"instrument_type": "Equity"
},
{
"symbol": "AAPL240119C00150000",
"instrument_type": "Equity Option"
}
]
Add to claude_desktop_config.json
:
{
"mcpServers": {
"tastytrade": {
"command": "uvx",
"args": ["tasty-agent"]
}
}
}
"Get my account balances and current positions"
"Get real-time quote for SPY"
"Get quote for TQQQ C option with strike 100 expiring 2026-01-16"
"Place dry-run order: buy 100 AAPL shares at $150"
"Place order: buy 17 TQQQ C contracts at $8.55, strike 100, expiring 2026-01-16"
"Cancel order 12345"
"Create a watchlist called 'Tech Stocks' with AAPL and MSFT"
"Add TSLA to my Tech Stocks watchlist"
Debug with MCP inspector:
npx @modelcontextprotocol/inspector uvx tasty-agent
MIT