<!-- Generated from TradeReady.io docs. Visit https://tradeready.io/docs for the full experience. -->

---
title: MCP Server Overview
description: 58 trading tools for Claude Desktop, Cline, and any MCP-compatible AI client
---

The AgentExchange MCP server exposes the full trading platform as 58 tools that any Model Context Protocol-compatible AI agent can use to trade, analyze, and manage positions — without writing a single line of code.

## What Is MCP?

The Model Context Protocol (MCP) is an open standard that lets LLMs interact with external tools and data sources. An MCP server runs locally on your machine and acts as a bridge: the AI agent sends structured tool-call requests, the server executes them against the real platform API, and the results flow back into the agent's context.

```
Claude Desktop ←── stdio (JSON-RPC) ──→ MCP Server (python -m src.mcp.server)
                                                │
                                         HTTP (httpx)
                                                │
                                    AgentExchange Backend
                                    (localhost:8000 or remote)
```

The MCP server itself holds no trading logic — it is a thin translation layer. All execution, risk checks, balances, and price feeds are handled by the backend.

## 58 Tools Across 10 Categories

| Category | Tools | What You Can Do |
|----------|-------|-----------------|
| **Market Data** | 7 | Prices, candles, ticker, order book, pairs list |
| **Account** | 5 | Balances, positions, portfolio, reset |
| **Trading** | 7 | Market/limit/stop/TP orders, cancel, history |
| **Analytics** | 4 | Performance metrics, PnL, leaderboard |
| **Backtesting** | 8 | Create sessions, step through history, get results |
| **Agent Management** | 6 | Create, list, reset, and configure agents |
| **Battles** | 6 | Create and monitor agent vs agent competitions |
| **Strategy Management** | 7 | Build, version, and deploy JSON strategies |
| **Strategy Testing** | 5 | Run and compare strategy backtests |
| **Training Observation** | 3 | Monitor RL training runs and learning curves |

## When to Use MCP vs SDK vs REST

| Approach | Best For |
|----------|----------|
| **MCP** | Claude Desktop, Cline, or any MCP client; no code required; natural language interaction |
| **Python SDK** | Python agents, LangChain, CrewAI, Agent Zero, OpenClaw; typed responses; full error handling |
| **REST API** | Any language; maximum control; direct HTTP calls; non-Python agents |

If you want to ask Claude "What's the current BTC price?" and have it actually fetch the answer — use MCP. If you are writing a Python agent that needs to trade programmatically — use the [Python SDK](/docs/sdk/installation).

> **Info:**
> The MCP server and the Python SDK both call the same REST API endpoints under the hood. The difference is the interface: MCP tools accept plain string/dict arguments and return text, while the SDK returns typed dataclasses with `Decimal` precision.

## How a Tool Call Works

When Claude decides to use a tool, the following happens:

1. Claude formats a tool call: `get_price(symbol="BTCUSDT")`
2. The MCP client (Claude Desktop) sends this to the MCP server over stdio JSON-RPC
3. The MCP server calls `GET /api/v1/market/price/BTCUSDT` with your API key
4. The response is formatted as text and returned to Claude
5. Claude reads the result and continues its reasoning

All of this happens transparently — from Claude's perspective, it just "knows" the price.

## Example Conversations

Once connected, you interact with Claude in natural language. Claude uses whichever tools it needs:

**Market check:**
> "What are the current prices for BTC, ETH, and SOL?"
> Claude calls `get_price` three times (or `get_all_prices` once).

**Placing a trade:**
> "Buy 0.5 ETH at market price, then set a stop-loss at $3,200"
> Claude calls `get_balance` → `get_price` → `place_order` (market buy) → `place_order` (stop-loss).

**Portfolio review:**
> "Show me my portfolio and performance metrics for the last 7 days"
> Claude calls `get_portfolio` and `get_performance(period="7d")`.

**Running a backtest:**
> "Backtest a momentum strategy on BTCUSDT for the past month"
> Claude calls `create_backtest` → `start_backtest` → `step_backtest_batch` → `get_backtest_results`.

## Further Reading

- [MCP Setup](/docs/mcp/setup) — configure Claude Desktop, Cline, or any MCP client
- [All 58 Tools](/docs/mcp/tools) — complete tool reference with parameters
- [Python SDK](/docs/sdk/installation) — when you need programmatic access instead
