mcp-tastytrade-server
The mcp-tastytrade-server lets you manage your TastyTrade brokerage account, place trades, and retrieve market data through an MCP client. Key capabilities:
Account Management: list accounts, view balances & buying power, get open positions, retrieve transaction history (with date filtering and pagination), and access customer watchlists.
Order Management: view orders filtered by status (e.g., Live, Filled, Cancelled, Rejected); place live orders (Limit, Market, Stop, Stop Limit, Notional Market) for equities, equity options, futures, and future options; cancel orders; and validate orders without placing (
dry_run_order) to check buying power impact, fees, and warnings. Option symbols are auto-formatted to OCC standard.Market Data & Research: fetch option chains (nested by expiry or as a compact flat list); get market metrics (IV rank, IV percentile, 30-day IV, liquidity) for one or more symbols; search equities by symbol or partial term, optionally filtering by lendability (Easy To Borrow, Locate Required, Preborrow Required).
Security & Safety: uses OAuth2 (no password stored); supports a sandbox environment (
TASTYTRADE_SANDBOX=true) for risk-free testing; dry-run orders let you preview costs and buying power effects before committing real capital.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-tastytrade-servershow my open positions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-tastytrade-server
An MCP server that exposes the TastyTrade brokerage API as tools for Claude and other MCP-compatible clients.
Features
Tool | Description |
| List all accounts |
| Open positions for an account |
| Balances and buying power |
| Orders (filterable by status) |
| Validate an order — fees, BP impact, warnings |
| Place a live order |
| Cancel a live order |
| Option chain (nested by expiry or compact flat list) |
| IV rank, IV percentile, 30-day IV, liquidity |
| Transaction history |
| Search equity instruments by symbol |
| 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.
Go to my.tastytrade.com → Manage → My Profile → API → OAuth Applications.
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.Save the app, then note the Client Secret shown (it's only displayed once).
Click Manage on the new app → Create Grant to issue yourself a Personal Grant. Copy the Refresh Token shown (also only displayed once).
Copy the env template and fill in those two values:
cp .env.example .envVariable | Required | Description |
| Yes | Client secret from the OAuth application |
| Yes | Refresh token from the personal grant |
| No | Set to |
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.pyThis 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-20SPY 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-tastytradeSecurity
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
.envfile is in.gitignoreand 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=truefor testing — the certification environment uses separate accounts with no real money.
Maintenance
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
- AlicenseNot gradedqualityFmaintenanceEnables 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
- AlicenseNot gradedqualityDmaintenanceEnables natural language trading operations for stocks, options, crypto, and portfolio management via Alpaca's Trading API through AI assistants.MIT
- AlicenseNot gradedqualityCmaintenanceConnects your TastyTrade trading account to AI assistants like Claude Desktop and ChatGPT for conversational trading and portfolio management.5MIT
- AlicenseAqualityBmaintenanceEnables natural language interaction with your T-Invest brokerage account for portfolio analysis, dividend tracking, and optional trading with safety confirmations.20112Apache 2.0
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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