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_live_orders- Currently active ordersget_net_liquidating_value_history- Portfolio value history (1d, 1m, 3m, 6m, 1y, all)get_history- Transaction history (default: last 90 days)
Order Management
place_order- Place new orders (single/multi-leg strategies)- Parameters:
legs,order_type(Limit/Market),time_in_force(Day/GTC/IOC),price,dry_run
- Parameters:
delete_order- Cancel orders by IDget_order- Get order details by IDreplace_order- Modify existing orders
Market Data
get_option_chain- Option chain with filtering by expiration, strikes, typeget_quote- Real-time quotes via DXLink streamingget_market_metrics- IV rank, percentile, beta, liquidity for multiple symbolscheck_market_status- Market hours and next open time
Order Format
Orders use JSON leg format:
[
{
"symbol": "AAPL",
"quantity": "100",
"action": "Buy",
"instrument_type": "Equity"
}
]
Actions: Equity: Buy/Sell | Options: Buy/Sell to Open/Close Option Symbols: Auto-normalized from OCC to OSI format
Key Features
- Multi-leg strategies with complex option spreads
- Real-time streaming quotes via DXLink WebSocket
- 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 chain for next Friday expiration"
"Get real-time quote for SPY"
"Place dry-run order: buy 100 AAPL shares at market"
"Cancel order 12345"
Multi-leg Order Example
# Iron condor strategy
legs = [
{"symbol": "SPY240315P00480000", "quantity": "1", "action": "Sell to Open", "instrument_type": "Equity Option"},
{"symbol": "SPY240315P00475000", "quantity": "1", "action": "Buy to Open", "instrument_type": "Equity Option"},
{"symbol": "SPY240315C00520000", "quantity": "1", "action": "Sell to Open", "instrument_type": "Equity Option"},
{"symbol": "SPY240315C00525000", "quantity": "1", "action": "Buy to Open", "instrument_type": "Equity Option"}
]
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.0.0.tar.gz.
File metadata
- Download URL: tasty_agent-1.0.0.tar.gz
- Upload date:
- Size: 46.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
915e5c6071d6c5d58c0f8cb6b448d258980526489579f1b046693db1e92f55f4
|
|
| MD5 |
0918114715627ba628c150a037995a09
|
|
| BLAKE2b-256 |
f8a26bf7af291e22d79602718dc89f7f0268012708ef33eab291298ae94e323b
|
File details
Details for the file tasty_agent-1.0.0-py3-none-any.whl.
File metadata
- Download URL: tasty_agent-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.0 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 |
f3d1713f97f324bde1697d5a437d79bfbc1c2b001173312387826e3db6776f67
|
|
| MD5 |
960475576e406e535db9b80337a2f5d6
|
|
| BLAKE2b-256 |
6970428ea177c0a8a817dbe015f682d13f8c3cd7347b6a4bcc77db747905746e
|