Connect an AI assistant (MCP)
In one paragraph. Trion runs a remote MCP server at https://api.trion.market/mcp (Streamable HTTP) that AI assistants such as Claude and ChatGPT connect to with standard MCP authorization — OAuth 2.1 + PKCE (S256), Dynamic Client Registration, Client ID Metadata Documents, and Protected Resource Metadata (RFC 9728). You paste the URL, sign in with your wallet on Trion's consent screen, choose trading limits, and sign an agent grant; the assistant then gets 11 tools bound to those limits and can never withdraw your funds. The connector is in beta and, since 2026-09-26, open to any wallet — there is no invite list. It trades the CMPT-USD perpetual, which is itself in open beta. If you do not want to configure an external app, the desk's built-in Trion AI chat is the simplest option.
Trion AI chat (the simplest option)
The trading desk at app.trion.market has its own AI chat behind the AI Chat button at the top right. Nothing to install and no connector to configure:
- Click AI Chat, then Sign in with OpenRouter. You authorize Trion on openrouter.ai once; the AI is billed to your own OpenRouter account and credit.
- Pick a model — Claude, GPT or Gemini.
- Type what you want in plain English, e.g. "buy 10 contracts with limit orders from 260 to 250". Prices said in cents are read as dollars, and a price range becomes a ladder of limit orders.
- Every order, cancel or close is shown as a confirmation card and is sent only after you click Confirm. The chat can also answer questions using Trion's market data.
Your OpenRouter key is stored encrypted on your device (a non-extractable browser key) and is never sent to Trion's servers. The chat acts only on the connected wallet's account, within the same limits as the desk.
Connecting from the desk
The quickest way to connect an external app is from the desk: open the account menu and click Use Trion in ChatGPT / Claude. Claude and ChatGPT only accept connectors from inside their own settings, so the desk copies the server link to your clipboard and opens that app's connector settings page for you; the remaining steps are listed there and below. Cursor and VS Code accept one-click install links, which the same picker offers. Google's Gemini app does not let outside services connect yet, so it is shown as not available.
The URL and discovery
- Server URL:
https://api.trion.market/mcp - Protected Resource Metadata:
https://api.trion.market/.well-known/oauth-protected-resource/mcp - Authorization server metadata:
https://api.trion.market/.well-known/oauth-authorization-server - Consent screen:
https://app.trion.market/#/connect
The server publishes its metadata so clients configure themselves — you never type client IDs or scopes by hand.
Claude (web / desktop)
- Sign in to claude.ai on a Pro / Max / Team / Enterprise plan (connectors are not on the free tier).
- In the desk's account menu, click Use Trion in ChatGPT / Claude → Copy link & open Claude. This copies
https://api.trion.market/mcpand opens Claude's connector settings (Settings → Connectors; in Claude Desktop:Ctrl+,on Windows/Linux,Cmd+Shift+,on macOS). - Click Add custom connector, name it
Trion, paste the link, then click Add. Claude reads the server's metadata, starts the OAuth PKCE flow, and opens a browser window to the Trion consent screen. - Connect your wallet, choose your limits, and sign the grant.
- Back in a conversation, turn Trion on from the tools menu and ask away.
The server must be publicly reachable: claude.ai calls it from Anthropic's cloud, not from your device.
Claude Code (CLI)
claude mcp add --transport http trion https://api.trion.market/mcp
Claude Code runs the same OAuth PKCE browser flow on first use and stores the token locally. It requires a paid Claude plan (Pro/Max/Team).
ChatGPT (desktop / web)
- Open ChatGPT on a Plus / Pro / Business / Enterprise plan (Free is not eligible).
- In the desk's account menu, click Use Trion in ChatGPT / Claude → Copy link & open ChatGPT. This copies
https://api.trion.market/mcpand opens ChatGPT's connector settings. - In Connectors → Advanced, turn on Developer mode (an admin must allow it on Business/Enterprise workspaces).
- Click Create, name it
Trion, paste the link, choose OAuth, then Create. - A Trion window opens: connect your wallet and approve. Trion's tools are then usable in chat.
Cursor and VS Code
The desk's connector picker offers one-click install links for both editors: a cursor:// deep link that installs the Trion server from its mcp.json entry, and a vscode:mcp/install link that adds trion as a remote HTTP MCP server. Either editor then runs the OAuth browser flow on first use.
The consent screen
Whatever client you use, the flow lands on https://app.trion.market/#/connect:
- Sign in with your wallet (Sign-In with Ethereum, the same flow the trading app uses).
- Review the requesting client and the scopes it asked for.
- Choose your limits: max order size, max position size, reduce-only mode, and grant expiry (up to 180 days).
- Sign the grant: your wallet signs the EIP-712
AgentGranttyped data, authorizing a fresh agent key inside those bounds. - Approve — Trion registers the grant and returns an authorization code to the client, which exchanges it for tokens.
Deny, and the flow returns access_denied with no key minted.
Tools
The server exposes 11 tools. Public reads need no token; account and trading tools require one.
| Tool | What it does | Access |
|---|---|---|
get_markets | List perpetual markets and summary data | Public (read-only) |
get_orderbook | Fetch book depth (bids, asks) | Public (read-only) |
get_account | Balance, position, risk and margin view | trion:read |
get_positions | Open positions across markets | trion:read |
get_open_orders | Resting orders for the trader | trion:read |
get_fills | Execution fill history | trion:read |
get_grant | Active grant bounds and expiry | trion:read |
place_order | Sign and place a grant-bounded limit/market order | trion:trade |
cancel_order | Cancel a resting order by hash | trion:trade |
cancel_all | Cancel all strategy orders on a market | trion:trade |
close_position | Close the position via a reduce-only IOC order | trion:trade |
Scopes
| Scope | What it permits |
|---|---|
trion:read | Read markets, account, positions and orders |
trion:trade | Place orders and cancel them, inside the grant |
offline_access | Obtain and refresh tokens without re-prompting |
Bounds (max order size, max position, reduce-only, expiry) are grant fields you choose on the consent screen, not scope strings.
Token lifetimes
- Access token: 1 hour.
- Refresh token: 30 days, rotated on every use with reuse detection (a replayed refresh revokes the family).
Tokens are opaque and stored hashed, like session tokens.
Revoking
Revoke from the app at any time under Connected apps (the same place you connected the assistant). Revoking a grant:
- Revokes its tokens, and
- Cancels the agent's resting orders at once. AI access ends within ~30 s (token introspection cache).
The grant also ends on its own when it expires. See Agent grants and limits.
Typed denials
When something is refused, the error is explicit rather than a generic failure:
| Code | When |
|---|---|
AGENT_LIMIT | An order would exceed a grant bound (the message names the bound) |
insufficient_scope | A token without trion:trade tried to place or cancel an order |
NOT_INVITED | Historical: returned by the connect page while access was invite-only. Since 2026-09-26 the connector is open to any wallet, so this should no longer occur. |
Other clients
Interactive apps run the full OAuth browser sign-in natively; raw API providers accept a static Bearer token instead.
| Client | Sign-in | Notes |
|---|---|---|
| Claude (web/desktop/mobile), Claude Code | OAuth 2.1 + PKCE | Custom connectors; paid plan |
| ChatGPT (desktop/web) | OAuth 2.1 + DCR + CIMD | Developer Mode → Connectors; paid plan |
| Gemini CLI | OAuth browser flow | /mcp auth <name> |
| Grok (app/CLI) | OAuth (app/CLI) | grok mcp add ... |
| Le Chat | OAuth 2.0 | Connectors |
| Perplexity | OAuth 2.0 | Pro/Enterprise tiers (UNVERIFIED exact floor) |
| Copilot Studio, VS Code Copilot | OAuth 2.0 / PKCE | Manual OAuth params or auto-discovery |
| Cursor, Windsurf, Cline, LM Studio, Manus, Qwen Code | OAuth PKCE / provider config | Browser flow on 401 or settings |
| OpenAI Responses API | Static Bearer token | authorization/headers in tools — no browser flow |
| Groq API, xAI API | Static Bearer token | headers/authorization Bearer — no browser flow |
| Gemini web/app, DeepSeek, Meta AI, Z.ai chat | Not supported | No client-side custom MCP; Google's Gemini app does not support third-party connectors yet. Use Trion AI chat on the desk (which offers Gemini models via OpenRouter) or another client. |
Token-only providers need an access token minted out-of-band and passed as a static Bearer header; they do not run the interactive consent flow.
Source trail: docs/developers/ai-clients.md (product matrix), docs/developers/agent-access.md §4 (OAuth + MCP topology), overdrive/exchange/mcp/README.md (tools, scopes, discovery), docs/perf/runs/2026-09-24-agent-kit-e2e/README.md (verified flow), overdrive/exchange/web/src/account/connect-ai.ts (AI_APPS, cursorInstallLink, vscodeInstallLink), overdrive/exchange/web/src/account/ui.ts ("Use Trion in ChatGPT / Claude", "AI Chat"), overdrive/exchange/web/src/ai/panel.ts, ai/openrouter-auth.ts (Trion AI chat sign-in and confirmation cards).
Repository-owned documentation · October 2026 · Educational material, not investment advice and not an audit.
Documentation
Options live · Perps in open beta