Trunk Flaky Tests MCP: root causes for flaky tests in your IDE

Trunk Flaky Tests spots tests that pass and fail without a code change, works out the root cause and suggests a fix. Its MCP server brings that into Claude Code, Cursor, Claude and ChatGPT, so you can ask why a test is flaky while the code is open. ContextGate connects it and records every call in Activity.

  • Ready to connect
  • Free

Bring Trunk Flaky Tests into Claude Code or Cursor

  1. 1Click Connect Trunk Flaky Tests free and sign in with your Trunk account.
  2. 2Detection and root-cause tools only read. The list, all on, appears after you connect; if a tool changes a test's status in Trunk, switch it off when that decision belongs to a person.
  3. 3Add ContextGate to your AI app as a connector or MCP server. The steps for each app are on the Works with page.
  4. 4Ask your AI app which tests in your repo are flaky and what's causing the worst one, then open Activity to see the calls.

Flaky test work in your editor

  • List the tests Trunk has flagged as flaky.
  • Read a root cause analysis for one test while its code is open.
  • Get Trunk's suggested fix and let your AI app draft the change.

Keep test changes in view

  • Switch off any Trunk tool and your AI app won't see it; calls are refused.
  • A policy can block secrets, like CI tokens in a pasted log, from leaving in a call.
  • Activity records every call your coding agents make to Trunk.

What you get with Trunk Flaky Tests and ContextGate

  • Your AI apps can use Trunk Flaky TestsClaude, Cursor, ChatGPT and other AI apps reach Trunk Flaky Tests through the one ContextGate connection you add to them.
  • You choose which tools they can useSwitch off any Trunk Flaky Tests tool you don't want used. It's hidden from your AI apps and refused if called.
  • Every call is checked and recordedYour policies check each call (for example, personal data is hidden and secrets are blocked), and Activity keeps a record of it.

ContextGate sees only the tool calls that go through it, not your AI app's built-in tools or your chats.

Trunk Flaky Tests tools

Trunk Flaky Tests's own MCP server shows its tools once you sign in. When you connect it, they are listed and synced in your workspace.