> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getprescience.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP server

> Let a broker's agent check fit, quote Prescience Diamond from a census, and submit elections.

The broker MCP server gives an agent the same quoting and enrollment calls as
the REST API. It uses the [Streamable HTTP](https://modelcontextprotocol.io)
transport in stateless mode: each request is one JSON-RPC 2.0 message sent with
`POST`, and each response is JSON. There is no server-initiated stream, so `GET`
returns `405`.

| | |
| - | - |
| URL | `https://www.getprescience.com/api/partner/v1/mcp` |
| Auth | `Authorization: Bearer $PRESCIENCE_API_KEY`, the same partner key as the REST API |
| Mode | The key's mode: test keys see test groups, live keys see live groups |
| Protocol versions | `2025-06-18`, `2025-03-26`, `2024-11-05` |
| Methods | `initialize`, `ping`, `tools/list`, `tools/call`, `resources/list`, `resources/read` |

## Connect an agent

Add the server to an MCP client that supports HTTP servers with headers:

```json theme={null}
{
  "mcpServers": {
    "prescience": {
      "url": "https://www.getprescience.com/api/partner/v1/mcp",
      "headers": { "Authorization": "Bearer ${PRESCIENCE_API_KEY}" }
    }
  }
}
```

Use a test key (`psk_test_...`) while you build and a live key (`psk_live_...`)
once Prescience has turned live mode on for your account; see
[Broker account setup](/guides/partner-setup). The **Connect your agent** tab of
the partner portal shows the same URL and configuration.

You can also call the server directly:

```bash theme={null}
curl -X POST https://www.getprescience.com/api/partner/v1/mcp \
  -H "Authorization: Bearer $PRESCIENCE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"fit_check","arguments":{"state":"CA","employees":24,"quotingMetals":["platinum"]}}}'
```

## Tools

A key sees and can call only the tools its partner type and scope allow.
`tools/list` returns that set; calling another tool returns the JSON-RPC error
`-32601` "This tool isn't enabled for your partner type or API key."

| Tool | What it does |
| - | - |
| `fit_check` | Checks whether a client fits from what you know. |
| `quote_group` | Quotes a group from its census. The same call as [`POST /quotes`](/guides/brokers). |
| `price_on_plan` | Prices Prescience on one plan you give it. See [Price on a plan](/guides/price-on-plan). |
| `get_quote` | The latest quote for a group. |
| `list_groups` | Your groups, newest first, up to 50. |
| `get_group` | One group. |
| `get_plan_details` | Static facts about Prescience Diamond. |
| `submit_elections` | Sends final elections for a partner-run group. See [Partner-run enrollment](/guides/partner-enrollment). |

### `fit_check`

Input, all optional:

| Field | Type |
| - | - |
| `state` | Two-letter state. |
| `employees` | Integer. |
| `currentPlanMetal` | Metal tier of the client's current plan. |
| `currentFunding` | `fully_insured`, `level_funded`, `peo` or `ichra`. |
| `quotingMetals` | Metal tiers you are quoting the client. |
| `peoFirstYear` | `true` when the current plan is a PEO plan in its first year. |

Output: `{ "fit": "strong" | "possible" | "poor", "reasons": [...] }`. The
criteria are on [Fit guidelines](/guides/fit-guidelines).

### `quote_group`

Input is the body of [`POST /quotes`](/guides/brokers): `company` (`name`,
`domain`, `zip`; optional `externalId`, `ratingZip`, `state`), `census`, and
optionally `planYearStartDate`, `marketPlans` and `basePlan`. The tool finds or
creates the group, replaces its census, saves the plans you send and quotes.
Sending the same company again with changed fields prices it again.

Output when the quote is ready:

| Field | Meaning |
| - | - |
| `status` | The quote's status (`ready` or `in_review`). |
| `groupId`, `quoteId` | Identifiers. Use `groupId` with the other tools. |
| `planYearStartDate`, `expiresAt` | The plan year the quote covers and when it expires. |
| `pricedOn` | `census_only`, `base_plan` or `market_plans`. |
| `pricedOnNote` | One sentence saying what that mode means. |
| `census` | `employees` and `coveredLives`. |
| `plans` | The two plans, Prescience Diamond (`diamond`) and Prescience Value (`value`), with every field described in [Reading a quote](/guides/brokers#reading-a-quote). Each also has `positioning.wins`, the comparison facts that favor it: `lower_annual_cost`, `lower_oop_max`, `lower_deductible`, `worst_year_below_benchmark_premium` and `hsa_eligible_benchmark_is_not`. |
| `ignoredPlans`, `usedPlans` | When you sent plans: the plans Prescience couldn't build on, with the reason, and how many were used. |
| `markdown` | A table with one row per plan to paste into a proposal. |
| `note` | How the prices are set and that the worst year is a modeled scenario, not a contractual cap or guarantee. |

While pricing the output is `{ groupId, status: "pricing", retryAfterSeconds,
estimatedReadyAt, sweep }`. Call `quote_group` again with the same input to
poll, or call `get_quote` with the `groupId`.

### `get_quote`

Input: `{ "groupId": "..." }`. Returns the latest quote in the shape above. If
rates have landed and no quote exists for the current census, it creates one;
while rates are being fetched it returns the pricing status.

### `list_groups` and `get_group`

`list_groups` takes no input and returns `groups`: for each, `groupId`,
`company`, `externalId`, `status`, `members`, `pricing` (the sweep step),
`createdAt` and `latestQuote` (`quoteId`, `createdAt`, `status`,
`quotePepmCents`, `quoteAnnualCents`, `plansAvailable`).

`get_group` takes `{ "groupId": "..." }` and returns the same identity fields
plus `domain`, `ratingZip`, `enrolled`, `benefitsAdmin`, `basePlan` (the plan on
file, or `null`) and `marketPlans` (how many plans are on file).

### `get_plan_details`

Takes no input. Returns Prescience Diamond and Prescience Value, the three pricing
modes, what every version includes, the member cost-sharing it is quoted with
(0% coinsurance, HSA-eligible), the employer contribution range, and the
disclaimers.

### `submit_elections`

Input: `{ "groupId": "...", "elections": [...] }`, with elections shaped as in
[Partner-run enrollment](/guides/partner-enrollment). Output is that endpoint's
response.

## Results and errors

Every tool result carries the data as MCP `structuredContent` and as a JSON text
block, for clients that read only `content`. A quote adds its markdown table as
a second text block. Every number comes from the stored quote record.

A tool that fails returns a result with `isError: true` and `{ "error",
"message", "details"? }`, using the same codes as the REST API:
`invalid_request` (with `details` naming each field), `not_found`,
`conflict`, `rate_limited` (with `retryAfterSeconds`) and `market_unavailable`.
Protocol failures are JSON-RPC errors: `-32700` (the body is not JSON, HTTP
`400`), `-32600` (not a JSON-RPC message), `-32601` (unknown method or tool) and
`-32602` (missing parameters). Batches are not supported and return HTTP `400`.
A request without a valid key returns `401`, and a key that may not use the
server returns `403 forbidden`.

MCP calls count toward the same per-key rate limits as the REST API; see
[Rate limits](/resources/rate-limits). Test mode is the key's mode: test keys
create test groups, send no email and move no money.

## README resource

The agent instructions (when to quote, what to send, how to present the
versions) are the MCP resource `prescience://broker/readme`, read with
`resources/read`, and Markdown at `GET /api/partner/v1/mcp/readme`, which needs
no key. The partner portal shows the same text under **Fit guidelines**. The server's `initialize` instructions and the `quote_group` description also give the README URL, so an agent can find it without the resource.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.