Skip to main content

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_USERNAME
  • TASTYTRADE_PASSWORD
  • TASTYTRADE_ACCOUNT_ID (optional)

MCP Tools

Account & Portfolio

  • get_balances() - Account balances and buying power
  • get_positions() - All open positions with current values
  • get_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_quote(symbol, option_type=None, strike_price=None, expiration_date=None, timeout=10.0) - Real-time quotes for stocks and options via DXLink streaming
  • get_market_metrics(symbols) - IV rank, percentile, beta, liquidity for multiple symbols
  • market_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 orders
  • place_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 options
  • delete_order(order_id) - Cancel orders by ID

Watchlist Management

  • get_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)
  • add_symbol_to_private_watchlist(symbol, instrument_type, name='main') - Add symbol to private watchlist (creates if doesn't exist)
  • remove_symbol_from_private_watchlist(symbol, instrument_type, watchlist_name='main') - Remove symbol from watchlist
  • delete_private_watchlist(name) - Delete private watchlist

Watchlist Entry Format

Watchlist entries use this format:

[
  {
    "symbol": "AAPL",
    "instrument_type": "Equity"
  },
  {
    "symbol": "AAPL240119C00150000",
    "instrument_type": "Equity Option"
  }
]

Key Features

  • 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"
"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"

Development

Debug with MCP inspector:

npx @modelcontextprotocol/inspector uvx tasty-agent

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tasty_agent-1.3.0.tar.gz (46.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tasty_agent-1.3.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file tasty_agent-1.3.0.tar.gz.

File metadata

  • Download URL: tasty_agent-1.3.0.tar.gz
  • Upload date:
  • Size: 46.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for tasty_agent-1.3.0.tar.gz
Algorithm Hash digest
SHA256 e3d2010377e6daed46deb1445656965dd838851b5dbe21d4fba7db36d4dfc54f
MD5 06ae6071b681f49290e6889d13f71aec
BLAKE2b-256 7f4cc75e3ba210542ee78db61347e45af62b4dde4b5f6d94b9fdba581e644bdb

See more details on using hashes here.

File details

Details for the file tasty_agent-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: tasty_agent-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for tasty_agent-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e83a5e4b29dd224eac372e35aeb0e033ea1387b4636d574062473e5ab954729
MD5 ed3ebd39ab30d6299deff7542eb9050d
BLAKE2b-256 376030abfbed3833cc5ff6fd384954fe3bfb24cd4c3d78349234bb822faa3c23

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page