MCP for AI agents

Lagsmith has an MCP server built in. AI coding agents that support MCP, including Claude Code, Cursor, Codex, Claude Desktop and Windsurf, can use it to:

  • list simulators and apps,
  • set and reset an app’s network,
  • relaunch an app with request monitoring,
  • read its requests,
  • fail or mock endpoints.

Because Lagsmith only slows down the app under test, the agent’s own connection stays at full speed.

The MCP server ships inside the app at /Applications/Lagsmith.app/Contents/MacOS/lagsmith-mcp, so Lagsmith needs to be in your Applications folder. Automation, including MCP, is part of Pro and included in the 14-day trial.

Claude Code

Run this once in Terminal:

claude mcp add --scope user lagsmith -- "/Applications/Lagsmith.app/Contents/MacOS/lagsmith-mcp"

--scope user makes Lagsmith available in every project. Start a new Claude Code session and run /mcp to check it’s connected.

Cursor

Add this to ~/.cursor/mcp.json (or .cursor/mcp.json in a project):

~/.cursor/mcp.json
{
  "mcpServers": {
    "lagsmith": {
      "command": "/Applications/Lagsmith.app/Contents/MacOS/lagsmith-mcp"
    }
  }
}

Codex

Add this to ~/.codex/config.toml:

~/.codex/config.toml
[mcp_servers.lagsmith]
command = "/Applications/Lagsmith.app/Contents/MacOS/lagsmith-mcp"

Claude Desktop

In Claude Desktop, open Settings › Developer › Edit Config and add:

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "lagsmith": {
      "command": "/Applications/Lagsmith.app/Contents/MacOS/lagsmith-mcp"
    }
  }
}

Then restart Claude Desktop.

Windsurf

Add this to Windsurf’s MCP config:

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "lagsmith": {
      "command": "/Applications/Lagsmith.app/Contents/MacOS/lagsmith-mcp"
    }
  }
}

If your config file already has other servers, add the lagsmith entry inside the existing mcpServers section rather than replacing the file.

Tools

Lagsmith’s MCP server gives agents 10 tools:

ToolWhat it doesMain parameters
list_targetsRunning simulators and their apps, running Mac apps, presets and current rulesnone
statusEvery rule, what it’s doing, and whether the proxy is runningnone
set_networkSlow down or break one app’s networkapp, simulator; preset, or down/up (kbps), latency/jitter (ms), loss (%); failure (airplane, refuse, timeout, drop, outages); hosts, hosts_mode
reset_networkBack to full speed; the app stays watchedapp, simulator
stop_watchingTurn the app’s rule off entirelyapp, simulator
relaunch_appRelaunch a simulator app with request monitoringapp, simulator
get_requestsThe app’s recent HTTP requests, newest firstapp, simulator, limit, filter (e.g. is:failed, status:5xx), include_bodies
fail_endpointMake one endpoint fail while the rest worksapp, simulator, pattern, kind (offline, timeout, status, delay), value
mock_endpointAnswer one endpoint with a made-up responseapp, simulator, pattern, status, body, content_type, delay
clear_endpointsRemove endpoint failures and mocksapp, simulator, pattern

What a session looks like

> Run the checkout UI tests on 3G with the payments API returning 503s, and tell me what breaks.
I’ll find the app in the simulator first.
lagsmith - list_targets (MCP)
simulators: iPhone 17 Pro (booted)apps: com.pantryhq.Pantry, com.apple.mobilesafari, …presets: Edge, 3G, DSL, LTE, WiFi, Very Bad Network, 100% Loss
lagsmith - set_network (MCP)(app: "com.pantryhq.Pantry", simulator: "booted", preset: "3G")
{"ok": true, "rule": "Pantry", "preset": "3G", "conditions": {"down": 780, "up": 330, "latency": 200}}
lagsmith - fail_endpoint (MCP)(app: "com.pantryhq.Pantry", simulator: "booted", pattern: "api.pantryhq.app/v1/payments", kind: "status", value: 503)
{"ok": true, "endpoints": [{"pattern": "api.pantryhq.app/v1/payments", "kind": "status", "value": 503}]}
lagsmith - relaunch_app (MCP)(app: "com.pantryhq.Pantry", simulator: "booted")
{"ok": true, "relaunched": ["Pantry on iPhone 17 Pro"]}
Bash(xcodebuild test -scheme PantryUITests -only-testing:PantryUITests/CheckoutTests -destination 'platform=iOS Simulator,name=iPhone 17 Pro')
Test Suite 'CheckoutTests' started✓ testCartLoads (4.8 s)✓ testApplyCoupon (6.1 s)✗ testPlaceOrder (30.0 s): Failed to find "Order confirmed" within 30 sExecuted 3 tests, with 1 failure
lagsmith - get_requests (MCP)(app: "com.pantryhq.Pantry", simulator: "booted", filter: "host:api.pantryhq.app is:failed", include_bodies: true)
POST https://api.pantryhq.app/v1/payments 503 injected by Lagsmith 2 msPOST https://api.pantryhq.app/v1/payments 503 injected by Lagsmith 1 msPOST https://api.pantryhq.app/v1/payments 503 injected by Lagsmith 1 ms(3 requests, 0.4 s apart)
lagsmith - reset_network (MCP)(app: "com.pantryhq.Pantry", simulator: "booted")
{"ok": true, "preset": "No Throttling"}
Found it. On 3G the cart and coupon flows are fine, but when payments returns 503: 1. PaymentService retries 3 times with no backoff (0.4 s apart), then gives up silently. 2. The checkout screen keeps its spinner forever: there’s no error state for a failed payment, so testPlaceOrder times out waiting for "Order confirmed". Want me to add exponential backoff and an error state with a "Try again" button in CheckoutView, then rerun the tests under the same conditions?
Illustrative Claude Code session using Lagsmith’s MCP server. Your agent stays at full speed; only Pantry is on 3G.

Example prompts

  • “Relaunch the app on 3G with monitoring, sign in, and list requests slower than two seconds.”
  • “Put the app in Airplane Mode and check that the offline banner appears.”
  • “Make POST /v1/orders return 500 and check the app shows a retry button.”

Slow down one app, not your whole Mac

Free to download, with a 14-day Pro trial. No account, no card. Requires macOS 13 Ventura or later.