MCP integration
ArbiSim Guard exposes a Model Context Protocol (MCP) server. This means any MCP-compatible AI assistant — Claude Desktop, Cursor, or a custom agent — can call ArbiSim directly as a tool, with no HTTP client code needed.
What the agent sees
Your agent gets a tool called preflight_simulate. When called, it runs the simulation and returns a structured result. The agent reads the verdict and decides whether to proceed or abort.
Step 1 — Get your API key
You need a free API key from the API Keys page.
Step 2 — Configure Claude Desktop
Add this to your Claude Desktop config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"arbisim-guard": {
"command": "node",
"args": ["./gateway/dist/index.js", "--mcp"],
"env": {
"GATEWAY_API_KEY": "ask_free_a1b2_..."
}
}
}
}Restart Claude Desktop after saving. You should see "arbisim-guard" listed under connected tools.
Step 3 — Configure Cursor
Add the same block to Cursor's MCP settings at ~/.cursor/mcp.json:
{
"mcpServers": {
"arbisim-guard": {
"command": "node",
"args": ["./gateway/dist/index.js", "--mcp"],
"env": { "GATEWAY_API_KEY": "ask_free_a1b2_..." }
}
}
}Available tools
preflight_simulateRun a full safety check on any EVM transaction. Returns APPROVED or REJECTED with a structured flag object and gas breakdown.
Parameters
- → network — chain to simulate on (e.g. "avalanche-fuji")
- → agent_address — the wallet sending the transaction
- → transactions — array of {to, data, value} objects
- → max_slippage_tolerance — price impact limit in percent (default: 2.0)
x402_preflightSafety check specifically for agent-to-agent payment flows using the x402 protocol. Validates recipient reputation and payment amount.
Parameters
- → network
- → from_address
- → to_address
- → token_address
- → amount_raw
Example agent interaction
Once connected, your agent can use natural language:
"Simulate a swap of 0.5 AVAX for USDC on Avalanche Fuji using the TraderJoe router. Abort if slippage exceeds 2%."
The MCP layer handles translating this into the correct API call. The agent receives back a plain verdict and can act on it.