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)
  • create_private_watchlist(name, entries=[], group_name='main') - Create new private watchlist
  • add_symbol_to_private_watchlist(watchlist_name, symbol, instrument_type) - Add symbol to existing watchlist
  • remove_symbol_from_private_watchlist(watchlist_name, symbol, instrument_type) - 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.2.1.tar.gz (47.6 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.2.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tasty_agent-1.2.1.tar.gz
  • Upload date:
  • Size: 47.6 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.2.1.tar.gz
Algorithm Hash digest
SHA256 c30f27170412c3759c61b8bb551c8402d259ac8b39e9ba14e39f7e10c7da15ad
MD5 ae02705bf6999ce02cc1c3cd9f7017e4
BLAKE2b-256 6b19a1a1c710af2668c3fdd46bbbdaa851d5592f253f4b37209674dbfb6d0b4d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tasty_agent-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 10.2 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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 77ec11ffd46a53f746aacc69498db6a268b2eb4b6f0afe8230e9636944979211
MD5 8e68be4a54b21f9127d7bd161e3d943b
BLAKE2b-256 8530150297a395d006f17dd37e453e5247480c3a2158171166080a71d34dfd56

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