npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@testledger/mcp

v0.0.3

Published

MCP server for Test Ledger - analyze flaky tests with Claude Code

Downloads

256

Readme

Test Reporter MCP Server

MCP (Model Context Protocol) server for Test Ledger that enables Claude Code to analyze flaky tests, find failure patterns, suggest fixes and more.

Installation

No installation required! Just add the configuration to Claude Code.

Quick Start

1. Get your API key

Log into testledger.dev and go to Settings → API Keys to generate a key.

2. Configure Claude Code

Add this to your Claude Code MCP config:

Location: ~/.claude.json (global) or .mcp.json (project)

{
  "mcpServers": {
    "test-reporter": {
      "command": "npx",
      "args": ["-y", "@testledger/mcp"],
      "env": {
        "TEST_LEDGER_API_KEY": "your-api-key-here"
      }
    }
  }
}

3. Restart Claude Code

That's it! Claude Code now has access to your test results.

Usage

Once configured, you can ask Claude Code things like:

  • "Why is checkout.spec.js flaky?"
  • "What tests have been failing the most this week?"
  • "Show me recent test failures"
  • "Are there any tests that always fail together?"

With the /fix-flaky-test command

For the best experience, add the fix-flaky-test slash command to your project:

mkdir -p .claude/commands
curl -o .claude/commands/fix-flaky-test.md https://raw.githubusercontent.com/your-company/test-reporter-mcp/main/commands/fix-flaky-test.md

Then use it:

/fix-flaky-test

Test: LoginPage.should allow user to login with valid credentials
Error: element ("#submit-btn") still not clickable after 3000ms
  at login.spec.js:42:24

Available Tools

The MCP server provides these tools to Claude:

| Tool | Description | |------|-------------| | get_test_history | Pass/fail/flaky statistics for a test | | get_failure_patterns | Time-of-day, browser, and version patterns | | get_correlated_failures | Tests that fail together (shared setup issues) | | get_flaky_tests | Project-wide flaky test leaderboard | | get_recent_failures | Recent failures for quick triage | | get_test_trend | Failure rate over time |

Configuration Options

| Environment Variable | Required | Description | |--------------------------|-----|------------------------------------------------------------| | TEST_LEDGER_API_KEY | Yes | Your API key from the dashboard | | TEST_LEDGER_API_URL | No | Custom API URL (default: https://app-api.testledger.dev) | | TEST_LEDGER_PROJECT_ID | No | Default project ID to use for queries |

Example with all options

{
  "mcpServers": {
    "test-reporter": {
      "command": "npx",
      "args": ["-y", "@testledger/mcp"],
      "env": {
        "TEST_LEDGER_API_KEY": "tr_live_abc123",
        "TEST_LEDGER_PROJECT_ID": "42"
      }
    }
  }
}

Troubleshooting

"Tool not found" errors

  1. Restart Claude Code after updating config
  2. Check for JSON syntax errors in your config file
  3. Verify your API key is valid

"API error 401"

Your API key is invalid or expired. Generate a new one from the dashboard.

"API error 403"

Your API key doesn't have access to the requested project. Check project permissions.

Support