sauce-api-mcp — Claude Code MCP server: what it does, how to install
Connects AI coding assistants to the Sauce Labs infrastructure. It lets agents inspect test logs, check cloud devices, and track tunnel status.
claude mcp add --env SAUCE_USERNAME=<SAUCE_USERNAME> --env SAUCE_ACCESS_KEY=<SAUCE_ACCESS_KEY> --transport stdio sauce-api-mcp -- uvx sauce-api-mcpWhat sauce-api-mcp does
The package ships two executable servers upon installation: sauce-api-mcp for general API endpoints and sauce-api-mcp-rdc for real hardware. The core server inspects test jobs and checks Sauce Connect tunnels. Agents can browse through 300+ real iOS and Android models alongside virtual machines.
The RDC server relies on FastMCP to generate tools directly from the Sauce Labs OpenAPI definition at startup. This keeps device tools current. To protect model context limits, list payloads get truncated at 100 records by default through SAUCE_MCP_MAX_RESPONSE_ITEMS.
Connecting requires Python 3.10+ along with SAUCE_USERNAME and SAUCE_ACCESS_KEY credentials. Device file transfers stay locked inside ~/.sauce-mcp/files/ to stop path traversal attacks.
What it helps with
- inspect failed test execution logs and failure causes
- query 300+ real iOS and Android devices in the cloud
- verify Sauce Connect tunnel health and settings
- manage uploaded test applications and build artifacts
Example prompts for the agent
- Show me available Android devices in the US West region and check their status.
- Inspect the failure logs and video recording for the latest build.
- Check if the Sauce Connect tunnel is currently running.
How to install sauce-api-mcp
Platform CLI
claude mcp add --env SAUCE_USERNAME=<SAUCE_USERNAME> --env SAUCE_ACCESS_KEY=<SAUCE_ACCESS_KEY> --transport stdio sauce-api-mcp -- uvx sauce-api-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sauce-api-mcp <command>
Platform CLI
codex mcp add sauce-api-mcp --env SAUCE_USERNAME=<SAUCE_USERNAME> --env SAUCE_ACCESS_KEY=<SAUCE_ACCESS_KEY> -- uvx sauce-api-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sauce-api-mcp <command>
Config file
{
"mcpServers": {
"sauce-api-mcp": {
"command": "uvx",
"args": [
"sauce-api-mcp"
],
"env": {
"SAUCE_USERNAME": "<SAUCE_USERNAME>",
"SAUCE_ACCESS_KEY": "<SAUCE_ACCESS_KEY>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sauce-api-mcp <command>
Config file
{
"servers": {
"sauce-api-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"sauce-api-mcp"
],
"env": {
"SAUCE_USERNAME": "<SAUCE_USERNAME>",
"SAUCE_ACCESS_KEY": "<SAUCE_ACCESS_KEY>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sauce-api-mcp <command>
Platform CLI
gemini mcp add -e SAUCE_USERNAME=<SAUCE_USERNAME> -e SAUCE_ACCESS_KEY=<SAUCE_ACCESS_KEY> sauce-api-mcp uvx sauce-api-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sauce-api-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about sauce-api-mcp
How do I install sauce-api-mcp in Claude Code?
Run claude mcp add --env SAUCE_USERNAME=<SAUCE_USERNAME> --env SAUCE_ACCESS_KEY=<SAUCE_ACCESS_KEY> --transport stdio sauce-api-mcp -- uvx sauce-api-mcp, supplying your Sauce Labs credentials.
What is the difference between the core and RDC servers?
The core server interacts with standard platform endpoints for accounts, builds, and tunnels. The RDC server targets the Real Device Cloud, generating its tools dynamically from OpenAPI specs via FastMCP.
Where can file transfers write data on target devices?
Pushing or pulling files on mobile devices is strictly confined to ~/.sauce-mcp/files/. This boundary blocks path traversal attempts.