> ## 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

> The broker MCP server: Model Context Protocol over Streamable HTTP, in stateless mode. Each request is one JSON-RPC 2.0 message (batches are not supported); `GET` returns `405`. Supported methods: `initialize`, `ping`, `tools/list`, `tools/call`, `resources/list` and `resources/read`. Authenticate with the same partner Bearer key as the REST API. The tools are `fit_check`, `quote_group`, `price_on_plan`, `get_quote`, `list_groups`, `get_group`, `get_plan_details` and `submit_elections`; a key can call a tool only when it holds the tool's capability. The agent README is the resource `prescience://broker/readme`. See the MCP server guide for each tool's input and output. A JSON-RPC notification (no `id`) returns `202` with no body.



## OpenAPI

````yaml /api-reference/openapi.json post /mcp
openapi: 3.1.0
info:
  title: Prescience Partner API
  version: 1.1.0
  description: >-
    Create employer groups, submit census records, generate preliminary
    market-rate quotes, create iframe sessions, create enrollments, and read
    aggregate account data.


    Money is always integer cents. Dates are `YYYY-MM-DD`; timestamps are ISO
    8601 UTC. Final pricing, eligibility, network availability, and plan
    documents are confirmed during underwriting and onboarding. A BAA and data
    processing agreement are executed before live mode is enabled.
  contact:
    name: Prescience partner engineering
    email: partners@getprescience.com
servers:
  - url: https://www.getprescience.com/api/partner/v1
    description: >-
      Production. Test and live traffic share this host; mode comes from your
      API key.
security:
  - bearerAuth: []
tags:
  - name: Health
    description: Connectivity and key checks.
  - name: Plans
    description: Static plan metadata.
  - name: Groups
    description: 'Employer groups: the root resource of every integration.'
  - name: Census
    description: Pre-enrollment census intake and ongoing member sync.
  - name: Quotes
    description: >-
      Preliminary quotes built from the stored census and current local
      market-plan snapshot.
  - name: Enrollments
    description: Plan selection and employer provisioning.
  - name: Account
    description: Aggregate, de-identified employer account data.
  - name: Brokers
    description: >-
      Quoting for brokers, the MCP server, and elections for partner-run
      enrollment.
  - name: Webhooks
    description: Signed event delivery (standard-webhooks scheme).
paths:
  /mcp:
    post:
      tags:
        - Brokers
      summary: MCP server
      description: >-
        The broker MCP server: Model Context Protocol over Streamable HTTP, in
        stateless mode. Each request is one JSON-RPC 2.0 message (batches are
        not supported); `GET` returns `405`. Supported methods: `initialize`,
        `ping`, `tools/list`, `tools/call`, `resources/list` and
        `resources/read`. Authenticate with the same partner Bearer key as the
        REST API. The tools are `fit_check`, `quote_group`, `price_on_plan`,
        `get_quote`, `list_groups`, `get_group`, `get_plan_details` and
        `submit_elections`; a key can call a tool only when it holds the tool's
        capability. The agent README is the resource
        `prescience://broker/readme`. See the MCP server guide for each tool's
        input and output. A JSON-RPC notification (no `id`) returns `202` with
        no body.
      operationId: mcp
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/McpRequest'
            example:
              jsonrpc: '2.0'
              id: 1
              method: tools/call
              params:
                name: fit_check
                arguments:
                  state: CA
                  employees: 24
                  quotingMetals:
                    - platinum
      responses:
        '200':
          description: >-
            The JSON-RPC response. Tool failures are returned as a result with
            `isError: true`; protocol failures as a JSON-RPC `error`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpResponse'
              example:
                jsonrpc: '2.0'
                id: 1
                result:
                  content:
                    - type: text
                      text: '{"fit":"strong"}'
                  structuredContent:
                    fit: strong
                    reasons:
                      - >-
                        The client is looking at gold or platinum, where
                        Prescience's lower out-of-pocket maxes and HSA
                        eligibility compare best.
                      - CA is a strong state for Prescience.
                      - 24 employees is in the best range (5 to 50).
        '202':
          description: A notification was accepted. No body.
        '400':
          description: >-
            The body is not JSON, or is a batch. A parse failure is a JSON-RPC
            error with code `-32700`.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/Error'
                  - $ref: '#/components/schemas/McpResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    McpRequest:
      type: object
      required:
        - jsonrpc
        - method
      properties:
        jsonrpc:
          type: string
          const: '2.0'
        id:
          type:
            - string
            - integer
            - 'null'
        method:
          type: string
          enum:
            - initialize
            - ping
            - tools/list
            - tools/call
            - resources/list
            - resources/read
        params:
          type: object
          description: >-
            For `tools/call`: `name` and `arguments`. For `resources/read`:
            `uri`.
    McpResponse:
      type: object
      required:
        - jsonrpc
        - id
      properties:
        jsonrpc:
          type: string
          const: '2.0'
        id:
          type:
            - string
            - integer
            - 'null'
        result:
          type: object
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: integer
            message:
              type: string
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          enum:
            - invalid_request
            - unauthorized
            - live_mode_disabled
            - forbidden
            - not_found
            - conflict
            - rates_pending
            - quote_expired
            - market_unavailable
            - census_required
            - rate_limited
            - server_error
            - not_configured
            - email_not_allowed
            - verification_failed
          description: >-
            Stable machine-readable error code. `email_not_allowed` and
            `verification_failed` come only from the iframe's own endpoints,
            which partners do not call.
        message:
          type: string
          description: >-
            Human-readable explanation. Wording may change; branch on `error`,
            not `message`.
        details:
          type: array
          description: Present on `invalid_request`. One entry per failed field.
          items:
            type: object
            required:
              - field
              - message
            properties:
              field:
                type: string
                example: zip
              message:
                type: string
                example: zip must be a 5-digit ZIP code
              index:
                type: integer
                description: >-
                  For array payloads (census rows), the zero-based index of the
                  failing row.
                example: 7
  responses:
    Unauthorized:
      description: Missing, malformed, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
            message: >-
              Provide a valid partner API key as `Authorization: Bearer
              psk_...`.
    Forbidden:
      description: >-
        Key is live-mode but live mode is not enabled for this account, or the
        key may not access this resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: live_mode_disabled
            message: >-
              Live mode is not enabled for this account yet. Complete the
              go-live checklist to enable live keys.
    RateLimited:
      description: Rate limit exceeded. Honor `Retry-After`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: rate_limited
            message: Too many requests. Please retry later.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
          example: 12
    ServerError:
      description: >-
        Something failed on our side. Safe to retry with the same
        `Idempotency-Key`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: server_error
            message: Internal error. The request was not applied.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Partner API key. `psk_test_<32 hex>` for test mode, `psk_live_<32 hex>`
        for live mode. Store them in your secrets manager on issue. Live keys
        are shown once; the scoped partner portal can show an active sandbox key
        again.

````

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