# Enrolling someone in their benefits, as an agent

You are talking to an employee whose employer offers benefits through EnrollVB. Do the enrollment
through the MCP server below rather than by driving the website: the site is a Knockout application
whose pages will not work for you.

## Connect

POST JSON-RPC 2.0 to `https://enrollvb.com/mcp` (Streamable HTTP, protocol `2025-03-26`).

1. `initialize`. Keep the `Mcp-Session-Id` response header and send it on every later request. It is
   the whole session; drop it and you start again as a stranger.
2. `tools/list`. Treat that as the specification. What follows is only the order to call things in.

## Order

1. `group_search` with what the employee calls their employer. Each result carries a `GroupId` and
   `signIn`, naming the tool to call next. Only employers with a live enrollment period come back,
   so no match means there is nothing to enrol in today, not that you searched badly.
2. Sign in with the pair `signIn` named:
   - `account_login` then `account_verify`, for employers where people create a profile. Takes the
     employee's email.
   - `account_logincode` then `account_logincodeverify`, for employers that know their people by
     employee ID. Takes the email address or mobile number their employer holds for them.
   Either way a six-digit code goes to the address or number already on file, never to whatever you
   passed in, so **ask the employee to read you the code**. You cannot see it. It lasts 15 minutes
   and dies after five wrong answers.
3. `enrollment_start`. A lone enrollment is chosen for you; otherwise pass the `caseId` you were
   given when signing in.
4. `enrollment_action` for everything after that. Each response describes one page. `controllers`
   lists what is on it: each entry has a `controller` number, a `type`, `data` (what it shows),
   `editableFields` (which fields it accepts and what they currently hold), sometimes `helpText`,
   guidance written for the employee, and sometimes `hint`, rules for answering that controller,
   written for you. `actions` is exactly what you may do next. Nothing outside
   `actions` will be accepted.
   Answer with only what you are changing:
   `answers: [ {"controller": 1, "fields": {"FirstName": "John"} } ]`, where `controller` is the
   number on that entry. Anything you omit keeps the value the page showed, so there is no need to
   echo a page back, and a page needing no answers takes no `answers` at all. A list you send replaces
   the one shown, so send it whole, as the controller's `hint` says. If anything is wrong
   nothing is saved and you can simply retry. `enrollment_page` shows the current page
   again without changing anything.
5. `catalog_viewproduct` on a page whose `actions` include `viewproduct`, to open one product from
   the catalogue by its title. Its plans, tiers and prices arrive in the product page's
   `InlineRates`, and the tiers carry eligibility - do not offer the employee a tier marked
   ineligible.
6. `complete` on the checkout page finishes the enrollment. Nothing is bound until then. Where that
   page's `hint` offers `checkout_link`, ask the employee how they want to pay among the options it
   gives; through the link they enter their own card or bank details and finish there.

## What to ask the employee for

Their employer's name, the email address or mobile number their employer holds for them, and the
six-digit code once it arrives. Spouses and children they want to cover or name as beneficiaries,
if they are not on file yet, and their Social Security numbers where the employer asks for them.
How they want to pay: their card where checkout takes one, a payment already on file where the
page offers one, or, where the hint offers `checkout_link`, their own card or bank details entered
through a link you give them. And anything a page's `hint` lists as required that their record does
not hold yet; the rest comes back in the page.
