# VS Code

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

> Add tradefloor's local MCP server to VS Code for GitHub Copilot agents, from the command line or in mcp.json, then check its 22 tools in chat.

GitHub Copilot in VS Code can use tradefloor's [local MCP server](https://docs.tradefloor.dev/mcp-local.html) as agent tools. VS Code runs the server 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/), this command adds tradefloor to your VS Code user profile and makes it available in every workspace. uv fetches tradefloor when VS Code starts the server. The single quotes work in bash and zsh.

```
code --add-mcp '{"name":"tradefloor","command":"uvx","args":["--with","tradefloor[mcp]","tradefloor","mcp"]}'
```

For a single workspace, create `.vscode/mcp.json` in the project. VS Code's format puts servers under `servers`:

```
{
  "servers": {
    "tradefloor": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--with", "tradefloor[mcp]", "tradefloor", "mcp"]
    }
  }
}
```

VS Code also reads `.mcp.json` at the workspace root, with the `mcpServers` key that Claude Code and Cursor use. The MCP: Open User Configuration command opens the `mcp.json` in your user profile. It takes the `servers` shape shown above.

The command must be on VS Code's path or be a full path. If you installed the package with `pip install "tradefloor[mcp]"`, use the full path to `tradefloor-mcp` in that environment and leave out `args`:

```
{
  "servers": {
    "tradefloor": {
      "type": "stdio",
      "command": "/path/to/venv/bin/tradefloor-mcp"
    }
  }
}
```

## Check it works

The first time a server in your user profile starts, VS Code shows a trust dialog and won't start the server until you trust it. A server in `.vscode/mcp.json` starts without that dialog once you trust the workspace.

Open the Command Palette and run MCP: List Servers, then select `tradefloor` to start, stop or restart it, or choose Show Output to see its log.

In the Chat view, select Agent from the agent picker and click Configure Tools in the chat input. The tradefloor tools should be in the list. Then ask the agent to call `describe_simulator`. With the default `chat.mcp.autostart` setting, sending a chat message starts a server that has never run. VS Code may ask you to confirm the tool call. The result says what the simulator is, what it's measured to reproduce and what it can't do.
