MCP Workflows
These are conversations with the agent, not dashboards you click through.
Before you change a live page
Call check_live_tests before you edit a homepage, letter, Adaptive Journey, or Milestone, even if nobody said experiment. Pass the full file, not a diff hunk. If something live is on those files or ids, stop and ask. Three outs: end the test then ship; wait; or they say this change is not the thing under test.
The check does not pause anything and does not send mail. Pause stays on the experiment page.
Set up Apex from the editor
Set up Apex in this repo.
Or type /setup-apex in Cursor. The agent works the same checklist as Set up Apex in the dashboard, in this order:
- Sign in. It shows an approval link and carries on the moment you click Approve. There's no key to paste.
- Which workspace. It reads the repo's
.apex/workspace.json. If there isn't one, it asks whether this is a workspace you already have, a new workspace in your organization, or a separate company. - Name the workspace from the repo, if it's still unnamed.
- Install and wire events, then show you the first ones arriving.
- Pick what counts as a conversion.
- Work the checklist. It asks you before it skips, snoozes, or turns off anything, and it never marks a step done. A step finishes when the real thing happens.
- Browser steps. Connecting Stripe or an ad account, sending domain DNS, and payment details need you. It gives you the link and waits.
- First value. It suggests one first experiment or letter for this workspace. Nothing goes live until you say yes.
Ask "What is still unfinished on Set up Apex?" at any point. The agent calls get_setup_state.
Point the agent at the right workspace
Each repo names its workspace in a committed .apex/workspace.json, and the agent switches to it on its own. To switch by hand:
List my workspaces and switch to the one whose key matches the dashboard.
The agent calls list_workspaces, then switch_workspace. Every later call uses that workspace. If you belong to more than one organization, list_orgs / switch_org first (user key or device flow).
Set up a second workspace, or a separate company
One install covers every workspace you can reach. Open the other repo and say "Set up Apex in this repo."
- Another workspace in the same organization (a second brand, a staging site): the agent calls
create_workspace. Billing and teammates are shared. - A separate company: the agent calls
create_organization. It gets its own billing and its own people. Nobody in your first organization can see it.
Either way the agent writes .apex/workspace.json so the repo remembers which workspace it is.
Plan and ship a code experiment
Plan
Tell the agent what you want to improve. It calls plan_experiment and shows related beliefs.
I want more signups on the pricing page
Record the assumption
The agent calls start_reasoning after you pick the belief and how sure you are.
Preview the experiment
The agent calls create_experiment with preview: true. You review the name, control, variant, and traffic split. Confirm to create.
Implement the recipe
Apex never writes your app. The agent implements the recipe with useApexVariant. The hook alone is not flicker-free. First HTML has to already be the assigned arm: pass initialVariant or <ApexProvider assignments>. If you use Next.js: npm install @apex-inc/next @apex-inc/react, then apexVisitorMiddleware, assignExperiments, <ApexProvider assignments>. A client-only app cannot promise no flicker. If the Apex snippet is already on the page, Apex can change what is there. No SDK.
Check the files, then start
check_live_tests on the files you touched. Then track_deployment with the commit SHA, check_deployment, and activate_experiment.
Review results
How is the pricing experiment doing?
The agent calls list_experiments and get_results. You can keep running, pause, or promote. Promoting is optional. The snippet can keep serving the winner. Graduating removes the runtime branch and puts the winner in source.
Ask what to test next
What should I test on onboarding?
The agent calls suggest_experiment. Suggestions get better as you record beliefs and finish tests.
Letters and Adaptive Journeys
What letters and journeys does this workspace already have?
The agent calls list_communications and list_journeys. Empty is honest. recommend_communications returns the catalog for your vertical. Publishing a letter or an Adaptive Journey is a write. Confirm first. See Building your first Adaptive Journey.
Segments
What segments can I send to?
The agent calls list_segments. Wire a seed with wire_audience_seed when you are installing events. There is no list_audiences tool.
Product adoption
Show adoption milestones and whether anyone has reached them.
The agent calls list_adoption_milestones and get_adoption_metrics. An empty Path is zeros, not a green all-clear. See Driving product adoption.