# Connect XTester to an AI agent (MCP)

## AI agents: install and first run

[Start: install → verify → connect → first backtest](https://xtester.pw/mcp/agent-onboarding?lang=en) · [Full Markdown guide](https://xtester.pw/mcp/agent-onboarding.md). Preview guide: readable over HTTP without JavaScript; not cross-platform end-to-end certification. [Current version and SHA-256 manifest](https://xtester.pw/releases/current.json).

## Connecting — the built-in XTester screen

XTester knows the real install path and the current workspace rules, so you connect through the GUI rather than by hand-editing configs:

1. Download XTester only from the [official GitHub Release](https://github.com/79231232393/XTester-releases/releases/latest).
2. Install or unpack the program.
3. Launch XTester.
4. Open **Settings → External agents**, or run the **"Connect external agent (MCP)…"** command.
5. Pick your MCP client — XTester Studio has already prepared its configuration (Claude Code, Codex, a generic `mcp.json`) with the paths of your installation.
6. Add it to your client.
7. Restart the agent session; when connecting to an open Studio window, approve the access in that window.
8. Verify the connection with a safe read-only call.

These configurations always match the installed version and the real component locations. That is why concrete install paths and launch arguments are not reproduced on the website — the application itself shows their current values.

## How it works, conceptually

XTester runs a **local MCP server over the stdio transport**: the AI client talks to it directly on your computer, and no separate MCP network port is opened. See [Security](https://xtester.pw/mcp/security) for more on transport and data.

## Clients

Source-checked website generator formats: Claude Code — project `.mcp.json`; Cursor — `.cursor/mcp.json` (JSON); Codex — user `~/.codex/config.toml`, section `[mcp_servers.xtester-studio]`; Claude Desktop — `claude_desktop_config.json`, macOS/Windows only, not Linux. Use the actual absolute command from installed Studio, args `["--studio"]`. Choose the client actually in use, preserve its existing configuration and approve the diff. Source-valid format does not certify an installed client or a working MCP connection. Other clients need separate verification. [Full workflow and checked-release limitations](https://xtester.pw/mcp/agent-onboarding.md).

## What not to do

- do not disable antivirus or SmartScreen;
- do not run as administrator without a proven need;
- do not use debug paths like `bin\Debug\...`;
- an agent must not silently download and run the application — the user confirms install and launch.
