Skip to main content
MCP server CX Codex

Trunk Flaky Tests — Claude Code MCP server: diagnose failing tests

Connects Trunk Flaky Tests data to your AI agent: it pinpoints unstable tests, explains the failure and suggests a fix.

Install into Claude Code · Platform CLI: remote server All methods and platforms ↓
claude mcp add --transport http mcp-server https://mcp.trunk.io/mcp
Open on GitHub

What Trunk Flaky Tests does

The server exposes two tools to the agent. fix-flaky-test returns a breakdown of why a test failed plus suggested corrections, and setup-trunk-uploads builds a plan for sending test results to Trunk. Everything runs over the remote endpoint https://mcp.trunk.io/mcp, so there is no local process to start.

Authorization uses OAuth 2.0 with OpenID Connect. Your client will ask you to sign in to a Trunk account on connect. Skip that and the tools stay silent, so set up the account and make sure it can see the project whose tests you care about.

Setup differs per client. Claude takes a single command, Cursor and GitHub Copilot need a JSON settings entry, Gemini CLI has its own add command. Gemini Code Assist and Windsurf are absent from the supported list because their MCP handling is limited — expect the connection to fail there.

What it helps with

  • find out why a test passes on one run and fails on the next
  • get a concrete fix instead of rerunning the build until it goes green
  • set up test result uploads to Trunk from a generated plan
  • pull a test's failure history into the editor without opening a browser

Example prompts for the agent

  • Show me the root cause for checkout.spec.ts and suggest a fix
  • Why is login_test flaky? Give me the fix options
  • Generate a plan to upload test results to Trunk

How to install Trunk Flaky Tests

Platform CLI: remote server

claude mcp add --transport http mcp-server https://mcp.trunk.io/mcp

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Trunk Flaky Tests

How do I install Trunk Flaky Tests in Claude Code?

Run claude mcp add --transport http mcp-server https://mcp.trunk.io/mcp. The client will then prompt you to authenticate with your Trunk account.

What does Trunk Flaky Tests do?

It gives the agent access to flaky test analysis: the cause of a failure, suggested corrections, and a plan for uploading results to Trunk.

Which clients are supported?

Cursor, Claude, GitHub Copilot and Gemini CLI. Gemini Code Assist and Windsurf are not supported because their MCP support is limited.

Similar MCP servers

All MCP servers for Testing and QA →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor