# Claude Code

Source: https://docs.tradefloor.dev/claude-code.html

> Add tradefloor's local MCP server to Claude Code with one claude mcp add command, then check that its 19 simulation and evaluation tools load.

Claude Code can run tradefloor's [local MCP server](https://docs.tradefloor.dev/mcp-local.html) as a subprocess over stdio. That gives the model 19 simulation and evaluation tools, such as `evaluate_strategies` and `explain_price_move`. With the session tools it can trade step by step in a simulated market the server keeps open. No order reaches a real broker, and the server needs no API key or environment variable.

## Add the server

If you have [uv](https://docs.astral.sh/uv/), run this in a terminal. uv fetches tradefloor when Claude Code starts the server, so you don't need to install anything first.

```
claude mcp add tradefloor -- uvx --with "tradefloor[mcp]" tradefloor mcp
```

The `--` separates Claude Code's options from the command that starts the server. By default the server is added at local scope. It loads in the current project only, and the entry is stored in `~/.claude.json`. Add `--scope user` before the name to load it in all your projects, or `--scope project` to write it to `.mcp.json` in the project root, where your team can share it through version control. Claude Code asks you to approve a server from `.mcp.json` before it uses it.

If you installed the package with `pip install "tradefloor[mcp]"`, point Claude Code at the `tradefloor-mcp` command. Give its full path if Claude Code doesn't start inside that environment.

```
claude mcp add tradefloor -- tradefloor-mcp
```

## Check it works

Run `claude mcp list`. It health-checks each server, and the tradefloor line should end in `Connected`:

```
tradefloor: uvx --with tradefloor[mcp] tradefloor mcp - ✔ Connected
```

`claude mcp get tradefloor` shows the details of the tradefloor entry.

Inside a Claude Code session, type `/mcp` to see the server's status. Then ask Claude to call `describe_simulator`. The result says what the simulator is, what it's measured to reproduce and what it can't do.

## Tested with

Claude Code 2.1.289 and tradefloor 0.11.0, at local and project scope.
