TastyTrade MCP Server - Multi-LLM trading interface with unified deployment
Project description
TastyTrade MCP Server
A Model Context Protocol (MCP) server that connects your TastyTrade trading account to AI assistants like Claude Desktop and ChatGPT for conversational trading and portfolio management.
🌟 Features
Multi-LLM Support
- 🤖 Claude Desktop - Native MCP integration via stdio
- 💬 ChatGPT - HTTP MCP Bridge for Developer Mode
- 🔄 Universal Deployment - Works on any cloud platform
Trading Capabilities
- 📊 Real-time Market Data - Live quotes, options chains, market search
- 💼 Portfolio Management - Account positions, balances, order history
- 🔍 Symbol Search - Find stocks, options, and other instruments
- 🔒 Security First - Two-step trading confirmation, audit logging
API Limitations
⚠️ Important: The TastyTrade API has certain limitations. The following features are NOT available:
- Options Greeks - Delta, Gamma, Theta, etc. are not provided by the API
- Historical Price Data - No historical bars/candles endpoint available
- These tools have been removed to avoid misleading functionality
Enterprise-Grade Security
- 🔐 Secure Authentication - Your credentials never exposed to AI
- 📝 Comprehensive Audit Trail - All operations logged for compliance
- 🚫 LLM Safety - Trading requires explicit user confirmation
🚀 One-Line Installation
Prerequisites
- TastyTrade trading account
- Python 3.8+ and pip
Install & Deploy
# Install the CLI tool
pipx install tastytrade-mcp
# Deploy locally for Claude Desktop
tastytrade-mcp local
# OR deploy to cloud for ChatGPT
tastytrade-mcp cloud
⚙️ Configuration
Set Your Credentials
Create a .env file with your actual TastyTrade credentials:
# Required: Your TastyTrade account credentials
TASTYTRADE_USERNAME=your_email@tastytrade.com
TASTYTRADE_PASSWORD=your_password
TASTYTRADE_USE_PRODUCTION=true
# Optional: For cloud deployment (ChatGPT)
CHATGPT_MCP_TOKEN=your-secure-token
⚠️ Important: Use your real TastyTrade account credentials. This is not a demo - it connects to your actual trading account.
Security Notes
- Credentials are stored in
.envfile (never committed to git) - No credentials are included in config files or shared with AI
- All trading operations require explicit user confirmation
📱 Usage
For Claude Desktop
tastytrade-mcp local
Then restart Claude Desktop and ask: "Show my TastyTrade positions"
For ChatGPT
tastytrade-mcp cloud
Configure the returned URL in ChatGPT Developer Mode, then ask: "What's my portfolio balance?"
🌐 Cloud Deployment Options
The server runs as a standard Python web application and can be deployed to any cloud platform:
Railway (Recommended)
tastytrade-mcp cloud # Auto-configures Railway
Heroku
# Add to Procfile:
web: python tastytrade_unified_server.py
# Set environment variables in Heroku dashboard
heroku config:set TASTYTRADE_USERNAME=your_email@tastytrade.com
heroku config:set TASTYTRADE_PASSWORD=your_password
heroku config:set TASTYTRADE_USE_PRODUCTION=true
Google Cloud Run
# Deploy with environment variables
gcloud run deploy tastytrade-mcp \
--source . \
--set-env-vars TASTYTRADE_USERNAME=your_email@tastytrade.com \
--set-env-vars TASTYTRADE_PASSWORD=your_password \
--set-env-vars TASTYTRADE_USE_PRODUCTION=true
AWS Lambda
# Use serverless framework or SAM
# Environment variables configured in AWS Console
Any Docker Platform
docker build -t tastytrade-mcp .
docker run -e TASTYTRADE_USERNAME=your_email@tastytrade.com \
-e TASTYTRADE_PASSWORD=your_password \
-e TASTYTRADE_USE_PRODUCTION=true \
tastytrade-mcp
🛠️ Available Tools
Account Management
accounts- List all TastyTrade accountsbalances- Get account balance informationpositions- View current positions
Market Data
search_symbols- Search stocks, ETFs, and other instrumentsquote- Get real-time market quotessearch_options- Find options chains with filtering
Security & Audit
audit_log- View trading activity audit trailsecurity_status- Check authentication and encryption status
📊 Management Commands
# Check deployment status
tastytrade-mcp status
# Remove all deployments
tastytrade-mcp cleanup
# Check dependencies
tastytrade-mcp setup --check-only
🔧 Manual Installation (Advanced)
If you prefer manual setup:
git clone <repository-url>
cd Tasty_MCP
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Create .env file with your credentials
echo "TASTYTRADE_USERNAME=your_email@tastytrade.com" > .env
echo "TASTYTRADE_PASSWORD=your_password" >> .env
echo "TASTYTRADE_USE_PRODUCTION=true" >> .env
# Start server
python tastytrade_unified_server.py
🔒 Security Best Practices
- Never commit credentials - Always use
.envfiles - Use production accounts - Connect to your real TastyTrade account
- Monitor audit logs - Review all trading activity
- Secure your deployment - Use HTTPS and authentication tokens
- Regular updates - Keep the server updated for security patches
⚠️ Important Disclaimers
- Real Trading: This connects to your actual TastyTrade account with real money
- User Responsibility: All trades require your explicit confirmation
- No Financial Advice: This is a technical tool, not investment advice
- Security: Keep your credentials secure and use HTTPS in production
📚 Usage Examples
Getting Portfolio Information
"Show me my current positions and account balances"
"What are my open orders?"
"Get real-time quotes for NVDA, TSLA, and AAPL"
Real-Time Market Data
"Get live quotes for my stock holdings"
"Stream real-time data for AAPL for 30 seconds"
"Show me the current market price of Bitcoin futures"
Options Trading Workflow
# Step 1: Get your current option positions
"Show me all my current option positions"
# Step 2: Get real-time pricing (use exact symbols from positions)
"Get real-time quotes for these symbols: AMD 251121P00165000, NVDA 251121C00240000"
# Step 3: Analyze options strategies
"Analyze my AMD put spread strategy with current market conditions"
Market Research
"Search for symbols related to artificial intelligence"
"Get the option chain for TSLA expiring in 30 days"
"Find options with delta around 0.30 for SPY"
Order Management
"Create a buy order for 100 shares of AAPL at market price"
"Set up a stop-loss order for my NVDA position at $200"
"Show me the status of my pending orders"
Risk Management
"Calculate the total value of my portfolio"
"Show me my unrealized P&L by position"
"What's my current buying power?"
🔧 Troubleshooting
Option Pricing Issues
If option prices aren't showing:
- Get exact symbols first: Use
get_positionsto see your actual option symbols - Use correct format: Option symbols look like
AAPL 251121C00150000(not "AAPL $150 Call") - Try direct quotes: Use
get_realtime_quoteswith the exact symbols from your positions
Authentication Prompts
If you keep getting "Allow" prompts:
- This is normal security behavior
- Select "Always Allow" to reduce frequency
- Each tool request requires permission for security
WebSocket Connection Issues
If real-time quotes aren't working:
- Check that markets are open
- Verify your internet connection
- Try reducing the duration parameter
📞 Support
- Documentation: Check the comprehensive guides in
docs/ - Issues: Open GitHub issues for bugs or feature requests
- Security: See SECURITY.md for security policies
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🚨 Trading Disclaimer: This software connects to real trading accounts with actual money. All trading involves financial risk. Users are responsible for their trading decisions and should understand the risks before using this tool.
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 tastytrade_mcp-1.0.1.tar.gz.
File metadata
- Download URL: tastytrade_mcp-1.0.1.tar.gz
- Upload date:
- Size: 238.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3462cbc59d40a88888c2a9f19e6aa9caaa323a9eef979f70147c85665339d5a4
|
|
| MD5 |
d38107e59e2d8dbb775e552d04084860
|
|
| BLAKE2b-256 |
22b8198f5182300d2ca2aeafba2e7b9b1cc1ad9cda3a609e53343a9356b1e1e9
|
File details
Details for the file tastytrade_mcp-1.0.1-py3-none-any.whl.
File metadata
- Download URL: tastytrade_mcp-1.0.1-py3-none-any.whl
- Upload date:
- Size: 303.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d222fbd22bde77c7cfe8bbe33afde08891fe506c170d379080a958152063f9f
|
|
| MD5 |
706e37e32806ed4267effd4feff2fe34
|
|
| BLAKE2b-256 |
8146ebafeb4a4d0b5891f4628fb22de2baf017cddc49b8da6be66bb5a586c2e5
|