Tastytrade API for AI Agents: The Official MCP Server Defaults to Real Money
Tastytrade's API now has an agent quickstart and an open-source MCP server with a dry-run gate. Its default endpoint is production. What that means.
Tastytrade’s API now has an official route for AI agents: an Agent Quickstart that walks a model through a full sandbox trade, and an open-source MCP server, tastytrade-mcp, that you host yourself. That server gates its five order-submitting tools behind a dry-run confirmation token, but its default endpoint is production. If you don’t set an environment, it trades real money in every account your credentials reach.
That default is deliberate, and tastytrade explains why. This page covers who can get API access, what the sandbox can and can’t do, what the MCP server’s gate does and doesn’t cover, and the settings to make before you connect a model. Everything below comes from tastytrade’s own developer docs and its GitHub repository, read on 30 November 2026. We haven’t run the server or called the API for this page, and we have no affiliate or commercial relationship with tastytrade.
Who can get tastytrade API access
You need a tastytrade account. The API runs on OAuth2 only; tastytrade’s OAuth guide says the legacy session login was decommissioned. You create an application on my.tastytrade.com under Manage → My Profile → API → OAuth Applications, choose scopes from read, trade and openid, then create a personal grant to get a refresh token.
Three access rules matter for an agent:
- A personal application reaches your account only. In tastytrade’s words, it is “restricted to your account only”. Letting other users connect requires tastytrade’s “trusted third party verification”.
- Access tokens last 15 minutes and “cannot be extended”. Refresh tokens, by contrast, “are long-lived and do not expire” until you delete the grant.
- Every request needs a
User-Agentinproduct/versionform. Requests without one “are rejected with a401”.
Sandbox vs production
tastytrade runs a full sandbox at a separate host with separate credentials. A sandbox refresh token can’t mint a production access token, and the reverse doesn’t work either. Get the pairing wrong and every call fails with a generic credentials error that doesn’t mention the environment.
| Production | Sandbox | |
|---|---|---|
| REST base URL | https://api.tastyworks.com |
https://api.cert.tastyworks.com |
| Money | Real | Simulated; orders “never reach a real market” |
REST market data (/market-data, /market-metrics) |
Served | HTTP 502 “on every route” |
| Orders, dry-runs, positions, balances, option chains | Served | Served |
| Net liquidating value history | Served | “production-only” |
| State | Persistent | “resets every 24 hours”, clearing trades, transactions and positions |
| Fills | Real venues | A market simulator that, per tastytrade’s docs, “does not replicate the venue-specific behaviour of each destination venue” |
Every cell comes from tastytrade’s Sandbox, OAuth2 and Quickstart pages. tastytrade’s docs also describe a common workaround: read market data from production and send orders to the sandbox, using two sets of credentials.
The MCP server: what the dry-run gate covers
tastytrade’s MCP page is direct about hosting: “Self-hosted and open source. You run it yourself… There is no tastytrade-hosted endpoint to connect to.” You clone the repo, build it with Node.js 22 or newer, and launch it over stdio from Claude Desktop, Claude Code, Cursor or another client. Credentials come only from three environment variables: client ID, client secret and refresh token. There’s no interactive login.
The server lists 84 tools: 70 read-only, 2 write, 12 destructive. The gate applies to fewer of them than the headline suggests.
- Five tools need a token:
place_order,edit_order,replace_order,place_complex_orderandedit_complex_order(each prefixedtastytrade_). Each one needs a single-useconfirmation_tokenfrom its owndry_run_*tool. The token is “valid for 60 seconds” and bound to a hash of the arguments and the request target, so “you cannot dry-run one share and submit a thousand”. - Seven destructive tools have no token and no dry-run. These are the two cancel tools, the quote-alert delete and four watchlist tools. Only the two cancels touch orders, and all seven “act on the first call”.
- Sanity checks run before every submit. Per-leg quantities are checked against the account’s own order-size ceilings. A notional cap,
MAX_ORDER_NOTIONAL_USD, defaults to $50,000 of buying-power impact. Orders to frozen or closing-only accounts are refused. The server also caps itself at 50 calls per second overall.
Measured against the three permission bands for broker MCP servers, this server sits in band 2 (order entry). tastytrade’s API reference index (/llms.txt) lists no deposit, withdrawal or transfer operation, so there is nothing in band 3 (funds movement) for it to wrap. And TASTYTRADE_READ_ONLY=1 pins it to band 1 through configuration, though not through the credential itself.
Why production is the default, and how to change it
tastytrade’s reasoning, from its MCP Server page: the sandbox can’t quote, and “a default endpoint that cannot quote would teach operators to override it without reading why.” Quoting is the first thing anyone asks the server to do, so tastytrade chose the endpoint that works and made it loud. The active environment is announced in three places:
- a startup banner on stderr
- the
instructionsfield of the MCP initialize result, which the README calls “the only environment signal the agent itself can read” - an
environmentmember on every dry-run and order result
The resolution rules are the part worth reading closely. Here they are as code. This is a sketch of the documented behaviour, not tastytrade’s own code:
# Illustrative. A sketch of how the tastytrade-mcp README says the server picks
# its endpoint (read 2026-11-30). The real server is TypeScript; this is not its code.
PROD = {"production", "prod", "live"}
SANDBOX = {"sandbox", "cert", "staging", "sbx"}
def resolve_env(env_var, api_url=None):
if api_url: # TASTYTRADE_API_URL wins over TASTYTRADE_ENV
return api_url
if env_var is None: # unset -> the documented default
return "production"
v = env_var.strip().lower() # case-insensitive, whitespace tolerated
if v in PROD:
return "production"
return "sandbox" # SANDBOX names, and any typo like "sandbx"
# TASTYTRADE_READ_ONLY fails closed the same way: an unreadable value
# turns read-only mode ON and withholds all 14 write and destructive tools.
The asymmetry is intentional. An unset variable means you accepted the default. A typo means you tried to name an environment and got it wrong, and in the README’s words that operator “has not thereby granted permission to trade live funds.” So a misspelling lands in the sandbox, not in production.
Settings to make before an agent touches it
These are configuration steps. None of them is advice on whether to trade.
| Setting | What it does | Documented default |
|---|---|---|
TASTYTRADE_ENV=sandbox |
Simulated money; REST quotes fail | Unset = production |
TASTYTRADE_READ_ONLY=1 |
Withholds all 14 write and destructive tools | Off |
MAX_ORDER_NOTIONAL_USD |
Caps an order’s buying-power impact | 50000 |
TASTYTRADE_CREDENTIAL_CHANNEL=strict |
Refuses to start if it detects a proxy or a modified trust store | Not documented |
Credentials in .mcp.json via claude mcp add -s project |
Writes a project file “meant to be committed and shared” | The README calls it “the wrong place” for secrets |
Two more points from the docs. First, the tool list costs context: tools/list “measures about 445 KB with all 84 tools, and about 349 KB” in read-only mode, and that lands in the model’s context at the start of every session. Second, the bundled npm run doctor preflight exits with code 3 on every production deployment, because it treats production as a warning. A deploy script that gates on exit code 0 will never pass in production. That’s by design.
Frequently asked questions
Does tastytrade have an official API for AI agents?
Yes. tastytrade publishes an Agent Quickstart on developer.tastytrade.com, described as a walkthrough “an AI agent can follow to complete a full trade in sandbox”, and the docs site serves /llms.txt as a machine-readable index. The official MCP server is open source at github.com/tastytrade/tastytrade-mcp.
Is there a hosted tastytrade MCP server I can add to Claude or ChatGPT?
No. tastytrade’s docs say there is “no tastytrade-hosted endpoint to connect to.” You build and run the server yourself, and your MCP client launches it as a local subprocess.
Does the tastytrade sandbox provide market data?
Not over REST. /market-data and /market-metrics return HTTP 502 in the sandbox. tastytrade records one observation from 28 October 2026: a sandbox account with a customer record got a demo-level streaming token with a /delayed URL. The docs don’t say how old those quotes are.
Can the tastytrade MCP server place an order without a dry-run?
The five order-submitting and order-editing tools can’t. Each needs a 60-second, single-use token from its own dry-run. The two cancel tools are different: they act on the first call with no token.
How long do tastytrade API tokens last?
Access tokens last 15 minutes and can’t be extended. Refresh tokens don’t expire; you revoke one by deleting its grant on my.tastytrade.com.
Should I connect an AI agent to my tastytrade account?
That depends on your own risk tolerance, and this page won’t decide it for you. tastytrade’s MCP disclosures say you are responsible “for all orders placed from your account” and recommend “testing with paper trading before connecting a live account.”
Sourcing: all product details come from tastytrade’s own pages, read on 30 November 2026: developer.tastytrade.com’s Agent Quickstart, Quickstart, OAuth2, Sandbox, Rate limits and MCP Server pages, and the README at github.com/tastytrade/tastytrade-mcp. Third-party wrappers, including the community tasty-agent package, are not tastytrade’s and are not covered here. tastytrade is not in our link registry, and no link on this page earns anything.
This is educational content about software configuration and operational risk, not financial advice. No positions, signals, account values or trading results appear on this page.