tastytrade_MCP_Server
A simple MCP server exposing all 43 Tastytrade tools from their API.
claude mcp add --transport stdio bostrovsky-tastytrade_mcp_server python tastytrade_unified_server.py \ --env TASTYTRADE_PASSWORD="Your TastyTrade password" \ --env TASTYTRADE_USERNAME="Your TastyTrade account email" \ --env TASTYTRADE_USE_PRODUCTION="true or false"
How to use
This MCP server bridges your TastyTrade trading account with AI assistants like Claude Desktop and ChatGPT, enabling conversational access to your trading data and portfolio management capabilities. After setup, you can query real-time market data, review your balances and positions, search for symbols, and place or audit orders through natural language prompts routed via the integrated MCP bridge. The server provides multi-LLM support, working with Claude Desktop via standard I/O and with ChatGPT through an HTTP MCP bridge, making it adaptable to various AI environments.
To get started, install and configure the server, then run the local instance for Claude Desktop with the provided command. Once running, Claude Desktop will detect the MCP server and you can begin asking questions like about your current positions, balances, or quotes. The available tools include account management (lists, balances, positions), market data (symbol search, quotes, options chains), and security/audit capabilities (audit logs and security status) to ensure safe trading operations. Use the management commands to check status, test API connections, or clean configurations as needed.
As you interact, the server will handle authentication, token management, and trade confirmations. Remember that some API features are not available (e.g., certain options Greeks or historical data), and trading actions typically require explicit user confirmation through the UI prompts or confirmation steps built into the workflow.
How to install
Prerequisites:
- Python 3.8+ installed
- pipx installed (recommended for clean environments)
- Access to a TastyTrade trading account (production or sandbox)
STEP 1: Create a Python virtual environment (optional but recommended)
python -m venv .venv
# On Windows use: .venv\Scripts\activate
source .venv/bin/activate
STEP 2: Install the MCP package (via pipx or pip)
# If using pipx (recommended):
pipx install tastytrade-mcp
# If installing manually via pip:
pip install tastytrade-mcp
STEP 3: Configure environment variables or a .env file
echo "TASTYTRADE_USERNAME=your_email@tastytrade.com" > .env
echo "TASTYTRADE_PASSWORD=your_password" >> .env
echo "TASTYTRADE_USE_PRODUCTION=true" >> .env
STEP 4: Run the interactive setup and start the MCP server
tastytrade-mcp setup
# or for database/simple mode as needed:
tastytrade-mcp setup --mode database
tastytrade-mcp local # Start MCP server for Claude Desktop
STEP 5: Start the server manually (alternative)
# If not using the packaged CLI, run the server directly
python tastytrade_unified_server.py
Prereqs and notes:
- Ensure network access to TastyTrade APIs and AI integration endpoints
- Store credentials securely (use .env or a secret manager)
- In database mode, follow the OAuth2 personal grant steps described in the README to obtain tokens and refresh tokens
Additional notes
Tips and considerations:
- Never commit credentials to version control; use environment variables or secret managers.
- In database mode, tokens are encrypted and automatically refreshed; monitor audit logs for activity.
- Some API features (e.g., Options Greeks, historical data) are not available via TastyTrade API; design prompts accordingly.
- If you encounter connectivity issues, re-run tastytrade-mcp status and tastytrade-mcp test to verify configuration and API access.
- Use the security features and two-step confirmation to reduce risk when trading via AI prompts.
- For production deployments, consider deploying behind HTTPS with proper authentication and access controls.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP