Connect External Agent (MCP)
Connect MCP to XTester step by step: get the generated command or config, add Claude Code, Codex, Claude Desktop or Cursor, and verify project reading.
Before connecting
Open XTester Studio and your project. Choose an AI client that supports local MCP servers. Keep Studio running while the agent uses its window.
The short path is to obtain configuration from Studio, add it to the client, select a window and verify project reading. The XTester website address is not a local MCP server endpoint.
Open MCP connection setup
Command Palette → Connect External Agent (MCP)…. The command is in the XTester AI category.
- Choose the MCP connection command.
- Copy the configuration for your client.
It opens Settings → External Agents, with client cards, configuration copying, confirmation settings and help links.
Get the generated examples
Choose your client card. Copy command provides Claude Code registration, Copy Codex config provides TOML, and Copy JSON provides a block for compatible clients.
- These are this installation’s paths; do not copy a path from the screenshot.
Use the output of your own application: it contains this installation’s command and required arguments. If the output includes --engine-dir and a path alongside --studio, retain them. Do not substitute someone else’s machine path.
Open Config Folder leads to mcp-connect, containing claude-code.txt, codex.toml, mcp.json and README.md. The application creates and refreshes these files when its engine starts; save your edits in the AI client’s configuration. Expand the technical details to inspect actual paths.
Claude Code
Copy the command from the Claude Code card and run it in a terminal. The server name is xtester-studio. The commands below can verify registration.
- Copy the command in Studio.
- Run it and inspect xtester-studio with claude mcp list or /mcp in the client.
- Ask the client to connect to the intended Studio window.
/absolute/path is a placeholder in this example. Studio’s generated command already supplies your path and may include additional arguments; use that complete command.
claude mcp add --scope user xtester-studio -- "/absolute/path/XTester.McpHost" --studio
claude mcp list
claude mcp get xtester-studioCodex
Copy TOML from the Codex card. MCP servers are configured in config.toml, normally ~/.codex/config.toml; trusted projects can use their own .codex/config.toml.
Add xtester-studio while preserving existing settings and servers. The example shows the format; obtain command and args from your Studio. Refresh the client connection or start a new session, then check that the server is available.
[mcp_servers.xtester-studio]
command = "/absolute/path/XTester.McpHost"
args = ["--studio"]Claude Desktop and Cursor
Copy JSON provides an mcpServers object containing xtester-studio and its local process command and arguments.
Claude Desktop: open local MCP settings and claude_desktop_config.json through developer settings. On macOS it is normally in ~/Library/Application Support/Claude/; on Windows, %APPDATA%\Claude\. Add the server entry and restart the client.
Cursor: use the project’s .cursor/mcp.json or personal ~/.cursor/mcp.json. Add the entry to mcpServers and check it in MCP settings. If asked to choose a transport, select local stdio.
Preserve other mcpServers entries. The path below is illustrative; copy the complete configuration for your installation from Studio.
{
"mcpServers": {
"xtester-studio": {
"command": "/absolute/path/XTester.McpHost",
"args": [
"--studio"
]
}
}
}First connection check
Ask the client to list live Studio windows and select the intended project. Project name and window tag distinguish multiple windows. Request read-only access for the first check.
- Tell the client which window or project to use.
- Approve reading in Studio’s request.
- Compare the returned project name and file list with your window.
- Inspect the client row in AI Models → External Connections.
In Studio, review the project, client and access cards, then approve the limited connection. The client should retrieve information about that exact project. A server entry in client settings alone does not establish window selection.
List the open XTester Studio windows. After I choose my window, connect read-only. Report its project and files without changing anything.What the client checks
The technical sequence is list_studio_sessions → select_studio_session → get_studio_attach_status → get_project_info. Use identities from fresh host responses, not examples or a previous run.
select_studio_session takes session_id, window_tag and requested access. After pending, pass its requestId to get_studio_attach_status as attach_request_id. Read project information only after access has been granted.
confirm=true confirms the window explicitly chosen by the user. It does not replace approval in Studio’s dialog or authorise silently selecting another project.
Client references and next steps
Official Claude Code guide: https://code.claude.com/docs/en/mcp
Official Codex guide: https://learn.chatgpt.com/docs/extend/mcp?surface=cli
Local MCP servers and Claude Desktop: https://modelcontextprotocol.io/docs/develop/connect-local-servers
Official Cursor guide: https://cursor.com/docs/mcp