Mida MCP

Tell your agent to run the test

Install the tag, build the variant, read the result. The jobs you would normally click through in a dashboard, handed to the agent you already code with.

Open in Claude Code
Open in Codex
the setup prompt
Set up Mida A/B testing in this project. Work through these in order, and stop to ask me whenever something is ambiguous.

1. Check I have a Mida account. If I do not, send me to https://app.mida.so/sign-up and wait for me to finish — creating the account is my job, not yours.

2. Connect the Mida MCP server so you can read and write my experiments directly. The endpoint is https://mcp.mida.so/mcp over streamable HTTP with browser authorization. In Claude Code: claude mcp add --transport http mida https://mcp.mida.so/mcp
   Once connected, call select_project before any other Mida tool, or every call returns 404. list_projects returns a project_key for each of my projects — that value IS the key the tag needs in step 3, so read it from there rather than asking me to copy it out of the dashboard.

3. Work out where this site actually lives before you change anything: a codebase you can edit, or a hosted platform I log into. Check the repo if there is one, and check the live page. Tell me what you found.

4. Get the tag from Mida rather than assembling it. Call the get_install_snippet MCP tool — it returns the finished tag with the region-correct host and my real project key already substituted, and you paste that exactly. This is the shape, not the value:
   <script type="text/javascript" async src="https://CDN_HOST/js/optimize.js?key=PROJECT_KEY"></script>
   CDN_HOST is cdn-eu.mida.so for an EU account and cdn.mida.so otherwise. The tag reads its API region from the host it was loaded from, so a hand-assembled tag with the wrong host installs cleanly and then silently finds no experiments. If that tool is not available, take the whole snippet from the install page in my dashboard, or ask me which region I am on.

5. Install it the way that suits where the site lives, and tell me which path you took and why:
   - A codebase: put the tag in <head>, as high as possible, and do not defer it — variants have to apply before first paint or the page will flicker. On server-rendered pages where you want zero flicker, use a server-side SDK instead — mida-node, mida-nextjs, mida-php, or mida-python. Docs: https://docs.mida.so/docs/server-side/sdks
   - A hosted platform that has its own MCP server: connect it and install through it, so I never have to paste code. Prefer the platform's remote MCP endpoint with browser authorization over a local setup with an API token — some platforms only allow their custom code endpoints for apps authorized that way, so a token setup can fail on the exact call you need. Register the tag as site-wide custom code in the head, apply it to the site, then publish if that platform needs a publish for custom code to go live. Ask me first if the site is live.
   - A hosted platform with no MCP server: do not try to click your way through the admin UI. Tell me exactly where the tag goes on that platform, give me the tag, and wait for me.

6. Verify it before you call this done. Load a page and confirm the script fetches, the project key is correct, and a pageview reaches Mida. If a tag manager, a consent gate, or a script optimizer such as WP Meteor is rewriting or deferring the tag, say so plainly — any of those will silently stop it working.

7. Do not create a test yet. Report what you installed, then ask me what I want to test first. When I tell you, build it from selectors you have read in my actual markup — never guess at something like "h1".

Opens the app if you have it installed. On Cursor, Windsurf, VS Code or Gemini CLI, copy the prompt instead.

An agent is only as good as the platform under it

Writing a variant is the easy part, and it is the part every AI tool now does. The hard part is what happens on the page and in the maths: a test that flickers, assigns variants in the browser, or cannot tell a winner from noise will hand your agent a confident answer that is wrong. That is the part we have spent years on.

~15KB

No flicker to design around

The tag is small and applies variants before first paint, so your agent is not writing anti-flicker hacks to hide a slow script.

Server-side

Variant assignment your agent cannot skew

Assignment and multi-armed bandit allocation happen on our side, not in client code an agent might rewrite. The split you configured is the split you get.

Bayesian

Numbers it can quote instead of invent

Mida returns the statistics, so the agent reports a result rather than computing significance in a scratchpad and rounding in your favour.

49 tools, not one chat box

Mida MCP exposes the dashboard as tools your agent calls directly. Reads are open to any connected client; anything that changes a live experiment is gated by your own role.

Get installed, correctly

The one thing an agent cannot work out for itself is which region your account lives in. It asks, instead of guessing a CDN host and installing a tag that silently reports nothing.

get_install_snippet list_projects get_project_configuration

Build tests as drafts, not surprises

Your agent creates the experiment, sets the goal, and hands back a preview URL for each arm. Nothing serves traffic until you say so.

create_experiment create_goal generate_preview_url

Read results without re-deriving them

Exposures, conversions, credible intervals and per-arm splits come back as data. An arm with no traffic reads as a bug rather than a loss.

get_experiment_result compute_experiment_statistics get_experiment_distribution

Know what you have already tried

Before it proposes the same headline test for the third time, it can check your history and how that pattern has performed on sites like yours.

get_my_testing_history get_testing_benchmarks find_similar_tests

Bring your own agent

One remote MCP server, authorized in your browser with your Mida account. No API keys to paste, no separate seat to buy.

Give your agent something to test

100,000 tested users a month on the free plan, and the MCP server is included. Connect it, point your agent at a page, and see what it comes back with.

No credit card. The agent does the setup.