Skip to main content
Glama
morsingnet

mcp-tastytrade-server

by morsingnet

mcp-tastytrade-server

An MCP server that exposes the TastyTrade brokerage API as tools for Claude and other MCP-compatible clients.

Features

Tool

Description

get_accounts

List all accounts

get_positions

Open positions for an account

get_balances

Balances and buying power

get_orders

Orders (filterable by status)

dry_run_order

Validate an order — fees, BP impact, warnings

place_order

Place a live order

cancel_order

Cancel a live order

get_option_chain

Option chain (nested by expiry or compact flat list)

get_market_metrics

IV rank, IV percentile, 30-day IV, liquidity

get_transactions

Transaction history

search_equities

Search equity instruments by symbol

get_watchlists

Customer watchlists

Related MCP server: alpaca-mcp-server

Setup

1. Install dependencies

pip install -e .
# or with uv:
uv pip install -e .

2. OAuth2 setup

This server authenticates with OAuth2 — a scoped, revocable refresh token — instead of your TastyTrade account password. Your actual login credentials are never entered anywhere in this project.

  1. Go to my.tastytrade.comManage → My Profile → API → OAuth Applications.

  2. Click + New OAuth Client, give it any name, and set a redirect URI (e.g. http://localhost) — it's required but unused by the personal-grant flow below.

  3. Save the app, then note the Client Secret shown (it's only displayed once).

  4. Click Manage on the new app → Create Grant to issue yourself a Personal Grant. Copy the Refresh Token shown (also only displayed once).

  5. Copy the env template and fill in those two values:

cp .env.example .env

Variable

Required

Description

TASTYTRADE_CLIENT_SECRET

Yes

Client secret from the OAuth application

TASTYTRADE_REFRESH_TOKEN

Yes

Refresh token from the personal grant

TASTYTRADE_SANDBOX

No

Set to true to use the certification environment (default: false)

The refresh token doesn't expire on its own — if you ever want to cut off access, revoke the grant at my.tastytrade.com and generate a new one, no password change required.

3. Test the connection

python scripts/smoke_test.py

This runs every read-only tool (get_accounts, get_balances, get_positions, get_orders, search_equities, get_market_metrics, get_option_chain, get_watchlists) through the same list_tools()/call_tool() interface a real MCP client uses, and prints PASS/FAIL for each. It never places or cancels orders. Requires .env to be filled in (step 2).

4. Configure Claude Desktop

Add the following to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "tastytrade": {
      "command": "mcp-tastytrade",
      "env": {
        "TASTYTRADE_CLIENT_SECRET": "your_client_secret",
        "TASTYTRADE_REFRESH_TOKEN": "your_refresh_token"
      }
    }
  }
}

Or using uv run without installing:

{
  "mcpServers": {
    "tastytrade": {
      "command": "uv",
      "args": ["run", "--directory", "/absolute/path/to/mcp-tastytrade-server", "mcp-tastytrade"],
      "env": {
        "TASTYTRADE_CLIENT_SECRET": "your_client_secret",
        "TASTYTRADE_REFRESH_TOKEN": "your_refresh_token"
      }
    }
  }
}

Option symbol format

Options use the OCC 21-character format: SYMBOL YYMMDDCPRICE

Examples:

  • AAPL 241220C00200000 — AAPL $200 call expiring 2024-12-20

  • SPY 241220P00580000 — SPY $580 put expiring 2024-12-20

The get_option_chain tool returns symbols already formatted correctly.

Development

# Run directly
python -m mcp_tastytrade.server

# Or via the installed script
mcp-tastytrade

Security

  • Authentication uses OAuth2 (client secret + refresh token) — your TastyTrade account password is never used or stored anywhere in this project.

  • Credentials are passed via environment variables only.

  • The .env file is in .gitignore and must never be committed.

  • Access tokens are short-lived (~15 minutes), held in memory only, and refreshed automatically.

  • To revoke access at any time, delete the grant at my.tastytrade.com — no password change needed.

  • Use TASTYTRADE_SANDBOX=true for testing — the certification environment uses separate accounts with no real money.

Install Server
F
license - not found
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    Enables natural language trading operations through Alpaca's API, supporting stocks, options, crypto, portfolio management, and real-time market data with comprehensive order execution and account management capabilities.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables natural language trading operations for stocks, options, crypto, and portfolio management via Alpaca's Trading API through AI assistants.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Connects your TastyTrade trading account to AI assistants like Claude Desktop and ChatGPT for conversational trading and portfolio management.
    5
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables natural language interaction with your T-Invest brokerage account for portfolio analysis, dividend tracking, and optional trading with safety confirmations.
    20
    11
    2
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Trade Robinhood through natural language in Claude Code.

  • Trade, monitor portfolios, and build Coinrule strategies by chat.

  • Build, backtest, and deploy quantitative trading strategies from your AI agent.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/morsingnet/tasty-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server