Usercase

v0.2.27
io.usercase/mcp Checked 4 days ago Published 6 hours ago

Ask real users on your site and run virtual users in a real browser, then fix what they hit.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

check_site

Open the site once as a virtual user and report: does it load, is the Usercase SDK running (which project), is a firewall/bot protection blocking us (and how to unblock, per vendor), is the secret key set. Always run this before starting visits. If it reports a block, stop and tell the user. If you have not read the research procedure yet, call the instructions tool with command research first.

ParameterTypeDescription
url *stringThe site to test, e.g. https://staging.example.com

install_snippet

Get the Usercase script for the connected project, with where to put it per framework. If nothing is connected yet, it opens the browser to connect and says what to tell the user. Use when check_site says the SDK is not running and you are in the site's repository: add the script once to the root layout/document, show the user the diff, then run check_site on the local site to confirm. Do not commit or deploy unless asked. If you have not read the install procedure yet, call the instructions tool with command install first.

save_people

Save virtual users to .usercase/people.json (adds to what is there). People have no names — like real visitors; each gets a number (p1, p2…) to refer to them by. Make people who would really come to this site — varied goals, devices, arrival paths, and states of mind. Do not make everyone a perfect fit for one feature. Show the list to the user before running visits.

ParameterTypeDescription
people *array
site *stringSite origin the visits go to
site_about *stringOne or two English sentences on what the site is, as a visitor would understand it
researchstringOnly when the run takes part in a research — its id, as path_tasks shows it: everyone saved in this call takes part in it

list_people

List the virtual users in .usercase/people.json and whether each has visited yet.

results

Recent visit results (one summary per visit) and what the safety guard blocked. Call after each round of visitor sub-agents finishes — it also says whether the research run goes on to another round.

ParameterTypeDescription
limitinteger

login

Open a visible browser on the user's screen so THEY can sign in to the site with one demo account. Only the resulting session (cookies) is saved, under an account name in .usercase/sessions/ — the password never passes through you or us. Call it once per demo account, one at a time. Returns immediately; tell the user to sign in and close the window, then run check_site — it checks whether the sign-in really worked. If an account is not signed in or has expired, call login again with that same account name. Members (member=true) are spread across the signed-in accounts. Never ask the user f…

ParameterTypeDescription
url *stringThe sign-in page, or any page of the site
accountstringAccount name to save it as (a1, a2 …). Leave out for a new account; give an existing name to sign in again
lifetimeHoursnumberHow long a sign-in lasts, if the auth code says (e.g. a session maxAge or ttl). Shown as time left, and the account is not used after it
windowstringWhich window. chrome (default): the user's normal Chrome — Google and other sign-in buttons work, but a sign-in cookie that lasts only until the browser closes is lost. playwright: keeps such cookie…

set_writes

Choose whether visitors' writes reach the site: signing up, posting, commenting, saving, liking. 'block' (the default) sends nothing to the site; 'send' lets those through for real. Only the user can decide this — ask them, and only call this with their answer. 'send' suits a test or staging site, or data that may be messed up; on a live site real users will see what visitors post. Payments, deleting, wallet connections and sign-out stay blocked either way. Saved in .usercase/settings.json.

ParameterTypeDescription
mode *stringblock = nothing is sent to the site; send = writes really reach the site

connect

Connect Usercase to a project in the browser, or switch to another project. Opens the Usercase dashboard where the user signs in and picks the project. Other tools connect by themselves when nothing is connected — use this only when the user wants another project, or check_site says the SDK sends to a different project.

setup

Install the visitor sub-agent definition (Claude Code: ~/.claude/agents/, Codex: ~/.codex/agents/ — user-wide, nothing is added to the repository) so visitors can be started. Run once if that agent type is not available. The user may need to restart Claude Code afterwards.

question_context

Screens and element words from this project's recent real visits. Call first in the question procedure, before writing a condition — page globs and click targets must match what visitors actually saw. If you have not read the question procedure yet, call the instructions tool with command question first.

question_check

Run a condition over this project's recent visits: how many it matches, grammar problems, overlap with existing questions, and what matched visitors did. Repeat until there are no problems.

ParameterTypeDescription
condition *object

question_save

Save the question as a DRAFT in the dashboard Inbox, after the user approved it. The server checks the condition again and refuses it if there are problems. Nobody sees it until someone turns it on.

ParameterTypeDescription
condition *object
question *stringEnglish, under 15 words. Asks about this moment
acceptWarningsbooleantrue only after the user said to save even though it does not match recent visits
allowOtherbooleanLet visitors write their own answer (choice only). Default true
answerTypestring
choicesarrayFor choice: 2–6 choices, exactly one with noProblem: true
titlestringEnglish, a few words, for the Inbox
triggerEnstringEnglish. One plain sentence: when and in what situation it appears. No paths or class names
whystringEnglish. What the team wants to learn, shown in the Inbox

steps_brief

What is in the user's Several steps window: whether the card is a question or a research invite, the page under Where, and the words they wrote. Call first in the steps procedure. If you have not read the steps procedure yet, call the instructions tool with command steps first.

ParameterTypeDescription
session *stringThe window id from the dashboard command

steps_send

Send the condition back to the user's Several steps window (a question or a research invite), after question_check shows no problems. The server checks it again and refuses it if there are problems. The user saves it there.

ParameterTypeDescription
condition *object
session *stringThe window id from the dashboard command
triggerEn *stringEnglish. One plain sentence: when and in what situation it appears. No paths or class names
acceptWarningsbooleantrue only after the user said to send it even though it does not match recent visits

report_findings

List the findings of a Usercase research's latest report (key, severity, title, who, and whether one is being fixed). Use when the fix command has no finding key. If you have not read the fix procedure yet, call the instructions tool with command fix first.

ParameterTypeDescription
research *stringThe research id, or its name as the user said it (the server finds it by name; if several or none match, it lists them — ask the user which one)
audiencestringWhich report: virtual users (default) or real people

report_finding

Read one finding of a Usercase research report with all its evidence: why, who, the screen checks from the recordings, the paths people took, what they wrote, and the suggested changes. Read it before looking for the code. If you have not read the fix procedure yet, call the instructions tool with command fix first.

ParameterTypeDescription
finding *stringFinding key, e.g. F1
research *stringThe research id, or its name as the user said it (the server finds it by name; if several or none match, it lists them — ask the user which one)
audiencestringWhich report: virtual users (default) or real people

report_fix

Record on the research report that you are fixing a finding (status fixing, once the user approved the change) or have fixed it (status fixed, with the files, a one-sentence summary for the team, and the pull request link if any). If the last fix of this finding is already live on the site, this starts the next fix (fix 2, 3 …); otherwise it adds to the current one. The report compares people after each fix goes live with the version right before it.

ParameterTypeDescription
finding *stringFinding key, e.g. F1
research *stringThe research id, or its name as the user said it (the server finds it by name; if several or none match, it lists them — ask the user which one)
status *string
audiencestringWhich report: virtual users (default) or real people
filesarrayRepository paths of the files changed (or to be changed)
prUrlstringPull request link, if one was opened
summarystringOne sentence for the team: what visitors now see differently

issue_list

List the open issues of the Usercase project (problems found from visitors' answers to questions on the site): id, title, where, whether it is a clear fix, and whether one is being fixed. Use when the fix command has no issue id. If you have not read the fix procedure yet, call the instructions tool with command fix first.

issue_read

Read one issue of the Usercase project with all its evidence: the question and page, what people chose, what they wrote, the AI's reading, other issues with the same cause, and earlier fixes. Read it before looking for the code. If you have not read the fix procedure yet, call the instructions tool with command fix first.

ParameterTypeDescription
issue *stringThe issue id, as in the dashboard command

issue_fix

Record on a Usercase issue that you are fixing it (status fixing, once the user approved the change) or have fixed it (status fixed, with the files, a one-sentence summary for the team, and the pull request link if any). After a finished fix, starting again records the next fix.

ParameterTypeDescription
issue *stringThe issue id
status *string
filesarrayRepository paths of the files changed (or to be changed)
prUrlstringPull request link, if one was opened
summarystringOne sentence for the team: what visitors now see differently

path_tasks

List the tasks of a Usercase research (from the dashboard) and whether each already has an expected path. Call first in the path procedure. If you have not read the path procedure yet, call the instructions tool with command path first.

ParameterTypeDescription
research *stringThe research id, or its name as the user said it (the server finds it by name; if several or none match, it lists them — ask the user which one)

path_start

Open a fresh browser on the page where the task's intended route begins and start recording its expected path. The page itself is step 1. Starting again discards the recording in progress.

ParameterTypeDescription
task *stringTask id from path_tasks · plan-<n> for task n of a research not saved yet (new-research) · draft:<draft>:<index> for a saved draft
url *stringFull URL where the route starts — the local dev server is fine; only paths are saved
accountstringDemo account saved by login (a1 …) if the route needs a signed-in user
devicestring

path_click

Click a numbered element from the latest screen. By default it becomes a step of the path (the element is recorded; a new page reached is recorded too). record=false for clicks that are not part of the route (closing a cookie banner) — they are still repeated by path_check. press=false records the element as the final click without pressing it (a Pay or Submit button the safety guard will not press).

ParameterTypeDescription
index *integer
pressboolean
recordboolean

path_type

Type into a numbered field (a search box, a quantity). Not a path step, but repeated by path_check. enter=true presses Enter after typing — for a search box that submits on Enter and has no button to click; a page it opens is recorded as a step.

ParameterTypeDescription
index *integer
text *string
enterboolean

path_scroll

Scroll the recording page to see more.

ParameterTypeDescription
directionstring

path_pattern

Make a page step match any page of its kind: /notice/6553c3ba → /notice/:id. Use when participants would open a different item than the one you did (the route reads from the code). Applies to every step on that page.

ParameterTypeDescription
step *integer
url *stringPath pattern with :name for the changing parts

path_check

Walk the recorded path again in a fresh browser: every clicked element must still be found at its recorded position with the same text, and every page must be reached. Lists the screenshots to show the user. Required before path_save.

path_remove_event

Remove an event step from the path being recorded (step number from the path list). Events the site sends while you walk are added as steps automatically; remove one that has nothing to do with this task, or that is too slow to come back when the path is checked.

ParameterTypeDescription
step *integer

path_save

Upload the checked path to the dashboard, replacing the task's expected path. Only after the user approved it. success: keep (default) leaves the task's success condition; page = done on reaching the last page of the path; click = done on the last recorded click; event = done when the site sends the last event step. With page, click or event the saved path ends at that point (later steps are left out: the task ends there, so nobody could reach them). Ask the user before changing it.

ParameterTypeDescription
successstring

theme_context

The question cards' current look on this site (colors, dark colors and when, font, radius, shadow), whether the plan includes matching the cards to the site (fullStyling), and the last saved suggestion. Call first. If you have not read the theme procedure yet, call the instructions tool with command theme first.

theme_save

Save 1–3 suggestions for how the question cards should look on this site, read from its code. A is the closest match; B and C only for a real ambiguity found in the code. Nothing changes on the site until the user picks one in the dashboard. If you have not read the theme procedure yet, call the instructions tool with command theme first.

ParameterTypeDescription
variants *array
analysisobject

event_list

The Usercase.track events this project has received: each name with its total, when it was last received, the last 7 days from real visitors and from virtual users, and the questions that use it. Call before suggesting events (do not suggest names already received), and after the change is live to see whether real visitors send them. If you have not read the events procedure yet, call the instructions tool with command events first.

event_check

Check that Usercase.track calls fire in a real browser. action open: open the page (local dev server is best) with the names you expect; then click / type / scroll / goto to make each moment happen — every reply lists the events received since the last screen; finish: report each expected name as received or not, and close the browser. Requests that write to the site stay blocked, as in other Usercase browsers. If you have not read the events procedure yet, call the instructions tool with command events first.

ParameterTypeDescription
action *string
accountstringopen: demo account saved by login (a1 …) if the moment needs a signed-in user
devicestring
expectarrayopen: the event names you added
indexintegerclick / type: a numbered element from the latest screen
textstringtype: the text
upbooleanscroll: true to scroll up
urlstringopen: full URL of the page · goto: a URL or path to open next

research_context

What this project's data says is worth researching: open findings, where real visitors and virtual users left, what virtual users said when they left without getting what they came for, and the researches and drafts that already exist. Call first in the new-research procedure. If you have not read the new-research procedure yet, call the instructions tool with command new-research first.

research_save

Save the research as a DRAFT in the dashboard Inbox, after the user approved it. It becomes a research only when someone creates it there. Paths are page paths starting with / (no host), with :name for the parts that change. Expected paths recorded and saved beforehand as plan-<n> (n = the task's position in tasks, from 1) are uploaded with it.

ParameterTypeDescription
basis *stringWhat the research came from: real visitor data, virtual user data, or neither (the user's question or the code)
purpose *stringShown to participants (invite card and start of the study): one or two sentences, in their words, on what they will help with. Never the team's evidence, suspicions or hypotheses
title *stringShort, for the team
acceptWarningsbooleantrue only after the user said to save even though the invite condition does not match recent visits
findingIdsarrayIds of the findings it answers, from research_context
hypothesesarrayTeam only, never shown to participants: what the team expects to go wrong, one per item, 1–3 usually. The report judges each one. Each must be something these tasks can confirm or rule out
inviteobject
minutesintegerMinutes the whole session takes (tasks and questions). Shown on the invite card and the start screen
questionsarrayAsked after all tasks
start_screenobjectWhat participants read before the first task
tasksarray

open_visit

Start a visit as one virtual user from people.json. Returns a visit_id and what you see first. You ARE this person from now on. If it says the site is blocking us, stop and report that.

ParameterTypeDescription
person *stringThe person's number from people.json, e.g. p3

act

Do one thing on the screen, as the person. Numbers refer to the latest screen you were shown — only what is in view; scroll to see more. It happens after the pause a real person would take on that screen, then you get the new screen — or a survey card, or the end of the visit.

ParameterTypeDescription
action *string
index *integerNumber of the thing to click, type into, hover over or drag. For scroll/scroll_up, the number of a part of the screen that scrolls on its own (or of something inside it) — or -1 to scroll the page.…
visit_id *string
why *stringOne short sentence in English: what you are doing and why, as this person
donebooleanFor leave: true if you got what you came for
textstringFor type: what you type (in the language of the site), or the option/value to choose in a dropdown, slider or date box. For press: the key (Escape, Tab, Enter, ArrowDown…). For drag without `to`: th…
timesintegerFor scroll, scroll_up, click or press: how many times in a row, quickly (scrolling down while skimming, clicking again because nothing happened, pressing an arrow key a few times). Default 1
tointegerFor drag: the number of the thing to drop it onto; -1 to drag in the direction given in text

answer_card

Respond to the survey card on screen, as the person. Decide `bothered` FIRST — most people close these without reading. Only if bothered, pick an option, write your own words, or still close.

ParameterTypeDescription
action *string
bothered *booleanWould this person, right now, bother to answer at all?
bothered_why *stringEnglish, one sentence
choice_index *integerOption number for choose; -1 otherwise
visit_id *string
why *stringEnglish, one sentence: why this answer
other_textstringYour own words for other, in the language of the card, the way this person writes

instructions

Start here for any Usercase work — whether the user typed a command or just asked in their own words. Returns the step-by-step procedure; follow it as the user's request, and call this before the other Usercase tools. Commands: research (test or get feedback on the site with virtual users; `research` id to have them take part in a research), new-research (plan or create a research / usability study), install (add or install the Usercase script on the site), question (make a question to ask visitors at a moment on the site), events (find the moments only the site's code knows, add Usercase.tr…

ParameterTypeDescription
command *string
audiencestring
countstringHow many people (default 5), or "unlimited" to keep going until you stop it
findingstring
focusstringOnly people who come for this part of the site, e.g. calendar, or comments and sharing
issuestringAn issue id from the dashboard's Issues — fixes that issue instead of a report finding
researchstringThe research id, or its name as the user said it (the server finds it by name; if several or none match, it lists them — ask the user which one)
sessionstringThe window id shown in the dashboard command
taskstring
urlstring