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 🙏

© 2026 – Pkg Stats / Ryan Hefner

abtestresult-mcp

v1.4.1

Published

MCP server for A/B test statistical analysis — significance testing, sample size calculation, Bayesian analysis, and more

Downloads

955

Readme

ABTestResult MCP Server

Statistical tools for A/B testing, available as a Model Context Protocol (MCP) server. Powered by abtestresult.com.

Give any AI assistant (Claude, Codex, Cursor, VS Code, etc.) the ability to analyze A/B tests, calculate sample sizes, run Bayesian analysis, and more. All calculations run locally on your machine — no API keys, your test data never leaves your device.

This package ships readable source. It is source-available for local personal use only and is not licensed for commercial use.

Setup

Add to your MCP configuration:

{
  "mcpServers": {
    "abtestresult": {
      "command": "npx",
      "args": ["-y", "abtestresult-mcp@latest"]
    }
  }
}

Where to add this:

  • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Codex: ~/.codex/config.toml
  • Claude Code: .mcp.json in your project root
  • Cursor: .cursor/mcp.json
  • VS Code: .vscode/settings.json (use mcp.servers instead of mcpServers)

That's it. No API keys, no authentication. The server starts automatically when your AI assistant needs it.

Keep the @latest tag. Without it, npx keeps reusing the first version it downloaded and never picks up new releases.

Tools

| Tool | Description | |------|-------------| | analyze_ab_test | Z-test for rate metrics (conversion rate, CTR, etc.) | | analyze_ab_test_average | Welch's T-test for continuous metrics (revenue, time on page, etc.); no equal-variance assumption | | calculate_sample_size | Required sample size for rate or average metrics | | calculate_mde | Minimum detectable effect given a fixed sample size | | bayesian_ab_test | Bayesian analysis with probability to be best & expected loss | | check_srm | Sample Ratio Mismatch detection | | paired_test | Paired T-test or Wilcoxon signed-rank for before/after data | | survey_sample_size | Cochran's formula with finite population correction |

Shareable result links

Every analysis tool (except paired_test) returns a view_url in its response — a deeplink to abtestresult.com that pre-fills the matching calculator with your inputs and auto-runs it. Open it to inspect the result visually (charts, confidence intervals, recommendations) or share it with your team. No data is stored server-side: the inputs are encoded directly into the URL.

Usage Examples

Once connected, just ask your AI assistant in natural language:

  • "My A/B test had 5,000 users per group. Control converted at 5%, variant at 6%. Is it significant?"
  • "How many users do I need to detect a 10% lift on a 3% conversion rate?"
  • "Run a Bayesian analysis on my test: control 10,000 users / 500 conversions, variant 10,000 users / 580 conversions"
  • "Check if my traffic split is valid: control has 10,234 users, variant has 9,766"
  • "What's the smallest effect I can detect with 50,000 total users and a 5% baseline?"

Protocol compatibility

Built on the official MCP TypeScript SDK v2. One stdio server handles both protocol eras, and the first message on each connection decides which one it uses:

  • MCP 2026-07-28 (stateless). No handshake. Every request carries _meta with the protocol version, client info and capabilities, and server/discover is supported. If a client opens with a version the server doesn't support, it gets error -32022 with the list of supported versions, so it can fall back.
  • MCP 2025-11-25 and earlier. The classic initialize / notifications/initialized handshake works exactly as before.

Full end-to-end check: npm run test:eras. It calls every tool over both eras and checks the results match. To compare against an older build too, add its path: npm run test:eras -- path/to/old/dist/index.js. Results, validation and input schemas are then checked against that build as well.

Quick manual check after npm run build:

# Legacy (2025-era)
printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"t","version":"1"}}}' '{"jsonrpc":"2.0","method":"notifications/initialized"}' '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' | node dist/index.js

# Modern (2026-07-28)
M='"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientInfo":{"name":"t","version":"1"},"io.modelcontextprotocol/clientCapabilities":{}}'
printf '%s\n' "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"server/discover\",\"params\":{$M}}" "{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/list\",\"params\":{$M}}" | node dist/index.js

Privacy

Your test data never leaves your machine — all calculations run locally. We collect anonymous usage telemetry (tool name and client type only) to monitor performance and guide development. No test inputs, results, or user identifiers are tracked.

Learn More

License

Copyright (c) 2026 ABTestResult. All rights reserved.

This package is source-available, not open source.

You may use and modify it only for your own local personal, non-commercial use. Any commercial use, business use, client use, hosted use, redistribution, or money-making activity requires a separate written license from ABTestResult: [email protected].

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.