Flakiness MCP Server

MCP server + Playwright reporter that builds a flakiness knowledge graph from test run history

Local serverstdioTypeScript

What is the Flakiness MCP server?

MCP server + Playwright reporter that builds a flakiness knowledge graph from test run history. That is what the flakiness mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

The short version

A Playwright custom reporter + MCP server that builds a local flakiness knowledge graph from your test run history. Ask your AI agent which tests are unreliable, on which browser, and whether they're getting worse.

The tools it exposes

The server publishes 8 tools. What each one is for:

  • get_flaky_tests — db_path, min_runs?, limit?, since_days?
  • get_test_history — db_path, test_id, limit?
  • get_failure_patterns — db_path, since_days?
  • get_slow_tests — db_path, limit?
  • get_error_groups — db_path, min_failures?, limit?, since_days?
  • get_flakiness_trend — db_path, test_id, days?
  • cluster_semantic_error_trees — db_path, min_instances?, since_days?
  • correlate_git_commit_flakiness — db_path, min_stable_runs?, since_days?

Getting it running

Installation goes through your MCP client rather than a global install: point it at flakiness-graph-seed on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

How it compares

Plenty of browser automation servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Flakiness's toolset — get_flaky_tests, get_test_history, get_failure_patterns and 5 more — is a fair guide to whether it matches your workflow. It is maintained by vola-trebla; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
get_flaky_testsdb_path, min_runs?, limit?, since_days?
get_test_historydb_path, test_id, limit?
get_failure_patternsdb_path, since_days?
get_slow_testsdb_path, limit?
get_error_groupsdb_path, min_failures?, limit?, since_days?
get_flakiness_trenddb_path, test_id, days?
cluster_semantic_error_treesdb_path, min_instances?, since_days?
correlate_git_commit_flakinessdb_path, min_stable_runs?, since_days?

How to install the Flakiness MCP server

{
  "mcpServers": {
    "flakiness-knowledge-graph": {
      "command": "npx",
      "args": ["-y", "flakiness-graph-seed"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Example prompts to try

  • Use Flakiness to get flaky tests.
  • Use Flakiness to get test history.
  • Use Flakiness to get failure patterns.

Frequently asked questions

It connects Flakiness to MCP-compatible AI assistants such as Claude and Cursor, exposing 8 tools (get_flaky_tests, get_test_history, get_failure_patterns, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Flakiness directly.