tasty-agent
by: ferdousbhai
Let Claude manage your tastytrade portfolio.
📌Overview
Purpose: To provide a Model Context Protocol server for seamless interaction with TastyTrade brokerage accounts, allowing users to monitor portfolios, analyze positions, and execute trades.
Overview: Tasty-Agent is a sophisticated server designed to connect Large Language Models with TastyTrade accounts, facilitating various functionalities such as portfolio management, trade execution, and market analysis.
Key Features:
-
Portfolio Management: Enables users to track account balances, open positions, and transaction history, providing a comprehensive overview of portfolio performance.
-
Trade Management: Allows scheduling and managing trades effortlessly, including features to view and remove pending trades.
-
Market Analysis: Offers tools to retrieve current market metrics and price quotes, assisting users in making informed trading decisions.
tasty-agent: A TastyTrade MCP Server
Overview
A Model Context Protocol server for interacting with TastyTrade brokerage accounts. This server allows Large Language Models to monitor portfolios, analyze positions, and execute trades through the TastyTrade platform.
Prerequisites
- Python 3.12
- uv package manager
- A TastyTrade account
Installation
Install uv if it’s not already installed:
curl -LsSf https://astral.sh/uv/install.sh | sh
Run tasty-agent using uvx
:
uvx tasty-agent
Authentication
Set up TastyTrade credentials via the command line:
uvx tasty-agent setup
Tools
Portfolio Management
-
Plotting Account History:
plot_nlv_history
: Plots account net liquidating value over a specified period.- Input:
time_back
(e.g., '1d', '1m', etc.).
-
Get Account Information:
get_account_balances
: Returns current balances, including cash balance and buying power.
-
Open Positions:
get_open_positions
: Lists currently open positions.
-
Transaction History:
get_transaction_history
: Returns transaction history with an optional start date.
Trade Management
-
Schedule a Trade:
schedule_trade
: Schedule trades with various inputs (action, quantity, symbol, etc.).
-
List Scheduled Trades:
list_scheduled_trades
: Shows all pending scheduled trades.
-
Remove a Scheduled Trade:
remove_scheduled_trade
: Removes a designated scheduled trade.
Market Analysis
-
Market Metrics:
get_metrics
: Retrieves market metrics for specified symbols.
-
Current Prices:
get_prices
: Gets current bid and ask prices for a specific symbol.
Usage with Claude Desktop
Add the following to claude_desktop_config.json
:
{
"mcpServers": {
"tastytrade": {
"command": "path/to/uvx/command/uvx",
"args": ["tasty-agent"]
}
}
}
Note: Scheduled trades execute only while Claude Desktop is running.
Debugging
Use the MCP inspector for debugging:
npx @modelcontextprotocol/inspector uvx tasty-agent
Logs are available in:
- macOS:
~/Library/Logs/Claude/mcp*.log
- Windows:
%APPDATA%\Claude\logs\mcp*.log
Development
For local development:
- Use the MCP inspector.
- Configure Claude Desktop as follows:
{
"mcpServers": {
"tastytrade": {
"command": "path/to/uv/command/uv",
"args": [
"--directory",
"path/to/tasty-agent",
"run",
"tasty-agent"
]
}
}
}
License
This MCP server is licensed under the MIT License.