MCP server
Argent is an MCP server for mobile, TV and desktop apps. The Model Context Protocol (MCP) is the standard that coding agents use to call external tools. The Argent MCP server gives the agent tools to:
- boot simulators, emulators and devices,
- tap the screen and type text,
- read the UI tree,
- capture screenshots,
- inspect network traffic,
- profile the app.
The Argent MCP server works with Claude Code, Cursor, VS Code, Windsurf, Zed, Gemini CLI, Codex CLI, opencode and other MCP clients. See Supported editors for the full list.
Register the MCP server
Run the installation wizard from the root of your project:
npx @swmansion/argent@latest init
The wizard detects your editor and writes the MCP server entry to the editor config. See Installation for the prerequisites and the team setup.
Add the MCP server by hand
Install the package and add the server to the MCP config of your editor:
npm install -g @swmansion/argent
{
"mcpServers": {
"argent": {
"command": "argent",
"args": ["mcp"]
}
}
}
The key of the top-level object depends on the editor. Claude Code, Cursor and Windsurf use mcpServers. VS Code uses servers. See Supported editors for the config file of each editor.
How the MCP server works
The editor starts argent mcp as a child process and talks to it over standard input and output. The MCP server does not control the devices itself. The MCP server forwards each tool call to the Argent tool-server. The tool-server owns the simulators, emulators and device sessions.
By default, the MCP server starts a local tool-server when the editor starts the MCP server. If that tool-server runs already, the MCP server uses it. All agents that use the same Argent installation share this local tool-server. argent link and the ARGENT_TOOLS_URL variable send the tool calls to a different tool-server. In this section, both are a link. The MCP server reads the link when it starts. After you run argent link or argent unlink, restart the editor.
Over a link, the MCP server uploads files with the same rules as the argent CLI:
reinstall-appuploads the app atappPath.flow-executeandflow-read-prerequisiteupload the flow file with the call.screenshot-diffuploads its images with the call. The MCP server uploads a file of 32 MiB or less. For a larger file, it sends only the path, the size and the modification time. The tool-server then uses its own file at that path only if the size and the modification time are the same. The files of one call can be approximately 36 MiB in total. The tool-server refuses a call that is larger.flow-executealso uploads therun:fragments and the nested flows that the flow reaches, its snapshot baselines and the file arguments of itstool:steps. A fragment larger than 32 MiB stops the flow before the first step. See Remote runs.- Other path parameters reach the tool-server as a path only, for example the
workspacePathofgather-workspace-data.
Run argent server status to see the state of the local tool-server. Run argent server logs to read its output.
Configure the MCP server
Environment variables in the MCP server entry configure the MCP server. ARGENT_TOOLS_URL selects the tool-server that receives the tool calls. ARGENT_MCP_LOG selects the file where the MCP server writes its log of tool calls. See Configuration for the list of variables.
Tools
The MCP server exposes every Argent capability as a tool. Run argent tools to list them from the terminal. See the Tools reference for the name and the description of each tool.