You can run user research from Cursor or Codex the same way you run any other tool: connect the User Intuition MCP server, describe the question in the agent chat, approve the saved plan and estimate, and keep coding while interviews run. Cursor runs the server as a local process from a project config with your API key, and Codex adds the hosted server with one command and a browser sign-in. Either way, the agent creates the study, relays the planner’s questions, and launches after you confirm or within a monthly budget you set. Interviews are AI-moderated by voice, chat or video, with participants from a vetted 4M+ consumer panel (B2B audiences recruited to order per study), or your own participants. Results come back in a later session with prevalence counts and verbatim quotes linked to the source interview. This guide covers setup for both agents, the research playbook as Cursor rules and Codex skills, prompts that fit an IDE, studies that finish after you have moved on, and the CLI.
Why does user research belong in a coding agent?
People who build with Cursor and Codex ship in cycles measured in hours, not sprints. The question that follows each draft is the same: will the people who use this understand it, want it, and trust it?
Answering that used to mean leaving the editor: opening a research tool in a browser, drafting a study, waiting for responses, and returning to development with stale context. The gap between where the decision happens and where the evidence lives meant most of those questions never got asked.
MCP closes that gap. With the research API and MCP server for AI agents connected to your coding agent, user research becomes a callable action inside the tool you already write code in. A developer or product manager can raise a research question and start a study without switching context, and results arrive asynchronously, the way a long-running test suite does.
What changes when research runs from the editor?
Product development usually treats research as a phase that happens before or after the build. The constraint is mostly logistical: research has its own tools, timelines, and handoffs.
When research runs through a coding agent, that boundary dissolves. Research becomes a kind of tool call, alongside a linter, a test runner, or a database query.
Earlier evidence on smaller decisions. Questions that would never justify a formal project, such as “is this pack claim believable?” or “does this feature name make sense to someone outside the team?”, become easy to ask. Most panel studies fill within 24 hours.
Context stays fresh. Questions raised while a feature is in development get answered before it ships, while the reasoning that prompted them is still live.
The habit compounds. Teams that run research from the editor run more of it, because starting is easy. Each study adds to your research library, which makes later questions faster to answer.
How do you set up the Cursor MCP config?
Create or edit .cursor/mcp.json in your project root:
{
"mcpServers": {
"userintuition": {
"command": "npx",
"args": ["-y", "@userintuition-ai/mcp@latest"],
"env": {
"USERINTUITION_API_KEY": "ui_sk_your_key_here"
}
}
}
}
Replace the example value with your API key from Settings → API Keys in the User Intuition app. Restart Cursor or open a new chat so it loads the research tools, then ask the agent to list your studies. An answer scoped to your account confirms the connection. Cursor can also use the hosted server at https://mcp.userintuition.ai/mcp with OAuth sign-in.
Choose the key’s permissions. Keys start with read access, which covers listing studies, searching research, reading reports and requesting estimates. Add write access for an agent that creates and edits studies, and the paid-action permission for one that launches panel recruitment.
Narrow the catalog when it helps. Append "--profile", "core" to args for the research workflow alone, or "--profile", "read-only" for an agent that should read findings and never change a study.
Project-level or global. The .cursor/mcp.json file applies only to the current project. Commit the file without the literal key so every teammate gets the same research tools when they pull the repository. For research tools across all projects, use Cursor’s global MCP settings instead.
Keep keys out of the repository. Supply each developer’s key from their own environment, using the environment-variable support described in Cursor’s MCP documentation, rather than writing the value into a committed file.
How do you set up Codex?
Codex connects to the hosted server, so there is no key to manage:
codex mcp add userintuition --url https://mcp.userintuition.ai/mcp
codex mcp login userintuition
The first command registers the server and may open the browser sign-in straight away. Run the second only if sign-in is still pending. Start a new Codex task so it loads the research tools, then ask it to list your User Intuition studies; an answer scoped to your account confirms the connection. Every prompt below works the same way in Codex as in Cursor. Claude and ChatGPT have their own steps in the setup post.
How do you give Cursor and Codex the research playbook?
The MCP server gives a coding agent the research tools. A skill gives it the order to use them in: ask how to recruit, relay the planner’s questions, show the saved plan, and estimate before any spend. User Intuition publishes ten of these workflows as plain Markdown files in its skills library, and both agents can load them.
- Cursor. Save a skill as a Project Rule in
.cursor/rules/, for example.cursor/rules/create-study-from-brief.mdc. Carry the skill’sdescriptioninto the rule’s frontmatter and setalwaysApply: false, so Cursor applies the rule only when a request matches it. - Codex. Ask Codex to fetch the skills catalog, pick the skill that matches the task, and install its
SKILL.mdin the skills directory Codex reads.
Start with create-study-from-brief, then add run-a-concept-test, field-a-panel or analyze-completed-study as the work calls for them. Committed to the repository next to .cursor/mcp.json, the rules give everyone on the team the same research workflow.
Which prompts fit a coding-agent workflow?
Each of these is written for the agent chat in Cursor or Codex. Describe the decision, the audience, and what you want to learn, and ask to see the plan before launch.
1. Test product-page copy before it ships
We're choosing between three product-page headlines for our refillable
cleaning spray. Plan a study with 15 US shoppers who bought household
cleaners online in the last three months. Ask which headline makes them
want to buy and why. Show me the saved plan and a panel estimate.
2. Prototype-test a checkout flow
Plan a prototype test of our new checkout at the staging URL with 10 US
online grocery shoppers. Ask them to build a basket of five items and
talk through each step. Use voice. Show me the plan before launch.
Prototype tests take a live link and run by voice or video, so participants can react to the flow as they use it.
3. Name a feature before you build the UI
Test three names for the "save for later" list in our recipe app with
home cooks who plan meals weekly. Ask what each name makes them expect
the feature to do.
4. Interview your own customers who cancelled
Use our own participants: invite the subscribers who cancelled last
month by email. Plan exit interviews about why they left and what would
bring them back. Organize findings by reason, with verbatim quotes.
Your own participants are invited by email or link once you approve the saved plan.
5. Carry findings into the pull request
Get the report from last week's checkout-copy study. Write the three
findings that bear on this change into the PR description, each with
its count and one quote, and keep the quotation labels.
The quotation labels travel with the findings, so a reviewer can trace each point to the interview behind it. To check what earlier studies already say before you plan a new one, ask questions across past research.
How does the fire-and-check-back pattern work?
Studies do not finish in real time. When you approve a launch from Cursor or Codex, the platform recruits participants and runs interviews in parallel while you keep working. The agent returns a study ID right away, and the results arrive later.
That maps onto a pattern already common in development: start a CI run and check back when it completes.
- Start the study. Describe what you need. The agent creates the study, runs the planning step, and shows you the saved plan and the estimate.
- Approve and keep working. In Cursor and Codex, you confirm the plan and estimate in the conversation, and interviews then run in the background. Most panel studies fill within 24 hours.
- Check back. In a later session, ask: “What are the results from yesterday’s checkout-copy study?” The agent retrieves the report with
get_study_reportand opens individual interviews withget_interview. - Act on the output. Findings come back with prevalence counts and verbatim quotes linked to the source interview and, for voice and video studies, to the moment in the recording, plus evidence coverage and recommended next steps.
No dashboard login and no context switch. The loop stays in the editor.
How do you run research from scripts and the CLI?
The userintuition-mcp CLI is the same package as the MCP server, run as a plain command. Scripts, cron jobs, and CI pipelines call the research tools directly, without an agent choosing them: they estimate a panel, inspect fielding and read results.
npm install -g @userintuition-ai/mcp
userintuition-mcp login # sign in through the browser
userintuition-mcp list # every tool, one per line
userintuition-mcp describe estimate_panel # a tool's inputs
userintuition-mcp list_studies # JSON on stdout
- JSON output. Each command writes the same JSON payload an MCP client receives to stdout, and errors come back as JSON too, so a script parses success and failure the same way with
jq. - Inputs. Pass
--key valueflags, inline JSON with--input-json, or a JSON file kept in source control with--input-json @study.json. - CI. Store an API key as the
USERINTUITION_API_KEYsecret. A pipeline can request a panel estimate and fail the build when it exceeds a budget. The launch itself runs from an MCP client, where you review the plan and estimate, or from the REST launch-panel endpoint.
The CLI overview covers install options and commands, and the CLI recipes include a CI cost gate, a script that watches fielding and saves the report, and a daily status digest.
What does the agent hand back in the editor?
The report arrives in the agent chat as findings ranked by prevalence, each with a count, its denominator and the verbatim quotes behind it. The editor is where that evidence becomes work. Ask the agent to turn a finding into acceptance criteria, a ticket, or a comment beside the code it concerns, with the quote attached. When a quote needs its context, get_interview opens the full transcript. Over the CLI, the same report is JSON a script can parse, and webhooks can announce a completed study to your own systems. To see a finished study before you run one, explore an example study.
Why can you trust the findings?
User Intuition’s AI moderator runs 20–30 minute interviews that ladder 5–7 levels deep, so each finding carries the reasoning behind a preference. Every panelist call is reviewed by the User Intuition team, panelists pass a video identity check, and only interviews that pass quality scoring are billed; see how quality works. Cursor and Codex show you the saved plan and a cost estimate before anything is spent, and launch after you confirm in the conversation, or on their own within a monthly panel budget set in your workspace. Synthetic respondents are also available in chat for a directional first read.
Get started
- In Cursor, create an API key under Settings → API Keys in the User Intuition app and add the
.cursor/mcp.jsonconfig above. In Codex, run the twocodex mcpcommands. - Restart the agent and ask it to list your studies.
- Describe your first study and review the saved plan and estimate before you approve.
- For scripts and CI, install the CLI and sign in with
userintuition-mcp login.
Pricing is $30 per voice interview. Signup includes 3 free interviews with your own participants; panel recruiting is billed separately. The MCP research API reference maps every tool by job and what each stage returns, and the full parameter reference is in the MCP docs. To work from Claude instead of an IDE, see running user interviews from Claude.