A Model Context Protocol server for interacting with TastyTrade brokerage accounts
Project description
tasty-agent: A TastyTrade MCP Server
A Model Context Protocol server for TastyTrade brokerage accounts. Enables LLMs to monitor portfolios, analyze positions, and execute trades.
Installation
uvx tasty-agent
Authentication
Set up credentials (stored in system keyring):
uvx tasty-agent setup
Or use environment variables:
TASTYTRADE_USERNAMETASTYTRADE_PASSWORDTASTYTRADE_ACCOUNT_ID(optional)
MCP Tools
Account & Portfolio
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)
Market Data & Research
get_option_streamer_symbols(underlying_symbol, expiration_date, min_strike_price, max_strike_price, option_type)- Get option chain streamer symbols (option_type: 'C' or 'P', expiration_date: YYYY-MM-DD)get_quote(streamer_symbols, timeout=10.0)- Real-time quotes 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/ticker
Order Management
get_live_orders()- Currently active ordersplace_order(legs, order_type='Limit', time_in_force='Day', price=None, dry_run=False)- Place ordersdelete_order(order_id)- Cancel orders by ID
Watchlist Management
get_public_watchlist_names()- Get available public watchlist namesget_public_watchlist_entries(name)- Get entries from a public watchlistget_private_watchlists(name=None)- Get private watchlists (all if name=None, specific 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 watchlist
Order Format
Orders use legs formatted as follows:
[
{
"symbol": "AAPL",
"quantity": "100",
"action": "Buy",
"instrument_type": "Equity"
}
]
Actions:
- Equity:
Buy,Sell - Options:
Buy to Open,Sell to Open,Buy to Close,Sell to Close - Futures:
Buy,Sell
Instrument Types: Equity, Equity Option, Future, Future Option, Cryptocurrency, Warrant
Watchlist Entry Format
Watchlist entries use this format:
[
{
"symbol": "AAPL",
"instrument_type": "Equity"
},
{
"symbol": "AAPL240119C00150000",
"instrument_type": "Equity Option"
}
]
Key Features
- Multi-leg strategies with complex option spreads
- Real-time streaming quotes via DXLink WebSocket
- Watchlist management for portfolio organization
- Dry-run testing for all order operations
- Automatic symbol normalization for options
- Fresh data always from TastyTrade API
Usage with Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"tastytrade": {
"command": "uvx",
"args": ["tasty-agent"]
}
}
}
Examples
"Get my account balances and current positions"
"Show AAPL option streamer symbols for next Friday expiration"
"Get real-time quote for SPY"
"Place dry-run order: buy 100 AAPL shares at market"
"Cancel order 12345"
"Create a watchlist called 'Tech Stocks' with AAPL and MSFT"
"Add TSLA to my Tech Stocks watchlist"
Development
Debug with MCP inspector:
npx @modelcontextprotocol/inspector uvx tasty-agent
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tasty_agent-1.1.0.tar.gz.
File metadata
- Download URL: tasty_agent-1.1.0.tar.gz
- Upload date:
- Size: 48.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
410f73ac13598331cb80636156069e8277622029d8ddcccb9590caa4bfe185bd
|
|
| MD5 |
c6d02c353fb445ba684d0ca441d1ebc8
|
|
| BLAKE2b-256 |
0d53057848389e22108787b145ae93e6af8d28fe4981425ced55390da92c502e
|
File details
Details for the file tasty_agent-1.1.0-py3-none-any.whl.
File metadata
- Download URL: tasty_agent-1.1.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11c2dc1a4fccf794049e576c93d63b29a45f3ae7af539943e764daa35496ff77
|
|
| MD5 |
557c50601c6ad516c90ad93f7106b0a7
|
|
| BLAKE2b-256 |
0ad602b5de9b385724e774e083051af5a902436a862bdbf210aba816d7273fa4
|