Tastytrade MCP Server

$uv sync
README.md

Provides access to Tastytrade historical price data via MCP

Tastytrade MCP Server

A server that provides access to Tastytrade historical price data via the Model Context Protocol (MCP).

Prerequisites

  • Tastytrade credentials (Client Secret, Refresh Token)
  • uv (Python package manager)

Installation

This project uses uv to manage dependencies and ensure a consistent environment for all users.

  1. Clone the repository and navigate to the directory.

  2. Install the dependencies:

    uv sync
    

    This will create a .venv directory with the exact versions specified in uv.lock.

Configuration

It is not recommended to store credentials directly in your MCP client configuration file. Instead, this server is configured to load them automatically from the .env file located in the same directory as the script.

  1. Ensure you have created your .env file with your credentials:

    cp .env.example .env
    # Edit .env with your actual details
    
  2. Configure your MCP client (e.g., claude_desktop_config.json) with the command to run the server.

{
  "mcpServers": {
    "tastytrade": {
      "command": "/home/username/.pyenv/versions/data/bin/python",
      "args": [
        "/home/username/Desktop/projects/mcp_tasty/tastytrade_server.py"
      ]
    }
  }
}

Note: Since dependencies are now managed by the project, point the command to the .venv python if you want to use the lockfile environment, or just use uv as the command.

Recommended Configuration (using uv):

{
  "mcpServers": {
    "tastytrade": {
      "command": "uv",
      "args": [
        "run",
        "/home/username/Desktop/projects/mcp_tasty/tastytrade_server.py"
      ]
    }
  }
}

Available Tools

  • get_price_history(symbol, days=7, interval='1d'): Get historical candle data for a symbol (e.g., "SPY").

Testing

To run the test client using the project environment:

uv run test_client.py

Tools (1)

get_price_historyGet historical candle data for a symbol (e.g., "SPY").

Environment Variables

CLIENT_SECRETrequiredTastytrade API Client Secret
REFRESH_TOKENrequiredTastytrade API Refresh Token

Configuration

claude_desktop_config.json
{"mcpServers": {"tastytrade": {"command": "uv", "args": ["run", "/home/username/Desktop/projects/mcp_tasty/tastytrade_server.py"]}}}

Try it

Get the historical price data for SPY for the last 7 days.
Show me the daily candle data for AAPL over the past week.
Retrieve historical price history for TSLA with a 1-day interval.

Frequently Asked Questions

What are the key features of Tastytrade MCP Server?

Access to Tastytrade historical price data. Retrieve historical candle data for specific financial symbols. Configurable time intervals and date ranges. Dependency management via uv for consistent environments.

What can I use Tastytrade MCP Server for?

Analyzing historical stock performance within Claude. Fetching market data for financial research and modeling. Automating the retrieval of candle data for trading strategy backtesting.

How do I install Tastytrade MCP Server?

Install Tastytrade MCP Server by running: uv sync

What MCP clients work with Tastytrade MCP Server?

Tastytrade MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use Tastytrade MCP Server with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free