# flakiness-knowledge-graph-mcp [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/vola-trebla/flakiness-knowledge-graph-mcp  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/flakiness-knowledge-graph-mcp

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

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

## Documentation

## What flakiness-knowledge-graph-mcp MCP server does

The flakiness-knowledge-graph-mcp MCP server collects Playwright test results over time and makes that history available to AI agents. Its reporter writes run records to a local SQLite database, including the test identifier, title, suite, file, status, duration, browser, operating system, timestamp, error, retry information, and Git metadata when available.

This history supports questions that a single test report cannot answer. You can identify tests with high failure or flakiness rates, check whether a test behaves differently across browser and OS combinations, find slow tests, and inspect whether a test’s reliability is changing over time. The data remains local in the configured database file.

## How it works

Add the reporter to a Playwright configuration and provide a database path, such as `./flakiness.db`. Normal test execution then records each result automatically. The MCP process reads the database when a tool is called and reuses its in-process database handle.

The flakiness-knowledge-graph-mcp MCP server uses `sql.js`, a WebAssembly-based SQLite implementation, rather than a native SQLite dependency. Git transition analysis can use CI commit variables including `GITHUB_SHA`, `CI_COMMIT_SHA`, `CIRCLE_SHA1`, and `GIT_COMMIT`. When enough consecutive passing runs precede a failure, the commit correlation tool can report the transition along with branch and author data when those fields are present.

## Setup and configuration

Install the package globally with npm, or clone the repository and run its install and build commands. Configure the Playwright reporter with the database location:

```ts
reporter: [["flakiness-knowledge-graph-mcp/reporter", { dbPath: "./flakiness.db" }]]
```

Register the executable as an MCP server in Cursor or VS Code, or add it to Claude Code with the documented `claude mcp add` command. A separate seed command can create 30 days of sample data in a database for trying the tools without an existing Playwright project.

For parallel workers in one Node process, the reporter uses an in-process write queue. Separate CI processes or shards should write to separate database files; those files can later be merged with standard SQLite tools or a custom script. Sharing one SQLite file across independent machines or processes is not recommended because file-system locking may not make writes atomic.

## Tools and capabilities

The flakiness-knowledge-graph-mcp MCP server exposes eight tools:

- `get_flaky_tests` ranks tests by failed-plus-flaky runs divided by total runs, with filters for minimum runs, result count, and age.
- `get_test_history` returns a test’s run status, duration, error, retry, browser, and OS details.
- `get_failure_patterns` breaks failure rates down by browser and operating-system combination.
- `get_slow_tests` ranks tests by average duration.
- `get_error_groups` groups failures by exact error prefix to expose repeated problems.
- `get_flakiness_trend` reports daily flakiness rates for a selected test over a requested period.
- `cluster_semantic_error_trees` normalizes values such as UUIDs, IDs, and URLs before fuzzy-merging similar errors with Levenshtein matching.
- `correlate_git_commit_flakiness` searches for stable-to-flaky or flaky-to-stable transitions and associates them with commit, branch, and author data when available.

Every tool accepts a `db_path`; other arguments control limits, time ranges, thresholds, or the target test.

## Limitations and notes

The reporter is designed for Playwright results and the server depends on accumulated history in its SQLite database. It does not replace analysis of an individual trace. Its Git correlation depends on commit information being available in the CI environment and on having enough prior stable runs to detect a transition.

For local development or single-machine CI, the documented setup is considered safe. Multi-process or multi-machine writers should use separate databases and merge them afterward. The flakiness-knowledge-graph-mcp MCP server can complement a trace-decoding MCP server: one supplies historical reliability context, while the other examines details from a particular run.

_Full upstream README: https://allmcps.com/mcp/flakiness-knowledge-graph-mcp/readme_

