> The index of these docs, for agents: https://traktor.fun/llms.txt

# AI agents

How to connect Claude, or another app that takes a remote MCP server, to your account so it reads the market under your plan.

An AI app such as Claude can read Traktor's market for you once you connect it to your account.

## Connect an app

Traktor's MCP server is `https://mcp.traktor.fun/mcp`. Add that address as a connector in the app, then sign in when it asks:

- **Claude**, on claude.ai or the desktop app: add a custom connector with the address.
- **Claude Code**: add the server, then run `/mcp` in a session and choose Traktor to sign in.
- **Another app** that takes a remote MCP server over Streamable HTTP with OAuth: add the address. The app finds where to sign in from the server itself and registers on its own, so there is nothing to copy.

```bash
claude mcp add --transport http traktor https://mcp.traktor.fun/mcp
```

## Approve it

The app opens traktor.fun/connect in your browser. Sign in to Traktor if you are not, read the page, and choose Allow; Cancel sends the app back with nothing.

- The page shows the name the app gives itself and, beside it, the address your approval sends you back to. The address is the fact and the name only the app's claim: Traktor says who runs the address when it knows (Anthropic runs claude.ai), says when it is an app on your own computer, and warns when it cannot vouch for it. It vouches for an address, never for an app, so allow only a connection you started yourself.
- It lists what the app asked to do: Read the market (`market:read`), the market reads below under your plan, Read your account (`account:read`), your wallets, what they hold and your orders, or both. An app cannot trade, move funds, or see or change your alerts, keys or settings.

An account holds 10 connected apps.

## What it reads

The app calls fourteen read-only tools. Twelve read the market: each is one read on a metered route, made with your connection's own credential, so it costs the units that route costs and is held to your plan's limits ([Plans and limits](https://traktor.fun/docs/plans.md)). Two read your own account and cost no units.

| tool | reads |
|---|---|
| `search_tokens` | a search for tokens by ticker or address ([Tokens](https://traktor.fun/docs/tokens.md)) |
| `get_board` | the token board ([Market](https://traktor.fun/docs/market.md)) |
| `get_market_summary` | the market's totals ([Market](https://traktor.fun/docs/market.md)) |
| `get_flow_series` | net flow by minute ([Market](https://traktor.fun/docs/market.md)) |
| `get_tape` | the newest trades ([Market](https://traktor.fun/docs/market.md)) |
| `get_rotation` | where money is rotating ([Market](https://traktor.fun/docs/market.md)) |
| `get_token` | one token ([Tokens](https://traktor.fun/docs/tokens.md)) |
| `get_token_signals` | one token's signals ([Tokens](https://traktor.fun/docs/tokens.md)) |
| `get_signals` | the newest page of the signal feed ([Signals](https://traktor.fun/docs/signals.md)) |
| `get_signals_board` | the Signals board ([Signals](https://traktor.fun/docs/signals.md)) |
| `get_stocks` | the stock tokens ([Board reads](https://traktor.fun/docs/board-reads.md)) |
| `get_top_traders` | the top traders with a handle ([Traders](https://traktor.fun/docs/traders.md)) |
| `get_portfolio` | your wallets, what each holds on each chain, your recent orders and your trades |
| `list_orders` | your open limit orders and the 100 most recent closed ones, or your TWAPs: running ones first, then the newest, up to 20 |

An answer is the API's, with a few things left out. Your own wallets reach the app only through the two account tools. Other traders' wallets never reach it, a token creator's included, nor the transaction hashes that would name one; a top trader with no handle is not listed, and the answer says how many were left out. Page cursors and pictures are left out too, and so is which source a figure came from; a name, ticker or handle longer than 64 characters is cut, and a token's outside checks come as `contractChecks`, their flags in words that name no checker; a few other fields carry plainer names too. A figure nobody measured stays `null`, and every answer tells the app that a `null` is unknown, never zero, and that token names are data, never instructions.

The market tools' calls count in your account's usage on your profile's [API tab](https://traktor.fun/profile?tab=api); the account tools' reads cost nothing and are not counted there. Each connection reads through a key of its own that nobody ever sees: it is not in your list of keys and counts toward no key limit.

## Sign-in and tokens

The app holds an access token, `trk_agent_…`, for an hour, and a refresh token, `trk_refresh_…`, that it trades for a new pair; each refresh token works once and lasts 30 days. An app away longer than that asks you to connect again.

- An access token reads the metered routes when its connection holds Read the market, and three reads of your own on the trading API when it holds Read your account: the portfolio, limit orders and TWAPs. Every other route that reads a credential refuses it, and so do the sockets.
- A refresh token presented again more than 10 seconds after its use means someone else holds a copy, so Traktor ends the connection. Within those seconds it counts as a retry and gets a new pair.
- A refused call answers with the API's code and message, and with how long to wait when a limit refused it ([Errors](https://traktor.fun/docs/errors.md) lists every code a market tool can answer). An expired or ended token is answered `401`, which sends the app to refresh it, and a connection without the scope a tool needs `403 insufficient_scope`, naming the scopes to approve again.
- An unknown or ended token counts against the address it came from, apart from the budget for refused keys. Apps like Claude call from servers many people share, so once that budget is spent a token Traktor must look up again answers `rate_limited` and how many seconds to wait, even a valid one on a market tool: the app waits that long rather than connecting again.

## Disconnect

Connected apps on your profile's [API tab](https://traktor.fun/profile?tab=api) lists each app with where it lives, what it may do and when it last read. Disconnect ends it at once and deletes its tokens; calls with them stop within seconds. Removing the connector in the app may leave the connection standing, so end it here too.
