tastytrade-mcp
MCP server for the tastytrade brokerage API, providing tools for account management, market data, and order execution.
README
tastytrade-mcp
MCP server for the tastytrade brokerage API, built in TypeScript on the official @tastytrade/api SDK. Runs over stdio.
This is a rebuild of the earlier Python tastytrade_mcp server with a deliberately leaner surface: single-tenant, env-var auth, no database, and only tools backed by real API endpoints.
Setup
No clone, no build — npx installs straight from this repo and compiles automatically on first run. You need Node 20+ and SSH access to this GitHub repo (the same git@github.com key you use for pushing).
-
Create an OAuth client and a personal-grant refresh token at my.tastytrade.com → Manage → API Access. You need the client secret and the refresh token (access tokens are generated and refreshed automatically).
-
Put the secrets in your environment (shell profile, or a gitignored
.envloaded by direnv — never in a file you commit):export TASTYTRADE_CLIENT_SECRET="..." export TASTYTRADE_REFRESH_TOKEN="..." -
Register with your MCP client.
Project
.mcp.json(Claude Code) — safe to commit..mcp.jsonsupports${VAR}environment-variable expansion, so the file holds only references; values are read from the environment Claude Code was launched in. If a variable is missing, the config fails to load rather than silently sending an empty secret:{ "mcpServers": { "tastytrade": { "command": "npx", "args": ["-y", "git+ssh://git@github.com/bholzer/tastytrade-mcp.git"], "env": { "TASTYTRADE_CLIENT_SECRET": "${TASTYTRADE_CLIENT_SECRET}", "TASTYTRADE_REFRESH_TOKEN": "${TASTYTRADE_REFRESH_TOKEN}", "TASTYTRADE_ENVIRONMENT": "${TASTYTRADE_ENVIRONMENT:-production}" } } } }⚠️ Don't use
claude mcp add --scope project --env TASTYTRADE_CLIENT_SECRET=...— that writes the literal secret value into.mcp.json, which is exactly the file that gets committed. Write the${VAR}form by hand as above.One-liner (Claude Code, user scope).
claude mcp adddefaults to local/user config (~/.claude.json), which never leaves your machine, so passing values directly is acceptable there:claude mcp add tastytrade \ --env TASTYTRADE_CLIENT_SECRET="$TASTYTRADE_CLIENT_SECRET" \ --env TASTYTRADE_REFRESH_TOKEN="$TASTYTRADE_REFRESH_TOKEN" \ -- npx -y git+ssh://git@github.com/bholzer/tastytrade-mcp.gitClaude Desktop.
claude_desktop_config.jsondoes not support${VAR}expansion — you have to paste the values in. That file is local-only (not committed), but be aware the secrets sit in plaintext on disk.The first launch takes ~30s while npm clones and compiles; after that it starts from cache. To pin a specific version, append a tag or commit:
...tastytrade-mcp.git#v1.0.0.
Updating
npx caches the install. To pick up new commits:
npx clear-npx-cache # then the next launch re-installs from HEAD
(Or pin to tags and bump the tag in your config.)
Running from a local checkout (development)
claude mcp add tastytrade \
--env TASTYTRADE_CLIENT_SECRET="$TASTYTRADE_CLIENT_SECRET" \
--env TASTYTRADE_REFRESH_TOKEN="$TASTYTRADE_REFRESH_TOKEN" \
-- node /path/to/tastytrade-mcp/dist/index.js
Environment variables
| Variable | Required | Description |
|---|---|---|
TASTYTRADE_CLIENT_SECRET |
yes | OAuth client secret |
TASTYTRADE_REFRESH_TOKEN |
yes | OAuth personal-grant refresh token |
TASTYTRADE_ENVIRONMENT |
no | production (default) or sandbox (cert environment) |
TASTYTRADE_SCOPES |
no | OAuth scopes, default read trade |
Tools (18)
System
health_check— verify credentials, report environment and customer.
Accounts & portfolio
get_accounts— list accounts.get_balances— cash, net liq, buying power, margin usage.get_positions— open positions, filterable by symbol/underlying, optional marks.get_transactions— transaction history with date/symbol/type filters and paging.get_net_liq_history— historical net liquidating value (1d–all).get_margin_requirements— margin/buying-power requirements report.
Market data
search_symbols— symbol search.get_instrument— full instrument definition (tick size, streamer symbol, …) for equities, options, futures, future options, crypto.get_market_metrics— IV rank/percentile, liquidity, beta, earnings/dividend dates.get_option_chain— nested option chain with expiration/DTE/strike/type filters; returns an expiration summary when unfiltered to keep responses small.get_quotes— live bid/ask, last trade, OHLC summary, and Greeks (for options) via the dxLink websocket streamer. Accepts equity, OCC option, futures, and future-option symbols.
Trading
create_order— 1–4 leg orders for any instrument type. Dry-run by default: returns the preview (buying-power effect, fees, warnings) without placing anything; requires explicitdry_run: falseto submit.list_orders— order history or live working orders.get_order— single order status.cancel_order— cancel one order.replace_order— modify price/type/TIF of a working order.cancel_all_orders— cancel every working order in an account (optionally one underlying).
Differences from the Python server
- OAuth only (the v7 JS SDK no longer supports session login as a client config). Sandbox use requires a cert-environment OAuth client instead of sandbox username/password.
- Dropped: multi-user database mode, encrypted token storage, shortcuts, and tools that had stub/fake implementations (fake streaming endpoints, correlation analysis, opportunity scanning). The persistent "emergency state" machinery is replaced by the real
cancel_all_ordersaction. set_stop_loss/set_take_profitare expressible throughcreate_order(order_type: "Stop"/"Limit"with closing legs).
Development
npm run watch # incremental compile
npm start # run the built server
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。