Skip to main content
Glama

splera-mcp

A/B testing for vibe coders, exposed as a Model Context Protocol (MCP) server. Your AI agent creates experiments, reads results, and ships winners without you leaving chat.

Three native tools your agent gets once installed: create_experiment, get_results, ship_winner. The agent calls them, edits your code to wire the SDK and variant, and reports stats back in plain English. No dashboard tab, no copy-paste, no test infrastructure to learn.


What you can do

Once installed, paste any of these into your agent:

Create a Splera A/B test for my homepage headline: 'Ship faster.' vs 'Ship with confidence.'

How's my checkout experiment doing?

Ship the winning variant.

The agent picks the right tool, makes the call, and either edits your code to install the SDK, reports Bayesian stats in human terms, or flips the winning variant server-side (takes effect in ~30 seconds worldwide, no redeploy).


Related MCP server: Mimiq MCP

Install

1. Generate an API key

Go to splera.ai/mcp/setup (one-click key + pre-filled install command + live connection check), or manage keys at splera.ai/settings. Keys start with splera_live_ and are shown only once. If you close the page without copying, revoke and create a new one.

2. Add the config to your agent

Agent

Config file

Method

Claude Code

~/.claude.json (user scope)

One-liner (below)

Cursor

~/.cursor/mcp.json

Edit JSON (or Settings → MCP)

Windsurf

~/.codeium/windsurf/mcp_config.json

Edit JSON

Zed

~/.config/zed/settings.json (context_servers block)

Edit JSON

Replit Agent

Not supported in v1 (cloud-hosted, can't load local stdio MCP)

—

Claude Code

claude mcp add -s user splera -e SPLERA_API_KEY=splera_live_your_key_here -- npx -y splera-mcp@latest

Run claude mcp list to verify (splera should show ✓ Connected), then start or restart Claude Code.

Cursor / Windsurf

Same JSON shape for both, just different file paths.

{
  "mcpServers": {
    "splera": {
      "command": "npx",
      "args": ["-y", "splera-mcp@latest"],
      "env": {
        "SPLERA_API_KEY": "splera_live_your_key_here"
      }
    }
  }
}

Restart the agent.

Zed

Add to ~/.config/zed/settings.json:

{
  "context_servers": {
    "splera": {
      "source": "custom",
      "command": "npx",
      "args": ["-y", "splera-mcp@latest"],
      "env": {
        "SPLERA_API_KEY": "splera_live_your_key_here"
      }
    }
  }
}

Restart Zed.


Verify your install

Option A: Claude Code one-liner

claude mcp list

splera should show ✓ Connected (and splera.ai/mcp/setup will flip to Connected ✓ within a few seconds).

Option B: check the key from any terminal

curl -H "Authorization: Bearer splera_live_your_key_here" https://splera.app/api/me

200 OK with a JSON body means the key works. 401 means the key is bad or revoked — generate a fresh one at splera.ai/mcp/setup.

Option C: check the agent's MCP panel after restart

Open your agent's Server logs or MCP panel. You should see:

splera-mcp: connecting to https://splera.app
splera-mcp: ready. 3 tools loaded. User: you@example.com

If those lines are missing, the MCP isn't loading. Check your config file path and JSON syntax.


Troubleshooting

"splera is not available" / "tool not found"

The MCP config isn't being read. Check that (1) you edited the right file for your agent (see install table above), (2) the JSON is valid, no trailing commas, (3) you restarted the agent after editing.

SPLERA_API_KEY not set / SPLERA_API_KEY_MISSING on every call

The server starts without a key (so your agent still lists the tools), but every call fails until the key is set. The env block in your MCP config is missing or malformed. The key must start with splera_live_. Re-check the examples above.

401 / SPLERA_INVALID_API_KEY on every call

The key is wrong, revoked, or truncated during copy. Go to splera.ai/settings, revoke the existing key, generate a new one, update the config, restart the agent.

SPLERA_PLAN_LIMIT_EXCEEDED on create_experiment

You've hit your plan's monthly experiment cap. Options: upgrade or ship / stop an existing experiment to free a slot. The error hint field tells you which plan and how many slots are used.

get_results says NOT_READY forever

The SDK isn't reaching the page being tested. Verify the script tag is in place:

<script src="https://splera.app/sdk/splera.js"
        data-experiment="YOUR-EXPERIMENT-UUID"
        data-api-url="https://splera.app"></script>

data-api-url is required: without it the SDK tracks nothing. If your experiment was created with splera-mcp 0.1.1, its install code was missing this attribute and used a callback form of getVariant that never runs. Re-copy the snippet from the experiment page on the dashboard.

Also confirm the page is receiving real traffic. The dashboard shows live exposure counts at splera.ai/experiments/:id.

Agent doesn't use the Splera tool even when I ask

Most agents need explicit mentions of the tool until it's familiar. Try prompts like "use the splera MCP to create an experiment" instead of generic "set up an A/B test". Once the agent calls it once, it remembers.


Tool reference

create_experiment

Create a new A/B test. Returns the experiment ID, variant IDs, and an SDK install snippet the agent can paste into your codebase.

Required: name (3-80 chars), hypothesis (10-500 chars), variants (2-5 items, control first), metrics (1-5 items, each with name + event_name).

Optional: decision_mode (quick_decision / rigorous / bandit, default quick_decision), platform (replit / lovable / bolt / claude_design / other, default other).

Example prompt:

Create a Splera experiment on my pricing page — test "Start free" vs "Get started" on the primary CTA. Primary metric is signup_completed.

get_results

Fetch current results for an experiment. Returns variant stats, Bayesian leader probability, ship-readiness verdict, and (post-ship) guard-window status. Safe to call once per minute during active experiments. For long-horizon monitoring, use the dashboard.

Required: experiment_id (UUID from create_experiment).

The response includes a next_check_recommended_at timestamp so the agent knows when it's worth checking again, instead of spamming the endpoint.

Example prompt:

How's my hero CTA experiment doing? Ready to ship?

ship_winner

Ship the winning variant to 100% of traffic. The SDK flips server-side within 30 seconds worldwide. No redeploy, no code change on your end. After shipping, a guard window monitors the live rate against a frozen pre-ship baseline and emails you if performance degrades.

Required: experiment_id, winning_variant_id (the slug-style ID like variant_b or control, not the variant's display name — use leading_variant_id from get_results).

Example prompt:

Ship variant_b on experiment 7f3e9a2b.


Privacy

  • splera-mcp makes HTTPS calls to splera.app only. No local telemetry, no third-party analytics from this package.

  • Your API key stays on your machine in your agent's MCP config. It's never logged server-side.

  • Keys are stored as sha256 hashes in our database. Even if our DB were compromised, the raw keys are not recoverable.

  • Revoke any key instantly at splera.ai/settings. Revocation takes effect within 60 seconds.


Built by Splera. A/B testing for vibe coders.

Available Tools

3 tools
create_experimentA

Create a new A/B test. Returns the experiment ID, variant IDs, and SDK installation instructions. The installation snippet in the text block is what the agent should paste into the user's codebase. Variant IDs are server-assigned slugs (control, variant_b, variant_c, ...) — use those (not the variant names) when calling ship_winner later.

Inputs: name (required), metrics (required), variants (required), hypothesis (required), +2 more.

get_resultsA

Get current results for an experiment — variant stats, leader, ship-readiness, and any guard-window alerts. Use this to check if an experiment is ready to ship. Safe to call once per minute during active experiments. For long-horizon monitoring, direct the user to https://splera.ai/experiments/:id.

Inputs: experiment_id (required).

ship_winnerA

Ship the winning variant to 100% of traffic. The SDK will flip server-side within 30 seconds — no code deploy needed. Use after get_results confirms the experiment is ship-ready.

Inputs: experiment_id (required), winning_variant_id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool maps to a distinct phase of the experiment lifecycle: create_experiment, get_results, and ship_winner. There is no overlap in purpose, and the descriptions explicitly state sequencing (use get_results before ship_winner), which eliminates misselection risk.

    Naming Consistency5/5

    All three tools follow the same verb_noun snake_case pattern (get_results, create_experiment, ship_winner). Verb choice is precise and consistent with the read/create/act semantics of each operation.

    Tool Count4/5

    Three tools is on the thin side, but each earns its place in a tight create-monitor-ship loop with no redundant surface. It is slightly under-scoped rather than bloated, which is a reasonable tradeoff for a focused A/B testing server.

    Completeness3/5

    The core create → check results → ship winner path is covered, but there is no way to list existing experiments, stop/pause a harmful experiment, or delete/archive one. Agents will hit dead ends when a test needs to be aborted or when they need to discover an experiment ID they don't already have.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Bringing the debugging we know and love as human programmers to our AI agents – debug any supported language with breakpoints, variable/state inspection, and stepping, to supercharge agents' capabilities to reason about runtime code.
      73 PyPI
      22
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables any AI agent framework to plug into a self-improvement loop where recall and record calls turn existing feedback like tests, CI, review bots and user corrections into learned skills and persistent memory. Changes are governed end-to-end with changesets, canary rollout on live traffic, holdout lift measurement, versioning and rollback.
      7
      MIT