Skip to main content
Glama
splithub-io

SplitHub

Official
by splithub-io

Declare experiments in splithub.config.ts, render variants with React, and read a plain verdict from the CLI, the MCP server or the dashboard. Your coding agent can do all of it for you.

npx splithub init

Why SplitHub

  • Config in your code. Experiments live in splithub.config.ts, reviewed in pull requests like everything else.

  • No flicker, no network on render. Who sees which variant is a local hash, decided before the first paint.

  • Made for agents. The CLI answers in JSON, and the MCP server gives Claude Code, Cursor and Codex the same tools you have.

  • A verdict, not a dashboard to decode. SplitHub Cloud says when a variant wins, and peeking early never fools it.

  • Your data, if you want it. Send events to your own database instead, and read the raw numbers per variant.

Related MCP server: RoadBoard

Three steps

1. Describe the test.

// splithub.config.ts
import { defineConfig } from '@splithub/core';

export default defineConfig({
  project: 'my-app',
  storage: { mode: 'cloud', key: 'pk_...' }, // or { mode: 'self', endpoint: '/api/splithub' }
  goals: { signup: { type: 'event' } },
  experiments: {
    'hero-title': {
      kind: 'value',
      status: 'running',
      variants: {
        control: { weight: 50, value: 'Ship faster' },
        direct: { weight: 50, value: 'Know which version wins' },
      },
      goal: 'signup',
    },
  },
});

2. Show the variant and count the goal.

import { SplitHubProvider, useValue, useTrack } from '@splithub/react';
import config from './splithub.config';

function Hero() {
  const title = useValue<string>('hero-title');
  const track = useTrack();
  return (
    <>
      <h1>{title}</h1>
      <button onClick={() => track('signup')}>Sign up</button>
    </>
  );
}

export const App = () => (
  <SplitHubProvider config={config}>
    <Hero />
  </SplitHubProvider>
);

3. Read the result.

npx splithub status              # every test with its verdict
npx splithub results hero-title  # lift, chance to beat control, confidence interval

Using Next.js? @splithub/next adds middleware and server components. No build step? One script tag from @splithub/browser runs redirect tests.

With your coding agent

claude mcp add splithub -- npx -y @splithub/mcp

Or let the CLI write .mcp.json for Claude Code and .cursor/mcp.json for Cursor:

npx splithub skills --mcp

Then ask in plain words: "test a shorter headline on the pricing page" or "is the new checkout winning?".

Packages

Package

npm

What it does

splithub

npm

The CLI. Create a test, start it, read a plain verdict.

@splithub/mcp

npm

The CLI as MCP tools for Claude Code, Cursor and Codex.

@splithub/core

npm

The config, who sees which variant, and the event queue. No dependencies.

@splithub/react

npm

<Experiment>, useVariant, useValue. No flicker, nothing fetched on render.

@splithub/next

npm

Middleware, server components and redirect tests for Next.js.

@splithub/browser

npm

One script tag for sites without a build step.

@splithub/node

npm

One handler for events and raw results on your own server.

@splithub/adapter-sqlite

npm

SQLite store, on the SQLite built into Node.

@splithub/adapter-d1

npm

Cloudflare D1 store.

Two complete apps live in examples/: Vite + React and Next.js.

Cloud or your own database

SplitHub Cloud

Self-hosted

Where events go

SplitHub Cloud

Your database: SQLite, D1, Postgres, MySQL

What you read

Verdict, lift, data quality, sample size

Visitors, conversions, rate and revenue per variant

Setup

npx splithub login

npx splithub init --mode self

Develop

pnpm install
pnpm build
pnpm test

Node 22.13 or newer, pnpm 10.

Contributing

Issues and pull requests are welcome. See CONTRIBUTING.md. Found a security problem? See SECURITY.md.

License

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP-first A/B testing server that enables agents to manage experiments (create, update traffic splits, read results, apply winning variants) from tools like Claude Code, with self-hosted Cloudflare backend.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server and Claude skills for AI agents to build landing pages, run A/B experiments, and track first-party conversions. Lets agents onboard clients, create and publish pages, manage variants, and pull performance reports via the UXON API.
    13
    MIT