MCP server for the Tastytrade Open API
Project description
new-tasty-trade-mcp
An MCP server exposing the Tastytrade Open API to an LLM host (Claude Code, Claude Desktop, Cursor, …). Read-only account & market-data tools plus guarded live-trading tools (two-phase orders, size caps, audit log).
Published on PyPI — run it anywhere with
uvx; no clone or local venv required. (The Python import name is tastytrade_mcp.)
Requirements
- Python 3.10+
- A Tastytrade OAuth app with a refresh token and client secret. Create it at
my.tastytrade.com → Manage → My Profile → API → OAuth Applications, and select the
readandtradescopes when creating the client/grant (without them the API returns403 insufficient scopes).
Register with Claude Code
uvx fetches the package on demand, so there's nothing to install up front:
claude mcp add tastytrade \
-e TASTY_ACCOUNT_NUMBER=... \
-e TASTY_CLIENT_SECRET=... \
-e TASTY_REFRESH_TOKEN=... \
-- uvx new-tasty-trade-mcp
Restart Claude Code and the tools appear.
Other MCP clients (Claude Desktop, Cursor, Cline, …)
Add this to your mcpServers config (same shape across clients):
{
"mcpServers": {
"tastytrade": {
"command": "uvx",
"args": ["new-tasty-trade-mcp"],
"env": {
"TASTY_ACCOUNT_NUMBER": "...",
"TASTY_CLIENT_SECRET": "...",
"TASTY_REFRESH_TOKEN": "..."
}
}
}
}
Optional env overrides:
TASTY_MAX_ORDER_NOTIONAL_USD— reject orders above this notional (Limit orders only).TASTY_MAX_QUANTITY— reject orders above this total leg quantity.TASTY_LOG_FILE— audit-log path (defaulttastytrade-mcp-trades.login the working directory). Set an absolute path to place it elsewhere.
Tools
Account (read): get_accounts, get_account, get_balances, get_positions,
get_orders, get_order, get_transactions, get_trading_status, get_nlv_history.
Market (read): get_quote, get_option_chain, get_market_metrics,
search_symbols, get_equity.
Trading (guarded): dry_run_order, place_order (two-phase: execute=false previews,
execute=true submits after the size-cap check), modify_order, cancel_order.
Trading guardrails
- Two-phase:
place_orderalways dry-runs first; it submits only whenexecute=true. - Size caps:
TASTY_MAX_QUANTITYandTASTY_MAX_ORDER_NOTIONAL_USD; orders over a cap are rejected before submission. Leave unset for no cap. - Audit log: every place/modify/cancel (success or failure) and every dry-run appends a
JSON line to
TASTY_LOG_FILE.
Run directly (stdio)
uvx new-tasty-trade-mcp # from anywhere
# or, installed in a venv:
python -m tastytrade_mcp
Development
Editable install from a clone (includes pytest, build, twine):
venv/bin/pip install -e 'mcp/tastytrade[dev]'
Common tasks via the Makefile (run from mcp/tastytrade/, or make -C mcp/tastytrade …
from the repo root):
make test # run the suite (httpx.MockTransport — no network, no live account)
make build # clean -> test -> build wheel + sdist into dist/
make publish # build -> twine upload (uses ~/.pypirc)
make install # editable install with dev extras
make clean # remove build/ and dist/
Re-publishing: bump version in pyproject.toml, then make publish (PyPI won't accept
the same version twice).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file new_tasty_trade_mcp-0.1.1.tar.gz.
File metadata
- Download URL: new_tasty_trade_mcp-0.1.1.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43376975ad9bb19e3ef9cf4d4affff84eb112a5148d77dd6d45fb46161732ccb
|
|
| MD5 |
5865338f345f8b225f7d9022175532ab
|
|
| BLAKE2b-256 |
2b7f5fd0fc6f93000d7a2467d3e8329c21041bf0f6f7d2beab50f15d6329be7c
|
File details
Details for the file new_tasty_trade_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: new_tasty_trade_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
402ccab184a84962c3f42dec6381cf4b7c169d1127b4b3b5eea79ecb9707b3b5
|
|
| MD5 |
1701f224bcc87f9daac32704c47bd7d7
|
|
| BLAKE2b-256 |
4f94fd8fea9061a2ca6f1e3e809fd6196f4d312901de3feaa4f2ece6b934df12
|