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):
{
"mcpServers": {
"lagsmith": {
"command": "/Applications/Lagsmith.app/Contents/MacOS/lagsmith-mcp"
}
}
} Codex
Add this to ~/.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:
{
"mcpServers": {
"lagsmith": {
"command": "/Applications/Lagsmith.app/Contents/MacOS/lagsmith-mcp"
}
}
} Then restart Claude Desktop.
Windsurf
Add this to Windsurf’s MCP config:
{
"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:
| Tool | What it does | Main parameters |
|---|---|---|
list_targets | Running simulators and their apps, running Mac apps, presets and current rules | none |
status | Every rule, what it’s doing, and whether the proxy is running | none |
set_network | Slow down or break one app’s network | app, simulator; preset, or down/up (kbps), latency/jitter (ms), loss (%); failure (airplane, refuse, timeout, drop, outages); hosts, hosts_mode |
reset_network | Back to full speed; the app stays watched | app, simulator |
stop_watching | Turn the app’s rule off entirely | app, simulator |
relaunch_app | Relaunch a simulator app with request monitoring | app, simulator |
get_requests | The app’s recent HTTP requests, newest first | app, simulator, limit, filter (e.g. is:failed, status:5xx), include_bodies |
fail_endpoint | Make one endpoint fail while the rest works | app, simulator, pattern, kind (offline, timeout, status, delay), value |
mock_endpoint | Answer one endpoint with a made-up response | app, simulator, pattern, status, body, content_type, delay |
clear_endpoints | Remove endpoint failures and mocks | app, simulator, pattern |
What a session looks like
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.”