LiveVariant

io.github.livevariant由 GitHub 账号 livevariant 发布v0.1.5更新于 Oct 24, 2026

Build, inspect and read adaptive A/B tests. Config travels in the URL; no account or API key needed.

已验证Streamable HTTP可网页运行数据与分析商业与电商

概览

AI 生成的概览

LiveVariant 让助手创建、检查并读取自适应 A/B 测试,配置随 URL 传递,托管服务无需账号。

可以做什么
创建单变体或多槽位测试,返回运行所需 URL 和新生成的统计密钥,并给出撰写变体需遵守的约束(build_test、variant_brief)。解码并检查已有测试的槽位、变体、上下文及投放前才暴露的问题(inspect_test)。把你对变体表现的估计转换为模型先验,避免测试从零摸索(generate_priors)。获取结果,包括各组合最优的概率和现在停止的预期代价(get_stats)。查看测试是否被账号认领、跳转目标是否为已验证域名,并列出已登录账号的测试(get_test_status、list_tests)。
适用场景
适合让助手起草、检查或解读邮件与网页营销的 A/B 测试,尤其是同时比较多个元素或判断是否应停止测试时。托管端点无需配置即可使用;自托管适合运行自有部署的团队。
运行要求
使用托管远程端点,或通过 npx 以 Node.js 在本地运行 npm 包。托管服务无需账号或 API 密钥。自托管部署需设置 LIVEVARIANT_SERVER_URL,若接口受限还需设置 LIVEVARIANT_API_TOKEN 和 LIVEVARIANT_ASSET_UPLOAD_TOKEN。
安装前请注意
会创建和注册测试并上传图片,即在部署上写入数据。build_test 返回新生成的统计密钥,register_test 需要统计密钥和可发布密钥,应视为凭据。上传的资源仅通过短期签名提供。指向自托管 URL 时请求会发送到该地址。

安装

在 SourceWeft 中

  1. 打开 控制台中的 LiveVariant,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.livevariant%2Flivevariant/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "livevariant": {
      "type": "http",
      "url": "https://livevariant.com/mcp"
    }
  }
}

README

@livevariant/mcp

MCP server for LiveVariant: build, inspect and read adaptive A/B tests from Claude, ChatGPT, Copilot or any MCP client.

bash
npx -y @livevariant/mcp

Set runtime environment variables before starting the MCP server when you point it at a self-hosted deployment:

  • LIVEVARIANT_SERVER_URL: the deployment origin to call.
  • LIVEVARIANT_API_TOKEN: the deployment's LV_API_TOKEN, when /mcp or /api/v1/* is gated.
  • LIVEVARIANT_ASSET_UPLOAD_TOKEN: the deployment's LV_ASSET_UPLOAD_TOKEN, when /assets is gated.

The hosted endpoint at https://livevariant.com/mcp offers the same tools with nothing installed.

Part of livevariant/livevariant; the repository README covers the whole system. AGPL-3.0.

来源:packages/mcp/README.md,提交 b30beb4

工具

9

build_test

Build a test

Creates a LiveVariant test and returns every URL needed to run it, plus a freshly generated stats secret. Pass `variants` to test one element, or `slots` to test several at once (hero image AND call-to-action, say). With slots the test optimizes the COMBINATION: one model learns how the elements interact, which two separate tests structurally cannot see. There is no algorithm to pick either way; every test runs the same joint model, sized from its shape. By default, nothing is registered anywhere: the config IS the test, encoded into the URLs, and the test's identity is a hash of it. Pass `publishableKey` on an account-enabled deployment to also register the new test to that key's organization, so it appears under My tests; the config and URLs are still the test, and registration failure is returned as a warning rather than failing the build. Editing a variant later produces a DIFFERENT test with its own empty history, which is usually what you want per campaign but is worth saying out loud to whoever you are building this for. The stats secret is returned once and never again. Only its hash goes into the config, so nobody, including this service, can recover it. Give it to the person who will read the results.

输入参数nameslotsregioncontextvariantsredirectUrlvariantParamslotRedirectspublishableKey

inspect_test

Inspect a test

Decodes a test and describes it: slots, variants, context, and whether it can be served by redirect. Also lints it for the mistakes that only show up once a campaign is out, such as an email test whose context comes from geo (which a mail proxy answers about itself). Use this before sending anything, and to answer 'what is this link?'.

输入参数testconfig

generate_priors

Add warm-start priors

Takes YOUR estimate of how each variant will perform and converts it into the prior the model starts from, so a test does not spend its first visitors rediscovering what you already suspect. You supply the guess; this does the arithmetic and the capping. That capping is the point: a prior is expressed as pseudo-observations, and it is deliberately held weak enough that real data overrides it quickly. The response says exactly how many real visitors per variant it takes to wash your guess out, so you can judge whether you have been too confident. Being wrong here costs a little early traffic, not the test. Priors are outside the identity hash, so the test keeps its id, its URLs and any history it already has. Pass `when` to make the belief hold for ONE segment only ("image B is the one for the blue segment"). Without it the belief is about every visitor, which is a different and much stronger claim.

输入参数testwhenconfigbeliefs必填confidence

get_stats

Read a test's results

Fetches a test's results and works out what they mean. Alongside the raw counts it returns the probability that each combination is genuinely best and the expected cost of stopping now and keeping the leader. Use those rather than comparing conversion rates by eye: a variant ahead 2/10 to 1/10 looks twice as good and is very close to a coin flip, and that mistake is the single most common way an A/B test gets called wrong. Multi-slot tests also report per-slot marginals: how each variant did across every combination it appeared in. Needs the stats secret. If you have the manage URL, its #fragment IS the secret and it will be used automatically.

输入参数testconfigstatsSecret

get_test_status

Check a test's account and domain status

Reports what the deployment's registry knows about a test: whether it is claimed into an account (and by which organization), and whether each redirect destination is a verified domain. Unverified destinations work, but visitors see a 'Redirecting you to…' continue screen first. When you see verified: false, tell the user to verify the domain under Settings on the dashboard; the three ways are a DNS TXT record, serving the well-known file, or having the SDK tag with their publishable key live in the site's source. If the test is unclaimed, remind them the manage URL claims it in one click when opened signed in. Requires the test's stats secret, the same as get_stats. A manage URL's #fragment is used automatically.

输入参数testconfigstatsSecret

list_tests

List my tests

Lists tests registered to the signed-in account, newest first, with cursor pagination and an optional case-insensitive name filter. Only exists on deployments with accounts, and only answers for an identified caller: unlike every other tool, WHOSE tests these are cannot be expressed as an argument. Each entry carries the encoded config, which inspect_test and get_stats accept directly.

输入参数qlimitcursor

register_test

Register a test to an account

Registers a test you built earlier to the organization a publishable key belongs to, so it shows under My tests and its stats are readable from the dashboard without the secret. Use this only when the user provides both the test's stats secret and a publishable key for an organization they administer. The stats secret must match the hash inside the config, and the publishable key identifies the organization to register into. Prefer passing publishableKey to build_test directly: it registers at creation in one step. Keyless tests cannot be registered this way (nothing to prove with); they register through the tag on a verified domain. The organization can remove a listing from its dashboard (the test itself keeps serving).

输入参数config必填statsSecret必填publishableKey必填

upload_image

Upload an image

Uploads an image to the deployment's asset store and returns its URL, for use as a variant's `image` (email tests) or `url`. The returned URL is deliberately not fetchable on its own: assets are only served with a short-lived signature that the serve endpoints mint per request, so uploading here does not create free static hosting. Use `previewUrl` (valid for an hour) to check what was stored. Storage is content-addressed: the id is the sha256 of the bytes, so uploading the same image twice is harmless and returns the same URL. Raster images only; SVG is refused because it can carry scripts. Not every deployment enables asset hosting, and this tool says so plainly when yours does not.

输入参数data必填contentType必填

variant_brief

Brief for writing variants

Returns the constraints to write or generate test variants against, for email or web, plus the rules that decide whether a test can be read at all once it runs. The one that matters most: one idea per slot. To vary two elements, give the test two slots and let it learn the combination, rather than bundling both changes into one variant and never learning which half worked. Ask for this before drafting variants, then produce them yourself against what it returns.

输入参数goal必填countformat必填channel必填audience

版本历史

1
  1. v0.1.5最新Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分