# 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.
## Configuration
### Authentication
**OAuth Setup**:
1. Create an OAuth app at https://my.tastytrade.com/app.html#/manage/api-access/oauth-applications
2. Check all scopes, save your client ID and client secret
3. Create a "New Personal OAuth Grant" in your OAuth app settings (check all scopes)
4. Copy the generated refresh token
5. Configure the MCP server with your credentials (see Usage section below)
## 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_greeks(symbol, option_type, strike_price, expiration_date, timeout=10.0)`** - Greeks (delta, gamma, theta, vega, rho) for 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_watchlists(watchlist_type='private', name=None)`** - Get watchlists ('public'/'private', all if name=None)
- **`manage_private_watchlist(action, symbol, instrument_type, name='main')`** - Add/remove symbols from private watchlists
- **`delete_private_watchlist(name)`** - Delete private watchlist
### MCP Client Configuration
Add to your MCP client configuration (e.g., `claude_desktop_config.json`):
```json
{
"mcpServers": {
"tastytrade": {
"command": "uvx",
"args": ["tasty-agent"],
"env": {
"TASTYTRADE_CLIENT_SECRET": "your_client_secret",
"TASTYTRADE_REFRESH_TOKEN": "your_refresh_token",
"TASTYTRADE_ACCOUNT_ID": "your_account_id"
}
}
}
}
```
## 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"
"Get Greeks (delta, gamma, theta, vega, rho) for AAPL P option with strike 150 expiring 2024-12-20"
"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"
"Get my private watchlists"
"Add TSLA to my main watchlist"
"Remove AAPL from my tech watchlist"
```
## Development
### Testing with client.py
For interactive testing during development:
```bash
# Install dev dependencies
uv sync --group dev
# Set up environment variables in .env file:
# TASTYTRADE_CLIENT_SECRET=your_secret
# TASTYTRADE_REFRESH_TOKEN=your_token
# TASTYTRADE_ACCOUNT_ID=your_account_id (optional)
# OPENAI_API_KEY=your_openai_key
# Run the interactive client
uv run client.py
```
The client provides a chat interface to test MCP tools directly. Example commands:
- "Get my account balances"
- "Get quote for SPY"
- "Place dry-run order: buy 100 AAPL at $150"
### Debug with MCP inspector
```bash
npx @modelcontextprotocol/inspector uvx tasty-agent
```
## License
MIT
Raw data
{
"_id": null,
"home_page": null,
"name": "tasty-agent",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "broker, mcp, model context protocol, robinhood, tastytrade, trading, wallstreetbets",
"author": null,
"author_email": "Ferdous <ferdous@hey.com>",
"download_url": "https://files.pythonhosted.org/packages/91/a8/4be17836607661b946cba3ce4ff1a1d0e9aba513a6de61f562eb006f6171/tasty_agent-2.1.0.tar.gz",
"platform": null,
"description": "# tasty-agent: A TastyTrade MCP Server\n\nA Model Context Protocol server for TastyTrade brokerage accounts. Enables LLMs to monitor portfolios, analyze positions, and execute trades.\n\n## Configuration\n\n### Authentication\n\n**OAuth Setup**:\n1. Create an OAuth app at https://my.tastytrade.com/app.html#/manage/api-access/oauth-applications\n2. Check all scopes, save your client ID and client secret \n3. Create a \"New Personal OAuth Grant\" in your OAuth app settings (check all scopes)\n4. Copy the generated refresh token\n5. Configure the MCP server with your credentials (see Usage section below)\n\n## MCP Tools\n\n### Account & Portfolio\n- **`get_balances()`** - Account balances and buying power\n- **`get_positions()`** - All open positions with current values\n- **`get_net_liquidating_value_history(time_back='1y')`** - Portfolio value history ('1d', '1m', '3m', '6m', '1y', 'all')\n- **`get_history(start_date=None)`** - Transaction history (format: YYYY-MM-DD, default: last 90 days)\n\n### Market Data & Research\n- **`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\n- **`get_greeks(symbol, option_type, strike_price, expiration_date, timeout=10.0)`** - Greeks (delta, gamma, theta, vega, rho) for options via DXLink streaming\n- **`get_market_metrics(symbols)`** - IV rank, percentile, beta, liquidity for multiple symbols\n- **`market_status(exchanges=['Equity'])`** - Market hours and status ('Equity', 'CME', 'CFE', 'Smalls')\n- **`search_symbols(symbol)`** - Search for symbols by name/ticker\n\n### Order Management\n- **`get_live_orders()`** - Currently active orders\n- **`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\n- **`delete_order(order_id)`** - Cancel orders by ID\n\n### Watchlist Management\n- **`get_watchlists(watchlist_type='private', name=None)`** - Get watchlists ('public'/'private', all if name=None)\n- **`manage_private_watchlist(action, symbol, instrument_type, name='main')`** - Add/remove symbols from private watchlists\n- **`delete_private_watchlist(name)`** - Delete private watchlist\n\n### MCP Client Configuration\n\nAdd to your MCP client configuration (e.g., `claude_desktop_config.json`):\n```json\n{\n \"mcpServers\": {\n \"tastytrade\": {\n \"command\": \"uvx\",\n \"args\": [\"tasty-agent\"],\n \"env\": {\n \"TASTYTRADE_CLIENT_SECRET\": \"your_client_secret\",\n \"TASTYTRADE_REFRESH_TOKEN\": \"your_refresh_token\",\n \"TASTYTRADE_ACCOUNT_ID\": \"your_account_id\"\n }\n }\n }\n}\n```\n\n## Examples\n\n```\n\"Get my account balances and current positions\"\n\"Get real-time quote for SPY\"\n\"Get quote for TQQQ C option with strike 100 expiring 2026-01-16\"\n\"Get Greeks (delta, gamma, theta, vega, rho) for AAPL P option with strike 150 expiring 2024-12-20\"\n\"Place dry-run order: buy 100 AAPL shares at $150\"\n\"Place order: buy 17 TQQQ C contracts at $8.55, strike 100, expiring 2026-01-16\"\n\"Cancel order 12345\"\n\"Get my private watchlists\"\n\"Add TSLA to my main watchlist\"\n\"Remove AAPL from my tech watchlist\"\n```\n\n## Development\n\n### Testing with client.py\n\nFor interactive testing during development:\n```bash\n# Install dev dependencies\nuv sync --group dev\n\n# Set up environment variables in .env file:\n# TASTYTRADE_CLIENT_SECRET=your_secret\n# TASTYTRADE_REFRESH_TOKEN=your_token \n# TASTYTRADE_ACCOUNT_ID=your_account_id (optional)\n# OPENAI_API_KEY=your_openai_key\n\n# Run the interactive client\nuv run client.py\n```\n\nThe client provides a chat interface to test MCP tools directly. Example commands:\n- \"Get my account balances\"\n- \"Get quote for SPY\" \n- \"Place dry-run order: buy 100 AAPL at $150\"\n\n### Debug with MCP inspector\n\n```bash\nnpx @modelcontextprotocol/inspector uvx tasty-agent\n```\n\n## License\n\nMIT\n",
"bugtrack_url": null,
"license": null,
"summary": "A Model Context Protocol server for interacting with TastyTrade brokerage accounts",
"version": "2.1.0",
"project_urls": null,
"split_keywords": [
"broker",
" mcp",
" model context protocol",
" robinhood",
" tastytrade",
" trading",
" wallstreetbets"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "bc84a8f0e710f7a01861b9d8726c2b7813a39aecec5cf637fb9d69ec0e063286",
"md5": "b7fe8d4b04c428a96d997b6b4707150f",
"sha256": "dad567bd639351223cf86de81f49a3de0f43e2543cf6b6f019f0ace5898bb3e7"
},
"downloads": -1,
"filename": "tasty_agent-2.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b7fe8d4b04c428a96d997b6b4707150f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 8870,
"upload_time": "2025-09-07T03:46:29",
"upload_time_iso_8601": "2025-09-07T03:46:29.465549Z",
"url": "https://files.pythonhosted.org/packages/bc/84/a8f0e710f7a01861b9d8726c2b7813a39aecec5cf637fb9d69ec0e063286/tasty_agent-2.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "91a84be17836607661b946cba3ce4ff1a1d0e9aba513a6de61f562eb006f6171",
"md5": "a300912a70197b4fecd23c10e09b3161",
"sha256": "d5ea9a32d96d6d1ce5c2109051c597926305133d0f312a5f37a7bdde3d8c0041"
},
"downloads": -1,
"filename": "tasty_agent-2.1.0.tar.gz",
"has_sig": false,
"md5_digest": "a300912a70197b4fecd23c10e09b3161",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 91252,
"upload_time": "2025-09-07T03:46:30",
"upload_time_iso_8601": "2025-09-07T03:46:30.542256Z",
"url": "https://files.pythonhosted.org/packages/91/a8/4be17836607661b946cba3ce4ff1a1d0e9aba513a6de61f562eb006f6171/tasty_agent-2.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-07 03:46:30",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "tasty-agent"
}