---
title: "AI agents"
url: https://docs.truemarkets.co/cli/ai-agents
description: "Let an AI agent trade through the tm CLI with skills, or through the hosted MCP server."
---

Docs index: https://docs.truemarkets.co/llms.txt

# AI agents

An agent can trade by running the `tm` binary locally through skills, or by connecting to the hosted MCP server. The choice depends on where the agent runs and whether you want to install anything.

|  | Skills | MCP |
| --- | --- | --- |
| Runs | The `tm` binary, locally | Hosted server, nothing installed |
| Install | `npx skills install …` | Add a server URL to your client |
| Clients | Claude Code, Codex, Cursor, any skills-protocol agent | Claude Desktop, Claude Code, Cursor, any MCP client |

## Skills: the agent runs the CLI

Install the True Markets skills and the agent discovers the commands without being told the syntax. The CLI must be [installed](https://docs.truemarkets.co/cli/installation) and [authenticated](https://docs.truemarkets.co/cli/authentication) first.

Install the skills your agent will use

```bash
npx skills install truemarkets                # general trading
npx skills install truemarkets-limit-orders   # limit orders
```

## MCP: the hosted server

The hosted MCP server gives any compatible client the same trading tools: check prices, get quotes and place trades. Your signing key stays on your device. You log in from the chat with a code we email you, so there is nothing to install and no API key to place.

**Claude Code:**

Add the trading server to Claude Code

```bash
claude mcp add truemarkets --transport http https://mcp.truemarkets.co/mcp
```

**Claude Desktop** reads `claude_desktop_config.json`. **Cursor** reads `.cursor/mcp.json`.

The one entry both config files need

```json
{ "mcpServers": { "truemarkets": { "url": "https://mcp.truemarkets.co/mcp" } } }
```

Per-client walkthroughs are under [MCP](https://docs.truemarkets.co/mcp).

## Example session

An agent looks up trending assets, then buys one

```console
> What tokens are trending by volume?

  ▶ Calling get_trending_assets(limit: 3)

  1. SOL   $4.2B volume (+38% vs 7d avg)
  2. JUP   $312M volume (+125% vs 7d avg)
  3. BONK  $89M volume  (+64% vs 7d avg)

> Buy $50 of JUP

  ▶ Calling get_quote(chain: solana, side: buy, base_asset: JUP, qty: 50)
  Price: $0.6241 • Qty: 80.12 JUP • Fee: $0.10

  ▶ Calling trade_prepare → trade_execute
  ✓ Order filled: 80.12 JUP @ $0.6241
```

> **Agents can spend real funds**
> 
> Both routes execute real trades. An agent passing `--force` (skills) or calling `trade_execute` (MCP) moves money without a prompt. Scope what an agent may do before handing it credentials.

## Next steps

-   **[MCP setup](https://docs.truemarkets.co/mcp)**: per-client walkthroughs for Claude, ChatGPT and Cursor.
-   **[Trading server](https://docs.truemarkets.co/mcp/servers/trading)**: every tool the hosted server exposes.