mcp

v0.8.0
@splithub/mcp Checked 22 hours ago Published 11 days ago

SplitHub as MCP tools for Claude Code, Cursor and Codex: run A/B experiments on websites and apps, read verdicts, and read analytics, funnels, paths and…

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

splithub_status

Every experiment of this project with status, visitors, days, the verdict headline, sample (verdict.sample.quality: small | ok | good), stars (verdict.sample.stars, data quality 0..5) and daysToVerdict (days until a verdict at the current traffic: schedule the next check then, do not poll). verdict guardrail_breached = do not ship that variant. The __holdout row is the project holdout (long-term impact). properties[] (SplitHub Cloud) is each analytics property's last 7 days against the 7 before (visitors, change, goal conversions): mention a big move; splithub_analytics has the details. Start…

splithub_results

Results of one experiment. SplitHub Cloud gives the full verdict: sample per variant, lift, P(beat), SRM, winner; mvt adds factors[]. verdict.status guardrail_breached means do not ship: a variant made a guardrail metric worse (verdict.guardrailBreached[]); say what broke. verdict.metrics[] has secondary metrics and guardrails. The experiment __holdout is the project holdout (long-term impact of all experiments). Verdicts are sequential (always-valid, safe to check any time) and depend on sample size, not days. verdict.sample.quality is small (below the minimums), ok, or good (every variant ha…

ParameterTypeDescription
experiment *stringexperiment id (key)
bystringview: lift per segment of this dimension
engagementbooleanview: bounce rate, pages per visit, visit length per variant
eventsbooleanview: every goal and event per variant, with lift against the control
filtersobjectvisitor column → comma-separated values, e.g. { country: "DE,FR", channel: "Paid Search" }; "(none)" matches empty
fromstringfirst-exposure day, from (inclusive)
timelinebooleanview: visitors and conversions per day and variant
tostringfirst-exposure day, to (inclusive)

splithub_experiment_events

The latest raw events of one experiment (SplitHub Cloud, newest first): exposures (type exposure, the variant a visitor saw) and goals (type goal) with time, visitor, url, country. Same from / to / filters as splithub_results; type keeps one kind; nextBefore pages to older ones (pass it as before). Raw events stay 7 days (30 on Pro); the key needs events:read. Use to check that exposures and goals arrive after wiring code.

ParameterTypeDescription
experiment *stringexperiment id (key)
beforeintegernextBefore of the previous page (unix ms)
filtersobjectvisitor column → comma-separated values
fromstring
limitinteger
tostring
typestring

splithub_plan

Before creating an experiment: visitors per variant (and in all) to detect a relative lift `mde` on a `baseline` conversion rate, sized by SplitHub Cloud for its sequential verdict (no account needed; fails with UNREACHABLE offline). With an experiment id, also the days left at its current traffic when its numbers are readable. If it takes months, suggest a bigger change or a busier page.

ParameterTypeDescription
baseline *numberconversion rate today, e.g. 0.05
mde *numbersmallest relative lift worth finding, e.g. 0.1 for +10%
experimentstringexperiment id: adds days at its traffic
variantsintegernumber of variants including the control (default 2)

splithub_experiment_create

Add an experiment to splithub.config.ts (checked by reloading the file). It is written as running: it goes live when the code is deployed (and pushed in cloud mode). Tell the user that, and that splithub_experiment_status paused holds it. Pass status draft only when the user asks to hold it. kind: value (text/number/URL read with useValue), component (<Experiment>/<Variant> markup), redirect (match path + per-variant destination), mvt (factors instead of variants, every combination compared, read with useValue as { factor: value }). First variant / first level is the control. In an app (React…

ParameterTypeDescription
id *stringexperiment key, lowercase
kind *string
descriptionstring
endstringISO date the experiment ends
factorsobjectmvt only: factor → level → value, e.g. { headline: { old: "Old", new: "New" }, button: { blue: "#2563eb", green: "#16a34a" } }; first level = control; at most 4 factors × 4 levels
goalstringthe goal: any event name the app sends with track() (signup, Video Played) or a goal key from the config; an event not in goals becomes a goal, nothing to declare first
goodSampleintegertotal visitors at which verdict.sample.quality turns good (default 5000); informational, never changes the verdict
guardrailsarraygoals (event names or goal keys) that must not get worse; { goal, worse: "higher" } when a rise is bad (refunds, errors). A breach makes the verdict guardrail_breached: do not ship
layerobjectmutual exclusion: experiments in one layer never share a visitor; bucket ranges [start, end) must not overlap
matchstringredirect experiments: the path it runs on, e.g. /
maxVisitorsintegerstop counting after this many visitors
minDaysintegeropt-in fewest days before a verdict (default 0 = none); verdicts otherwise depend on sample size
namestringhuman name shown instead of the key; can be renamed later, the key stays
secondaryarraygoals (event names or goal keys) to watch next to the primary goal
startstringISO date the experiment starts
statusstring
toobjectredirect experiments: variant → destination path
trafficnumberpercent of visitors in the experiment (default 100)
valuesobjectvalue experiments: variant → value
variantsarrayvariant keys, first = control (not for mvt)
weightsarrayrelative weights, same order as variants (not for mvt)

splithub_create_experiment

Old name of splithub_experiment_create, kept for one release: call splithub_experiment_create instead.

ParameterTypeDescription
id *stringexperiment key, lowercase
kind *string
descriptionstring
endstringISO date the experiment ends
factorsobjectmvt only: factor → level → value, e.g. { headline: { old: "Old", new: "New" }, button: { blue: "#2563eb", green: "#16a34a" } }; first level = control; at most 4 factors × 4 levels
goalstringthe goal: any event name the app sends with track() (signup, Video Played) or a goal key from the config; an event not in goals becomes a goal, nothing to declare first
goodSampleintegertotal visitors at which verdict.sample.quality turns good (default 5000); informational, never changes the verdict
guardrailsarraygoals (event names or goal keys) that must not get worse; { goal, worse: "higher" } when a rise is bad (refunds, errors). A breach makes the verdict guardrail_breached: do not ship
layerobjectmutual exclusion: experiments in one layer never share a visitor; bucket ranges [start, end) must not overlap
matchstringredirect experiments: the path it runs on, e.g. /
maxVisitorsintegerstop counting after this many visitors
minDaysintegeropt-in fewest days before a verdict (default 0 = none); verdicts otherwise depend on sample size
namestringhuman name shown instead of the key; can be renamed later, the key stays
secondaryarraygoals (event names or goal keys) to watch next to the primary goal
startstringISO date the experiment starts
statusstring
toobjectredirect experiments: variant → destination path
trafficnumberpercent of visitors in the experiment (default 100)
valuesobjectvalue experiments: variant → value
variantsarrayvariant keys, first = control (not for mvt)
weightsarrayrelative weights, same order as variants (not for mvt)

splithub_experiment_status

Start, pause or finish an experiment. The config file is updated (and checked); in cloud mode it applies live within a minute. After finishing, the variants are still in the code: ask the user which variant to keep, then call splithub_ship.

ParameterTypeDescription
experiment *string
status *string

splithub_set_status

Old name of splithub_experiment_status, kept for one release: call splithub_experiment_status instead.

ParameterTypeDescription
experiment *string
status *string

splithub_analytics

Analytics properties (pageviews or app screens, and custom events, no variants). A property is kind site or app; in an app a screen is a page (url /ScreenName) and platform / app_version are dimensions for by and filters. Without property: every property with visitors, visits, pageviews and bounce for the last 30 days. With property: totals (visitors, newVisitors, sessions = visits, pageviews, events, bounces, duration in ms; bounce rate = bounces / sessions), goals (conversions = unique visitors who reached it in the range, completions = how many times, revenue), topPages and topSources (valu…

ParameterTypeDescription
bystring
comparealso read another period: 'previous' (right before), 'year' (a year earlier) or 'YYYY-MM-DD..YYYY-MM-DD'
daysinteger
experimentstringby variant: the experiment key
filtersobjectdimension → comma-separated values
fromstring
goalstringwith by: also count this goal per row
keystringby trait: the trait name, e.g. plan
limitinteger
propertystringproperty id; omit to list every property
segmentstringsaved segment name or id
tostring

splithub_analytics_funnel

Funnel of an analytics property (SplitHub Cloud): visitors who reached each step in order. Steps: page:/path (patterns like page:/blog/* work), event:<name>, goal:<key>; 2 to 8. Or funnel: a saved funnel's name or id (splithub_analytics_funnels), which brings its steps and within. within: visit (same visit, default), 7d or 30d (from the first step). Answers steps[] with visitors, conversion (share of the first step) and dropoff (share lost since the step before); by splits it by a visit dimension. rolledUp: days older than 90 count nothing. Counts, not an experiment: never call a winner from i…

ParameterTypeDescription
property *string
bystring
daysinteger
filtersobjectdimension → comma-separated values
fromstring
funnelstringa saved funnel name or id
segmentstringsaved segment name or id
stepsarraye.g. ["page:/", "event:Signup", "goal:paid"]; omit with funnel
tostring
withinstring

splithub_analytics_funnels

Saved funnels of an analytics property (SplitHub Cloud), shown on its Funnels tab for the whole team. Without save or delete: the list (id, name, steps, within). save + steps: save one under that name (a name already saved updates it; steps and within as in splithub_analytics_funnel). delete: remove one by id or name. Run one with splithub_analytics_funnel { funnel }.

ParameterTypeDescription
property *string
deletestringid or name to delete
savestringname of the funnel to save or update
stepsarraye.g. ["page:/", "event:Signup", "goal:paid"]
withinstring

splithub_analytics_paths

Where visits went right after a page (or, with direction prev, where they came from), within the visit (SplitHub Cloud). rows[] { value, visits }; (exit) = left the site, (entrance) = landed on the page.

ParameterTypeDescription
page *stringa path like /pricing or /blog/*
property *string
daysinteger
directionstring
filtersobjectdimension → comma-separated values
fromstring
segmentstringsaved segment name or id
tostring

splithub_analytics_retention

Retention cohorts of an analytics property (SplitHub Cloud), the key report for apps: users grouped by the day or week they started (start: visit, event:<name> or goal:<key>), and how many came back (return: visit or event:<name>) in period 0, 1, 2… cohorts[] { start, users, retained[] }; retained[0] is the cohort period itself, retained[i] / users is the share. Ranges longer than 90 days / 26 weeks are cut (clamped: true). Default: start visit, return visit, period week. filters take platform (ios, android, web…) and app_version too. Counts, not an experiment.

ParameterTypeDescription
property *string
daysinteger
filtersobjectdimension → comma-separated values
fromstring
periodstring
returnstringvisit | event:<name>
segmentstringsaved segment name or id
startstringvisit | event:<name> | goal:<key>
tostring

splithub_analytics_realtime

Who is on an analytics property right now (SplitHub Cloud): activeVisitors5m, pageviews and events per minute over the last 30 minutes, top pages and sources. Use to confirm tracking works after a deploy.

ParameterTypeDescription
property *string

splithub_segments

Saved segments: named report filters every report can apply (segment on splithub_analytics, funnel, paths, retention). Without arguments: the list. save + filters: save one (filters like { country: "DE,FR", channel: "Paid Search" }; property limits it to one property). delete: remove one by id or name. SplitHub Cloud.

ParameterTypeDescription
deletestringid or name to delete
filtersobjectdimension → comma-separated values
propertystring
savestringname of the segment to save

splithub_notes

Notes: what happened on a day (a launch, an outage, a campaign), shown on experiment timelines and analytics charts (SplitHub Cloud). action list (default): newest first; experiment or property narrows it (project-wide notes come too), kind filters, days / from / to set the range. add: text (day defaults to today in the project time zone; kind note | issue | win; experiment or property ties it to one, none = the whole project). edit: id + text / kind / day. delete: id. Add one when you ship something that may move the numbers.

ParameterTypeDescription
actionstring
daystring
daysinteger
experimentstringexperiment key
fromstring
idstringnote id (edit, delete)
kindstring
propertystringanalytics property id
textstring
tostring

splithub_alerts

Alert rules (SplitHub Cloud; they fire on Pro, a rule added on another plan is saved switched off). action list (default): rules with condition, params (params.progress { total, fired, month? } on usage and event_count is read-only), enabled; channels; history (recent alerts). add: condition + params. Experiment conditions (experiment = one key, omit for every running one): srm (broken split), winner (minVisitors?), loser (lift %, minVisitors?), exposures (visitors), conversions (conversions), duration (days), no_events (hours). Account: quota (percent of the monthly allowance), usage (every:…

ParameterTypeDescription
actionstring
conditionstring
conversionsinteger
cooldownHoursnumber
countinteger
daysinteger
dropLoserboolean
enabledbooleanadd: false saves it switched off
eventstring
everyinteger
experimentstring
finishboolean
goalstring
hoursnumber
liftnumber
minVisitorsinteger
namestring
pauseboolean
percentnumber
propertystring
repeatboolean
rulestringrule id, id prefix or name (enable, disable, delete, test)
visitorsinteger

splithub_analytics_connect

Set up analytics in this app: use a property (id), create one (name, or nothing when the project has none), then name it on the one <SplitHubProvider> / <SplitHubNextProvider> in the code (property="sh-…"). Answers property, created, wired { status: added | already | other | none | many, file, line }, snippets { provider, script (sh.js tag with data-property), track, identify } and next. status none or many: add the provider snippet yourself (or the sh.js tag on a site without React). other: the provider names another property; ask before calling again with force. Pageviews are sent for you;…

ParameterTypeDescription
forcebooleanreplace another property already named on the provider
namestringcreate a new property with this name
propertystringproperty id to use (added to the config when new)

splithub_analytics_events

The latest raw pageviews and custom events of an analytics property (cloud: the raw tail, 7 days free / 30 Pro; self-hosted: the user's database). Use to check that tracking works after wiring track() or sh.js.

ParameterTypeDescription
property *string
limitinteger

splithub_property_create

Add an analytics property to splithub.config.ts, checked by reloading the file. Its id is generated (sh-x1h78w) unless given; it comes back as property. Events go only to a property named explicitly: wire <SplitHubProvider config={config} property="<id>"> (pageviews on load and every route change, and every track() call) or data-property="<id>" on the sh.js script tag. Every goal of the project counts as a conversion unless goals narrows them. In cloud mode it is created in the cloud at once (live: applied), so no push is needed: tell the user to deploy. If live names a missing API key, log in…

ParameterTypeDescription
descriptionstring
goalsarray
idstringomit to get a generated id
kindstringapp: a mobile or desktop app (screens, versions, retention); default: app in an app project, else site
namestring
statusstring

splithub_create_property

Old name of splithub_property_create, kept for one release: call splithub_property_create instead.

ParameterTypeDescription
descriptionstring
goalsarray
idstringomit to get a generated id
kindstringapp: a mobile or desktop app (screens, versions, retention); default: app in an app project, else site
namestring
statusstring

splithub_property_status

Pause or resume an analytics property (paused: its pageviews and events are dropped and not billed). Updates splithub.config.ts; in cloud mode it applies live within a minute. archived (SplitHub Cloud) stops collecting and hides it like the dashboard Archive, numbers kept; restored brings it back paused. removed takes it out of the config (a dashboard-made property is deleted in the cloud with its numbers).

ParameterTypeDescription
property *string
status *string

splithub_set_property_status

Old name of splithub_property_status, kept for one release: call splithub_property_status instead.

ParameterTypeDescription
property *string
status *string

splithub_domains

Allowed domains, per experiment and per analytics property (SplitHub Cloud). Without arguments: every allowed domain with where it applies, which experiments / properties accept any origin, and the origins seen sending events. With kind + id + hosts: replace that experiment's or property's list (subdomains included; an empty list accepts any origin again). Events from an origin outside the list are dropped (403 when nothing in the batch is allowed).

ParameterTypeDescription
hostsarraye.g. ["example.com"]; [] clears the list
idstring
kindstringexperiment or property (test is an old name for experiment)

splithub_refs

Files and lines that use an experiment id or its goal. Use after wiring code (is it referenced?) and after splithub_ship (count should be 0 for the experiment).

ParameterTypeDescription
experiment *string

splithub_ship

Keep one variant and take the experiment out: archives it in the cloud (numbers stay readable), removes it from splithub.config.ts and rewrites the code (<Experiment> → the kept <Variant>, useValue → the kept literal, useVariant branches folded, unused imports dropped). Ask the user which variant to keep first (recommend verdict.winner; never a variant listed in verdict.guardrailBreached). Call with dryRun: true, show the diff, then without. Fix leftovers[] by hand, then follow next[] (push, doctor, tests).

ParameterTypeDescription
experiment *string
keep *stringvariant key to keep
dryRunbooleanonly return the diff

splithub_remove

Remove an experiment from splithub.config.ts (and archive it in the cloud when connected) without touching the code. Prefer splithub_ship, which also cleans the code. Returns refs still in the code.

ParameterTypeDescription
experiment *string

splithub_review

AI reviews of an experiment stored in SplitHub Cloud (Pro): written at the start, when the verdict changes while it runs, when it finishes, or on demand in the dashboard. Newest first. Quote them as an opinion; the verdict stays the source of truth.

ParameterTypeDescription
experimentstringexperiment id; omit for every experiment of the project

splithub_push

Upload splithub.config.ts to SplitHub Cloud (cloud mode). Also returns kept: experiments the cloud has from an earlier push that this file lacks, left as they are. prune removes those: only when the user asked for it. Returns experiments created in the dashboard that were written into the file. dryRun: only check the config and show what would change. A key that already belonged to another experiment fails with KEY_CONFLICT: ask the user, then push with replace (new experiment, old numbers cleared) or same (same experiment, numbers stay).

ParameterTypeDescription
dryRunboolean
prunebooleanalso remove experiments the cloud has that the file lacks (ask the user first)
replacearraykeys that are new experiments: the old numbers under them are cleared
samearraykeys that are the same experiment as before: the numbers stay

splithub_pull

Fetch the cloud config and write dashboard-created experiments into splithub.config.ts.

splithub_doctor

Check the installation: config, provider, middleware, routes, code references, endpoint; in a React Native / Expo app also the package, its storage module and redirect experiments; in a native iOS / Android project the SDK in the build files. Run after wiring code; ok: false lists what to fix.

splithub_whoami

Which cloud project this folder is connected to, and its public key.

splithub_projects

Every folder on this machine connected to a SplitHub Cloud project, the current one marked (current).

splithub_login

Connect this folder to SplitHub Cloud. Returns a sign-in link and a code: show them to the user, who approves in the browser (and can create a project there). The CLI then stores a project API key for this folder. Call splithub_whoami afterwards.

splithub_init

Set up SplitHub in this project: config file, framework files, agent skills; React Native / Expo apps also get @splithub/react-native and their entry (App.tsx, app/_layout.tsx) wrapped in <SplitHubProvider> with screen tracking (app.entry.status added | already | manual: wire nextStep by hand); native iOS / Android get install lines and a quick start (app.install, app.quickStart) and no config file; in cloud mode see splithub_login to connect. Use once per project. githubAction: also write a GitHub workflow (checks on PRs, results comment on a schedule).

ParameterTypeDescription
githubActionboolean
keystringpublic key pk_… when known
modestring