Skip to content

IDE & MCP

Tripwire ships an MCP server, so it shows up as a tool inside Cursor and Claude Code (and any MCP-capable editor like VS Code). Your editor's agent can drive a real headless browser to test any page in plain English, run saved suites, and check expectations — without leaving the chat. "Test this URL" becomes a one-liner.

This is the install button for testing right where you work: you build in your IDE, and Tripwire tests right there.

The three tools

ToolWhat it does
tripwire_test(url, instructions)Ad-hoc test. Opens url headless, splits instructions into plain-English steps (one per line, or sentence-split), and lets Claude drive each step in a real browser. Returns whether it worked, which step broke, the final URL/page text, and any backend root cause.
tripwire_run_suite(suite_path)Run a saved suite. Runs a *.tripwire.yaml suite end-to-end in one shared browser session. Returns the summary plus per-case pass/fail with the reason and any filed root cause.
tripwire_check(url, expect)Check one expectation. Opens url headless and decides whether a plain-English expect holds. Obvious URL/text shapes are checked deterministically (no model call); anything subjective is adjudicated against the page text + a screenshot. Returns PASS / FAIL / INCONCLUSIVE.

All three use Claude as the brain and a headless Playwright Chromium as the hands, so the server needs ANTHROPIC_API_KEY in its environment (it falls back to the key saved in the dashboard's Settings).

Install

bash
cd mcp-server
uv venv && uv pip install -e .
uv run playwright install chromium    # if not already installed

Verify it's wired up — offline, no browser or key needed:

bash
uv run python smoke_test.py
# -> OK — all 3 expected tools registered.

The server speaks MCP over stdio. To run it directly:

bash
ANTHROPIC_API_KEY=sk-ant-... uv run tripwire-mcp

tripwire-mcp is a console script equivalent to uv run python -m tripwire_mcp.server.

Platform note

The engine's structure module imports a legacy macOS desktop layer (mac_controlpyobjc) at load time, so the MCP server currently imports cleanly on macOS. The browser automation itself is cross-platform; only that import-time dependency is macOS-gated.

Register in Claude Code

One command (set the directory to your absolute mcp-server path):

bash
claude mcp add tripwire \
  --env ANTHROPIC_API_KEY=sk-ant-... \
  -- uv run --directory /ABS/PATH/TO/Tripwire/mcp-server tripwire-mcp

…or commit a project .mcp.json (one ships in the repo root — approve the tripwire server when prompted):

json
{
  "mcpServers": {
    "tripwire": {
      "command": "uv",
      "args": ["run", "--directory", "/ABS/PATH/TO/Tripwire/mcp-server", "tripwire-mcp"],
      "env": { "ANTHROPIC_API_KEY": "sk-ant-..." }
    }
  }
}

Register in Cursor

Create .cursor/mcp.json in your project (one ships in the repo), then open Cursor Settings → MCP and confirm tripwire is connected with its 3 tools:

json
{
  "mcpServers": {
    "tripwire": {
      "command": "uv",
      "args": ["run", "--directory", "/ABS/PATH/TO/Tripwire/mcp-server", "tripwire-mcp"],
      "env": { "ANTHROPIC_API_KEY": "sk-ant-..." }
    }
  }
}

Register in VS Code

VS Code (with MCP support, e.g. Copilot agent mode) reads .vscode/mcp.json:

json
{
  "servers": {
    "tripwire": {
      "command": "uv",
      "args": ["run", "--directory", "/ABS/PATH/TO/Tripwire/mcp-server", "tripwire-mcp"],
      "env": { "ANTHROPIC_API_KEY": "sk-ant-..." }
    }
  }
}

Example prompts (once registered)

  • "Use tripwire_test on https://example.com/login to log in with user@example.com / hunter2 and confirm it lands on the dashboard."
  • "Run the suite at backend/data/suites/checkout.tripwire.yaml with tripwire_run_suite."
  • "With tripwire_check, verify https://example.com/pricing shows the word 'Enterprise'."

Test it with MCP Inspector

To poke the server outside an editor, use the official MCP Inspector:

bash
npx @modelcontextprotocol/inspector \
  uv run --directory /ABS/PATH/TO/Tripwire/mcp-server tripwire-mcp

The Inspector launches the server over stdio and gives you a UI to list the three tools, inspect their schemas, and invoke them with arguments — handy for confirming the connection and trying tripwire_check against a URL before wiring it into your editor.

Layout

mcp-server/
├── pyproject.toml          # package + deps (mcp SDK, anthropic, playwright, …)
├── smoke_test.py           # offline check: server imports + 3 tools registered
└── tripwire_mcp/
    ├── engine.py           # puts backend/app/engine on sys.path; lazy import
    └── server.py           # FastMCP app + the 3 tools

Next: gate your PRs in CI, or learn the suite format.

Tripwire — AI-native, self-healing E2E testing. Terms · Privacy · Legal Notice