Pre-deploy Checks (MCP)
You ship fast and you don't have a test suite. Pre-deploy launch checks let your coding agent (Claude Code, Cursor, Windsurf) make sure your critical flows still work before you hit deploy β so you ship without holding your breath. You connect the Opsis MCP server (opsis-mcp) to your agent; the agent reads your codebase and derives the flows that matter β checkout, signup, your app's primary action β from real routes, forms, and selectors. Opsis then runs each flow in a real Chromium browser on your machine and captures full evidence: video, trace, screenshots, console and network logs.
How a launch check flows
- Your agent calls
opsis_launch_check_guideand derives 2β6 critical flows from the codebase β routes, forms, and the real selectors in your JSX/HTML, not guesses from URLs. - For each flow it calls
opsis_run_flow_check. Playwright runs the flow locally against your dev or preview server, recording video, trace, screenshots, console, and network evidence. - A flow passes when every step succeeds with no console errors and no failed requests. On failure, the agent gets the evidence paths plus a guard-railed safe-fix prompt β it applies the fix and re-runs the same check.
- When all flows have run, the agent submits the aggregate report with
opsis_submit_launch_report. The Pre-deploy checks stage on your project dashboard updates instantly with the verdict: Launch-ready: PASS or N ISSUES FOUND.
Setup (once per project)
Pre-deploy checks belong to a project, so create the project first by connecting PostHog with OAuth. Then:
- Open your project's Before Ship tab and expand βRun the check on your machine with your coding agentβ, then reveal the MCP key (
opk_β¦). The key authorizes only this project's launch-report API β never your PostHog data or the dashboard. - Add the server to your coding agent. Both snippets on the Before Ship tab are pre-filled with your project's values, so you can copy them as-is.
Claude Code (one command):
claude mcp add opsis \ -e OPSIS_APP_URL=https://<your-opsis-domain> \ -e OPSIS_PROJECT_ID=prj_xxxxxxxx \ -e OPSIS_MCP_KEY=opk_xxxxxxxx \ -- npx -y opsis-mcpCursor / Windsurf (
mcp.json):{ "mcpServers": { "opsis": { "command": "npx", "args": ["-y", "opsis-mcp"], "env": { "OPSIS_APP_URL": "https://<your-opsis-domain>", "OPSIS_PROJECT_ID": "prj_xxxxxxxx", "OPSIS_MCP_KEY": "opk_xxxxxxxx" } } } } - Make sure Chromium is installed on your machine:
npx playwright install chromium - Start your dev or preview server, then ask your agent, e.g.:
Run Opsis launch checks against my dev server on http://localhost:3000.
Evidence is stored locally under .opsis/predeploy/ in the repo your agent runs from. Check the latest result anytime with opsis_launch_status β or on the project dashboard, where the Pre-deploy checks stage shows Passed / Failing / Flaky with flow counts.
The launch-check tools
These four tools drive the launch-check loop above. The same MCP server also exposes a separate Pre-deploy Security Scan (an OWASP Top 10 check), documented on its own page.
| Tool | What it does |
|---|---|
opsis_launch_check_guide | Instructions for the agent: how to derive critical flows from the codebase. |
opsis_run_flow_check | Runs one flow locally with Playwright β full evidence, plus a guard-railed fix prompt on failure. |
opsis_submit_launch_report | Submits all results in one report β updates the dashboard stage and returns the verdict. |
opsis_launch_status | The latest launch-check status for the project. |
What pass and fail mean
- Pass: every step in the flow succeeded, with no console errors and no failed network requests.
- Fail: a step failed, a console error appeared, or a request failed β the agent receives local evidence paths and a safe-fix prompt scoped to what the evidence shows.
- Verdict:
Launch-ready: PASSwhen every flow passes;N ISSUES FOUNDlists how many flows need attention. The dashboard stage mirrors this as Passed, Failing, or Flaky.
Privacy
- The Opsis MCP server never reads your codebase β your coding agent does, on your machine.
- Only redacted flow results are sent to Opsis: title, route, status, a one-line summary, plus redacted console/network/page error lines and a copy-paste fix prompt. The raw video, traces, screenshots, and full logs stay local under
.opsis/predeploy/. fillvalues must be synthetic (the guide enforces this) β fake emails liketest@example.com, never real user data.- The
opk_key is scoped to one project's launch-report API. It cannot read PostHog data, findings, or anything else in your dashboard.
Troubleshooting
| Symptom | Fix |
|---|---|
Invalid or missing MCP key | Re-copy the key from the project's Before Ship tab β keys can rotate when the server's encryption key changes. |
| Browser fails to launch | Run npx playwright install chromium on your machine. |
Flow fails immediately on goto | Your dev server isn't running, or the baseUrl is wrong β start the server and re-run. |
| Dashboard stage doesn't update | The report went to a different OPSIS_APP_URL or project β check the env values in your agent's MCP config against Settings. |