Skip to main content

Mida MCP Integration

Mida MCP lets AI assistants work with your Mida projects through the Model Context Protocol. After connecting it, you can ask an MCP-capable client to list experiments, create draft tests, inspect results, create goals, and record custom events.

Unlike API-key based integrations, Mida MCP uses remote OAuth through the Mida dashboard. During normal setup you do not paste a Mida API key or project key into your AI client.

MCP endpoint

Use this endpoint:

https://mcp.mida.so/mcp

Prerequisites

  • A Mida dashboard account with access to at least one active project.
  • An MCP client that supports remote HTTP MCP with OAuth.
  • Browser popups and redirects allowed for the MCP client, app.mida.so, and mcp.mida.so.
  • The Mida script installed on your website if you want previews, experiment traffic, and goals to run on the live site.

Remote HTTP/OAuth MCP support varies by client and version. If your client cannot connect to a remote OAuth MCP server yet, use Cursor or Claude Code with remote MCP support. Advanced local stdio setup is possible for clients that only support local MCP, but that path requires API credentials and is not the recommended setup for normal users.


How authorization works

  1. Add the Mida MCP endpoint to your MCP client.
  2. The client opens a Mida authorization page.
  3. Mida sends you through your existing dashboard account/session when possible. If you are not signed in, you will be asked to sign in.
  4. If one active project is available, Mida can select it automatically. If multiple projects are available, choose the project you want the AI client to use first.
  5. Mida issues an MCP OAuth token to the client. The MCP server then calls the Mida backend with an internal token, so you do not need a Mida API key for MCP.

The selected project is just the starting project for the session. The MCP tools can later list available projects and switch the active project when you ask.


Setup

Cursor

In Cursor, open MCP settings and add a remote MCP server:

{
"mcpServers": {
"mida": {
"url": "https://mcp.mida.so/mcp"
}
}
}

Cursor should open the Mida dashboard authorization flow. Approve the connection, choose a project if prompted, then return to Cursor and confirm that the Mida tools are listed.

Claude Code

If your Claude Code version supports remote HTTP MCP with OAuth, add Mida as an HTTP MCP server:

claude mcp add --transport http mida https://mcp.mida.so/mcp

Then follow the browser authorization prompt. If your CLI uses a different MCP command format, choose the remote HTTP transport and use https://mcp.mida.so/mcp as the server URL.

Claude Desktop

Claude Desktop support for remote OAuth MCP depends on the version and release channel. If your version includes remote connectors or remote MCP servers, add Mida with:

https://mcp.mida.so/mcp

If your version only supports local stdio MCP servers, remote OAuth will not work directly. In that case, either use Cursor/Claude Code for remote MCP or use the advanced local stdio package setup documented in the MCP server package. The local fallback requires MIDA_API_KEY and MIDA_PROJECT_KEY, while the recommended remote setup does not.

VS Code

For VS Code builds or extensions that support MCP remote HTTP servers, add Mida as an HTTP server:

{
"servers": {
"mida": {
"type": "http",
"url": "https://mcp.mida.so/mcp"
}
}
}

If your VS Code MCP client does not support remote OAuth yet, use Cursor/Claude Code remote MCP or a documented local stdio fallback.


Available tools

Context and projects

ToolWhat it does
get_mida_api_contextReturns Mida-specific guidance for experiment lifecycle, variant naming, goal types, targeting, preview URLs, and result fields. Use this when the assistant needs exact Mida behavior.
list_projectsLists the Mida projects available to your connected dashboard account.
select_projectSwitches the active project for future MCP calls in the current session.
get_project_configurationReturns Global Settings for the active project: default primary goal, secondary metrics, stats engine, and confidence threshold.
update_project_configurationUpdates Global Settings — the defaults every new experiment inherits. Partial: send only the fields to change.
get_global_custom_codeReads Global Custom Code: JavaScript and CSS that already run on every page with the Mida pixel.
update_global_custom_codeInstalls site-wide JS/CSS. Prefer append_js so existing code stays. This is how a custom event is installed without changing the customer's site.
list_team_membersLists everyone on the account with role, edit rights, membership kind and last login. Read-only.
get_my_accessThe caller's own effective role: answers "am I view-only?" for the current connection.
get_experiment_discussionReads the Discussion thread on a report — the comments where decisions and caveats are recorded.
add_experiment_commentPosts to a report's Discussion as the connected user; assigned members get the usual email.
delete_experiment_commentDeletes a comment — its author, or an Owner/Admin moderating.
list_exclusion_groupsLists mutually exclusive groups: sets of experiments whose traffic is split so each visitor enters exactly one.
create_exclusion_groupMakes overlapping experiments mutually exclusive by traffic split.
update_exclusion_groupChanges a group's membership, splits or name. The tests array replaces the whole membership.
delete_exclusion_groupRemoves a group. Its experiments keep running, they just stop being exclusive.

Personalization

Available only on accounts with Personalization switched on.

ToolWhat it does
list_target_account_campaignsLists Personalization campaigns with account counts, how many have copy, and whether each is building or launched.
get_target_account_campaign_statusOne campaign in detail: build stage, accounts researched and written, what failed, whether it still needs a goal.
create_target_account_campaignBuilds a new campaign for named companies: researches each on the web and writes copy per account. Never publishes.
create_persona_campaignBuilds a new campaign with one version per job role. No company list, no research, and each role gets its own ad URL.
add_target_accountsAdds companies to a campaign that already exists and returns each one's link immediately. The link is final; the copy lands behind it minutes later. On a launched campaign this publishes.
suggest_pages_to_personalizeRanks your own pages by what the target accounts would be evaluating, from real traffic. Call before creating a campaign.
list_saved_target_accountsCompanies this project has targeted before. Already researched, so reusing one is cheaper.

Experiments

ToolWhat it does
list_experimentsLists experiments for the active project with user-friendly statuses such as draft, live, and inactive.
get_experimentGets detailed experiment information by test_id.
get_experiment_distributionGets configured per-variant traffic splits (traffic_weight, variant_status) without the full experiment payload.
create_experimentCreates a draft A/B test, personalization, split URL test, or multivariate test. It requires a test name, URL, and at least one treatment variant.
update_experimentEdits an experiment's settings: name, confidence level, statistical method, traffic allocation, Smart Optimization, primary goal, secondary metrics (secondary_goal_keys), auto-complete thresholds, or scheduled dates.
update_experiment_statusChanges an experiment status using labels such as live, inactive, paused, or draft.
delete_experimentDeletes an experiment. A running experiment also stops being served.
serve_experiment_winnerSets winner and serves on the same experiment (variant_id required, optional traffic_allocation 0-100 for rollout %).
update_serving_rolloutChanges rollout % (traffic_allocation) while a winner is already being served.
stop_experiment_servingStops winner serving and clears serving_variant_id.
get_experiment_resultGets visitors, conversions, conversion rates, improvement versus Control when available, and configured traffic_weight / variant_status per variant. When has_revenue is true (Purchase/order goals with revenue data), also returns per-variant revenue, orders, rpv, aov, currency, and revenue_per_visitor_improvement, plus top-level total_revenue, total_orders, rpv, and aov. Supports report_phase (pre_deploy, post_deploy, all_time) for experiments that are serving a winner. If the experiment has no attached goal, uses the project's global primary goal from Global Settings. Also reports stats_engine and attaches statistical insights by default.
get_experiment_timeseriesDaily chart rows from the dashboard raw engine. Supports the same report_phase filter as results.
get_experiment_metricsSecondary metric rows. Supports report_phase and dashboard-compatible filters.
compute_experiment_statisticsComputes the same Bayesian or Frequentist insights as get_experiment_result from arbitrary aggregate counts. Use it to roll up timeseries rows, custom date ranges, or manually summed segments into a single decision summary that matches the dashboard.

Hypotheses

The record of why a test exists. A hypothesis holds what the team observed, the problem they think it causes, the change they want to try, and their own 1 to 5 ratings for confidence, importance and difficulty.

ToolWhat it does
list_hypothesesLists the project's hypothesis backlog, most recently updated first, with each one's ratings and the experiments run from it. Archived ideas are left out unless you pass include_archived. Supports search, limit and offset.
get_hypothesisGets one hypothesis by hypothesis_id, including linked_test_ids.
create_hypothesisAdds an idea to the backlog. Needs at least one of observation, problem or solution.
update_hypothesisChanges the wording or ratings on an existing hypothesis. Fields left out keep their current value.
delete_hypothesisTakes an idea off the backlog. Refused if any experiment was run from it.
link_hypothesis_to_experimentAttaches a hypothesis to an experiment, or detaches with hypothesis_id: 0. An archived idea cannot be attached. create_experiment can do this in one call for new tests.

Goals and events

ToolWhat it does
list_goalsLists reusable conversion goals for the active project. Use returned goal_key values when attaching goals to experiments.
create_goalCreates a reusable conversion goal, such as pageview, click, form submit, scroll depth, duration, event, revenue, or script goals.
delete_goalDeletes or archives a reusable goal by goal_profile_id.
list_eventsLists tracked custom event names summarized from recorded visitor events.
create_eventRecords a custom event for an already identified visitor by Mida UUID, email, or external ID. It does not install tracking — use update_global_custom_code for that.

Example prompts

  • "List my live experiments in Mida."
  • "Create a draft A/B test on https://example.com/pricing that changes the hero CTA copy to Start free trial, and use my existing signup goal."
  • "Create a personalization for mobile visitors in the United States that shows a shorter hero section. Keep it as a draft."
  • "Generate preview URLs for test 12345, including Control and Variant 1."
  • "What is my project's default primary goal?"
  • "Analyze the results for test 12345 and summarize the conversion rate and lift versus Control."
  • "Serve variant 1 as the winner on test 12345 at 100% traffic."
  • "Show post-deploy results for test 12345 after we served the winner."
  • "Create a pageview goal for /thank-you named Signup completed."
  • "Record an event named DemoBooked for the visitor with email customer@example.com."
  • "Add a custom event that fires when someone clicks the signup button, and install it — don't ask me to paste anything."
  • "What should I test next? Check my hypothesis backlog first."
  • "Why did we run test 12345?"
  • "Save a hypothesis: mobile visitors never scroll past the first pricing plan, so collapse the comparison into one card. Confidence 4, importance 5, difficulty 2."
  • "Create that experiment and record the reason with it."

For complex creation prompts, include the target URL, desired change, conversion goal, and whether the experiment should remain a draft or go live.


Safety notes

  • Create experiments as draft by default. Ask explicitly before launching an experiment as live.
  • Ask explicitly before calling serve_experiment_winner or stop_experiment_serving — these change live visitor experience.
  • update_global_custom_code also changes live visitor experience: the code runs on every page. Prefer append_js so existing Global JS is kept, and confirm before replacing the whole file.
  • Public share links always show pre_deploy results only; use authenticated result tools with report_phase=post_deploy for post-deploy analysis.
  • Control is implicit. Do not add Control to the variants array when creating experiments.
  • Treatment names must be Variant 1, Variant 2, and so on. Put human-friendly labels such as Blue CTA or Short Hero in nickname.
  • Preview URLs use test-variant=0 for Control. Treatment preview tokens replace spaces with underscores, such as Variant_1 or Variant_2.
  • Targeting can silently exclude traffic. Only create targeting rules that the user explicitly described, and check them first when an experiment receives no traffic.
  • Read list_hypotheses before suggesting what to test. The team has usually written down what they want to try, and an idea rated important, not difficult, with no experiment linked to it beats an invented one.
  • The 1 to 5 ratings on a hypothesis are the team's own judgement. Do not fill them in for them. Leave them out unless the user gives a number.
  • Use get_mida_api_context when you need the full Mida-specific details for goal types, targeting shapes, preview URL rules, variant data, or result fields.

Troubleshooting

OAuth popup or redirect is blocked

Allow popups and redirects for your MCP client, app.mida.so, and mcp.mida.so. Sign in to the Mida dashboard in the same browser, then reconnect the MCP server.

The wrong project is selected

Ask the assistant to list projects, then select the correct project:

List my Mida projects, then switch to the project for example.com.

No active projects are available

MCP only authorizes active Mida projects that your dashboard account can access. Create or reactivate a project in the dashboard, or ask an account owner to grant access.

Mida tools do not appear in the client

Check that the server URL is exactly https://mcp.mida.so/mcp, reconnect the MCP server, and confirm that your client supports remote HTTP MCP with OAuth. If the client only supports local stdio MCP, remote OAuth tools will not appear.

The client does not support remote OAuth MCP

Use Cursor or Claude Code with remote MCP support. If you must use a local-only client, use the documented local stdio package setup; that fallback requires MIDA_API_KEY and MIDA_PROJECT_KEY and is separate from the recommended OAuth flow.

An experiment has no traffic

Check that the experiment is live, the Mida script is installed on the target page, the URL pattern matches the page visitors are viewing, traffic allocation is not zero, and targeting rules are not too narrow.

A preview URL does not render the variant

Make sure the Mida script is installed on the previewed page. Use test-variant=0 for Control and Variant_N for treatments, such as Variant_1. For split URL tests, preview treatment variants on the destination URL rather than the original experiment URL.