Trunk Flaky Tests includes a Model Context Protocol (MCP) server. AI applications like Claude Code or Cursor can use MCP servers to connect to data sources, tools, and workflows, enabling them to access key information and perform tasks.Documentation Index
Fetch the complete documentation index at: https://trunk-4cab4936-sam-gutentag-flaky-tests-new-monitors.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Supported AI applications
The following applications are currently supported: Cursor, Claude Code, Gemini CLI, and GitHub Copilot.Gemini Code Assist and Windsurf are not supported due to their limited support for MCP servers
API
The Trunk MCP server is available athttps://mcp.trunk.io/mcp and exposes the following tools:
| Tool | Capability |
|---|---|
search-test | Experimental: Lookup the id of a test case |
fix-flaky-test | Experimental: Retrieve insights around a failing/flaky test |
investigate-ci-failure | Experimental: Retrieve failing test logs from a CI run |
setup-trunk-uploads | Create a setup plan to upload test results |
Authorization
The Trunk MCP server supports two authentication methods. OAuth (default) OAuth 2.0 + OpenID Connect is the default. MCP clients that support the MCP authorization spec will initiate the OAuth flow automatically. Most interactive clients (Cursor, Claude Code, GitHub Copilot) use this path. API token As an alternative, you can authenticate with your Trunk organization API token. This is useful for MCP clients that do not support OAuth, CI/headless environments, or quick manual setup. Find your token under Settings > API in the Trunk dashboard. Pass it as a Bearer token in theAuthorization header: