Product Requirements Document

Mimi: AI Medication Cost Guide

Technical specifications for building an AI-powered medication price transparency platform

Version: 1.0
Last Updated: 2/3/2026
Owner: RxUtility Product Team

1. Executive Summary

Product Vision

Mimi is an AI-powered medication cost guide that provides real-time price transparency across all payment options: insured prices, copay coupons, cash discount prices, and manufacturer direct-to-consumer pricing. The product empowers patients, providers, and pharmacists to make informed decisions about medication costs before reaching the pharmacy counter.

Business Goals

  • Reduce medication abandonment rates by providing upfront cost transparency
  • Increase adoption of RxUtility's API through an AI interface
  • Create two revenue streams: full Mimi product and MCP server subscriptions
  • Position RxUtility as the leader in medication price transparency technology

Key Differentiators

  • Comprehensive pricing: First platform to show all 4 price types in one interface
  • AI-powered education: Conversational explanations of complex pharmacy benefit concepts
  • Flexible integration: Available as standalone product or MCP server for existing chatbots
  • Real-time data: Live pricing from multiple authoritative sources

2. Product Overview

Core Functionality

Conversational Interface

Natural language chat where users ask medication cost questions

Price Comparison

Side-by-side display of all pricing options with clear recommendations

Educational Content

Explains copay coupons, cash discount cards, and pharmacy benefits

Smart Data Collection

Progressively asks for insurance and location only when needed

Tagline

"Mimi - your medication cost guide"

3. User Personas

P1

Sarah - The Patient

35-year-old with commercial insurance, recently prescribed Wegovy for weight management

Goals:
  • Find most affordable option for expensive medication
  • Understand if copay coupon applies to her insurance
  • Avoid surprises at pharmacy counter
Pain Points:
  • Doesn't understand pharmacy benefit terminology
  • Unsure how to activate manufacturer coupons
  • Frustrated by lack of upfront pricing
P2

Dr. Martinez - Primary Care Physician

42-year-old physician who wants to prescribe cost-effective medications

Goals:
  • Quick price lookups during patient visits
  • Identify most affordable options across formularies
  • Reduce medication abandonment
Pain Points:
  • No time to call pharmacies for pricing
  • Patients often can't afford prescriptions
  • Limited visibility into copay assistance programs
P3

James - Retail Pharmacist

29-year-old pharmacist at busy retail pharmacy

Goals:
  • Help patients find affordable options at pickup
  • Reduce rejected claims and abandoned prescriptions
  • Provide excellent patient counseling
Pain Points:
  • Limited time to research copay programs
  • Difficulty explaining pricing to frustrated patients
  • Manual process to find cash alternatives
P4

TechHealth Solutions - Health IT Company

B2B customer building care navigation app for payers and employers

Goals:
  • Add medication cost feature to existing chatbot
  • Provide value-add for employer clients
  • Integrate without rebuilding UI
Pain Points:
  • Don't want to build pricing engine from scratch
  • Need seamless integration with existing stack
  • Require reliable, real-time data

4. Technical Architecture

Technology Stack

Frontend

  • Framework: Next.js 16 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS v4
  • UI Components: shadcn/ui (Radix UI primitives)
  • State Management: React hooks + SWR for data fetching

Backend

  • API Routes: Next.js API routes (serverless)
  • AI/LLM: Vercel AI SDK with AI Gateway
  • Database: PostgreSQL (via Supabase or Neon)
  • Caching: Vercel Edge Cache + Redis (optional)
  • MCP Server: Model Context Protocol server implementation

System Components

1. Chat Interface (Frontend)

React component handling conversational UI, message display, and user input

/components/chat-interface.tsx

2. Mimi AI Engine (Backend)

LLM-powered agent that interprets user queries, manages conversation flow, and determines which APIs to call

/api/chat/route.ts
/lib/mimi-agent.ts

3. Data Aggregation Layer

Fetches and normalizes data from multiple sources (RxUtility API, insurance APIs, manufacturer sites)

/lib/data-sources/rxutility-api.ts
/lib/data-sources/insurance-pricing.ts
/lib/data-sources/manufacturer-coupons.ts

4. Price Comparison Engine

Logic to determine best price based on user's insurance status and location

/lib/pricing/compare-prices.ts
/lib/pricing/recommendation-engine.ts

5. MCP Server

Model Context Protocol server exposing Mimi's capabilities as tools for external chatbots

/mcp-server/index.ts
/mcp-server/tools/get-drug-prices.ts

6. Analytics & Logging

Track user queries, API performance, and product usage metrics

/lib/analytics/track-event.ts
/lib/logging/logger.ts

Architecture Diagram

┌─────────────────────────────────────────────────────────────────┐
│                         USER INTERFACE                          │
│  ┌──────────────────────┐        ┌──────────────────────┐      │
│  │   Chat Interface     │        │  Price Comparison    │      │
│  │   (React Component)  │        │    Cards UI          │      │
│  └──────────┬───────────┘        └───────────┬──────────┘      │
└─────────────┼──────────────────────────────┼─────────────────────┘
              │                              │
              ▼                              ▼
┌─────────────────────────────────────────────────────────────────┐
│                      MIMI AI ENGINE (Backend)                   │
│  ┌────────────────────────────────────────────────────────┐    │
│  │  LLM Agent (Vercel AI SDK)                             │    │
│  │  - Query interpretation                                │    │
│  │  - Conversation management                             │    │
│  │  - Educational responses                               │    │
│  └────────────────┬───────────────────────────────────────┘    │
└───────────────────┼─────────────────────────────────────────────┘
                    │
                    ▼
┌─────────────────────────────────────────────────────────────────┐
│               DATA AGGREGATION & PRICING LAYER                  │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐         │
│  │  RxUtility   │  │  Insurance   │  │ Manufacturer │         │
│  │     API      │  │    Pricing   │  │   Coupons    │         │
│  │              │  │  (RTPBC)    │  │   (Scraper)  │         │
│  └──────┬───────┘  └──────┬───────┘  └──────┬───────┘         │
│         │                  │                  │                 │
│         └──────────────────┼──────────────────┘                 │
│                            ▼                                    │
│            ┌──────────────────────────────┐                    │
│            │  Price Comparison Engine     │                    │
│            │  - Normalize data            │                    │
│            │  - Calculate best price      │                    │
│            │  - Apply business logic      │                    │
│            └──────────────────────────────┘                    │
└─────────────────────────────────────────────────────────────────┘
                            │
                            ▼
┌─────────────────────────────────────────────────────────────────┐
│                    INTEGRATION LAYER                            │
│  ┌────────────────────────────────────────────────────────┐    │
│  │                  MCP SERVER                            │    │
│  │  Exposes Mimi capabilities as tools for integration   │    │
│  └────────────────┬───────────────────────────────────────┘    │
└───────────────────┼─────────────────────────────────────────────┘
                    │
                    ▼
        ┌───────────────────────────────┐
        │  External Health IT Systems   │
        │  - EHR chatbots               │
        │  - Care navigation apps       │
        │  - Telehealth platforms       │
        └───────────────────────────────┘

5. Data Sources & APIs

RxUtility API - Cash Discount Prices

PRODUCTION READY

Aggregated cash discount prices across all major pharmacy chains

Base URL:https://api.rxutility.com/v1
Authentication:API Key (Header: X-API-Key)
Key Endpoints:
GET /cash-prices?drug=<drug_name>&zip=<zip_code>

Returns cash prices at pharmacies near zip code

Response Example:
{
  "drug": "Aripiprazole 5mg, 30 tablets",
  "prices": [
    {
      "pharmacy": "Walmart",
      "price": 15.71,
      "distance": "2.3 miles"
    },
    {
      "pharmacy": "Costco",
      "price": 27.99,
      "distance": "3.8 miles"
    }
  ]
}

RxUtility API - Copay Coupons

PRODUCTION READY

Manufacturer copay coupon programs for brand-name medications

Key Endpoints:
GET /copay-coupons?drug=<drug_name>

Returns available copay coupon programs

Response Example:
{
  "drug": "Abilify (Aripiprazole)",
  "coupon": {
    "available": true,
    "activation_required": false,
    "max_savings": "$5/month copay",
    "eligibility": "Commercially insured patients only",
    "url": "https://www.abilify.com/savings",
    "card_details": {
      "bin": "600426",
      "pcn": "54",
      "group": "4000011611"
    }
  }
}

Insurance Pricing API (Real-Time Pharmacy Benefit Check)

PARTNERSHIP NEEDED

Real-time insured price lookup via pharmacy benefit integration

Integration Options:
  • • Partner with RTPBC (Real-Time Pharmacy Benefit Check) provider
  • • Integrate with major PBMs (CVS Caremark, Express Scripts, OptumRx)
  • • Use NCPDP Telecom standards for pharmacy adjudication
Required Data Inputs:
  • Insurance member ID
  • BIN/PCN/Group from insurance card
  • Drug NDC (National Drug Code)
  • Pharmacy NPI

Manufacturer Direct-to-Consumer Pricing

MANUAL CURATION

Direct pricing from manufacturer pharmacies (e.g., NovoCare for Wegovy)

Implementation Approach:
  • • Manually curate list of manufacturer DTC programs
  • • Web scraping for pricing updates (with rate limiting)
  • • Store in internal database with weekly refresh
  • • Focus on high-cost specialty medications first
Example Programs:
  • NovoCare Pharmacy (Wegovy, Ozempic) - $699-799/month
  • Lilly Direct (Zepbound) - $550/month

6. Feature Requirements

6.1 Conversational Chat Interface

User Stories

As a patient, I want to ask "What's the cost of Wegovy?" in natural language

So that I can quickly get pricing without filling out forms

As a user, I want Mimi to explain pharmacy terms like "copay coupon"

So that I understand my options without needing healthcare expertise

Acceptance Criteria

  • Chat interface accepts free-text queries about medication costs
  • Messages display in conversational format with clear sender distinction
  • Auto-scroll to newest message on each response
  • Loading state shown while Mimi processes query
  • Example queries displayed to guide users
  • Mobile-optimized with responsive text sizing and touch targets

Technical Implementation

// Chat message type
interface Message {
  id: string
  role: 'user' | 'assistant'
  content: string
  timestamp: Date
  priceCards?: PriceCard[]
}

// Send message to Mimi AI
async function sendMessage(message: string) {
  const response = await fetch('/api/chat', {
    method: 'POST',
    body: JSON.stringify({ message, conversationId })
  })
  return response.json()
}

6.2 Smart Data Collection

User Stories

As a user, I want Mimi to ask for my insurance info only when needed

So that I don't have to provide unnecessary information upfront

As an uninsured patient, I want to skip insurance questions

So that I can quickly see cash prices without answering irrelevant questions

Acceptance Criteria

  • When user asks about drug pricing, Mimi asks: "Do you have insurance?"
  • If "yes", follow-up question: "What is your insurance provider?"
  • Next question: "What's your zip code?" (for cash price pharmacy lookup)
  • User can respond "skip" or "no" to any question
  • Pricing display adapts based on available information
  • Store user context in conversation state (don't re-ask)

Business Logic

Decision Tree:
1. User asks about drug price
2. Check if we have insurance status
   - NO → Ask "Do you have insurance?"
     - YES → Ask "What is your insurance?"
     - NO → Skip to zip code
3. Check if we have zip code
   - NO → Ask "What's your zip code?"
   - SKIP → Don't show cash prices
4. Show prices based on available data:
   - Has insurance → Show insured + copay coupon + cash + DTC
   - No insurance → Show cash + DTC only
   - No zip code → Show insured + copay coupon + DTC only

6.3 Price Comparison Display

User Stories

As a patient, I want to see all pricing options side-by-side

So that I can easily compare and choose the most affordable option

As a user, I want the cheapest option clearly highlighted

So that I don't have to manually compare all prices

Acceptance Criteria

  • Display up to 4 pricing options in card format
  • Each card shows: price type, amount, eligibility, and key details
  • Best price gets "Best Price" badge and visual emphasis
  • Copay coupons show activation requirement and link
  • Cash prices show pharmacy name and distance
  • Cards are mobile-responsive (stack on small screens)

Price Card Components

Insured Price Card
  • • Insurance provider name
  • • Copay amount
  • • "Show at pharmacy with insurance card"
Copay Coupon Card
  • • Reduced copay amount
  • • Eligibility requirements
  • • BIN/PCN/Group (if no activation)
  • • "Activate Coupon" link (if required)
  • • Instructions for pharmacy use
Cash Discount Card
  • • Cash price amount
  • • Pharmacy name
  • • Distance from user
  • • "Don't use insurance" message
Manufacturer DTC Card
  • • Direct price amount
  • • Manufacturer pharmacy name
  • • "Ships to your home" message
  • • Link to manufacturer site

Best Price Logic

function determineBestPrice(prices, hasInsurance) {
  if (!hasInsurance) {
    // For uninsured: cheapest between cash and manufacturer DTC
    return Math.min(prices.cash, prices.manufacturerDTC)
  }
  
  // For insured: cheapest between all 4 options
  const allPrices = [
    prices.insured,
    prices.copayWithCoupon,
    prices.cash,
    prices.manufacturerDTC
  ]
  
  return Math.min(...allPrices)
}

6.4 Educational Content

User Stories

As a confused patient, I want to ask "What is a copay coupon?"

So that I understand my options before making a decision

As a user, I want clear explanations of when to use insurance vs cash

So that I don't accidentally invalidate my insurance coverage

Acceptance Criteria

  • Mimi can answer: "What is a copay coupon?"
  • Mimi can answer: "How is this different from a cash discount card?"
  • Educational responses emphasize key distinctions (with insurance vs without)
  • Clear language, no medical jargon
  • Example questions shown to encourage education

Required Educational Content

Q: What is a copay coupon?

A: A copay coupon is a discount card from a drug manufacturer that lowers your out-of-pocket cost when you use your commercial insurance. You present both your insurance card AND the copay coupon to the pharmacy, and the manufacturer covers part of your copay. These are only for patients with commercial insurance, not government plans like Medicare or Medicaid.

Q: How is this different from a cash discount card?

A: Great question! A copay coupon is used WITH your commercial insurance to reduce your copay. A cash discount card means you DON'T use your insurance at all - you're paying cash instead. Sometimes the cash price is cheaper than your insurance copay, especially for generic medications. However, cash payments won't count toward your deductible.

Q: What is manufacturer direct-to-consumer pricing?

A: Some drug manufacturers run their own pharmacies where you can buy medications directly from them, often at a set price. For example, NovoCare Pharmacy ships Wegovy directly to your home for a fixed monthly fee. This is another cash option (doesn't use insurance) but may be more convenient or affordable than retail pharmacies.

7. User Flows

Flow 1: Insured Patient Checking Wegovy Cost

1
User: "What's the cost of Wegovy?"
2
Mimi: "I can find that information for you! Do you have health insurance?"
3
User: "Yes"
4
Mimi: "Great! What is your insurance provider?"
5
User: "Blue Cross Blue Shield"
6
Mimi: "Perfect! What's your zip code so I can find nearby pharmacies?"
7
User: "37215"
8
Mimi: Displays 4 price cards:
  • • Insured Price: $1,072
  • • Copay Coupon: $25 (BEST PRICE - highlighted)
  • • Cash at Costco: $1,349
  • • Manufacturer DTC: $699

Flow 2: Uninsured Patient Checking Abilify Cost

1
User: "How much is Abilify?"
2
Mimi: "I can find that information for you! Do you have health insurance?"
3
User: "No"
4
Mimi: "No problem! What's your zip code so I can find nearby pharmacies?"
5
User: "90210"
6
Mimi: Displays 1 price card:
  • • Cash at Walmart: $15.71 (BEST PRICE)

Note: Copay coupon NOT shown because user doesn't have insurance

Flow 3: Educational Question

1
User: "What is a copay coupon?"
2
Mimi: Provides educational explanation (see section 6.4)
3
User: "How is that different from a cash discount card?"
4
Mimi: Explains distinction between using insurance (copay coupon) vs not using insurance (cash discount)

8. MCP Server Integration

The MCP (Model Context Protocol) server exposes Mimi's pricing capabilities as tools that external chatbots can integrate. This allows health IT companies to add medication pricing to their existing products without building the full Mimi UI.

Architecture

┌─────────────────────────────────────────┐
│  Client's Existing Chatbot/AI Agent    │
│  (e.g., Care Navigation App)            │
└────────────────┬────────────────────────┘
                 │
                 │ MCP Protocol
                 ▼
┌─────────────────────────────────────────┐
│         RxUtility MCP Server            │
│  ┌────────────────────────────────┐    │
│  │  Tool: getMedicationPrices     │    │
│  │  Tool: explainCopayProgram     │    │
│  │  Tool: findNearbyPharmacies    │    │
│  └────────────────────────────────┘    │
└────────────────┬────────────────────────┘
                 │
                 │ Internal API
                 ▼
┌─────────────────────────────────────────┐
│     Mimi Core Pricing Engine            │
│  (Same logic as full Mimi product)      │
└─────────────────────────────────────────┘

The MCP server acts as a bridge between external chatbots and Mimi's pricing engine. Clients subscribe to the MCP server and their AI agents can invoke pricing tools as needed.

MCP Tools Specification

Tool 1: getMedicationPrices

Returns all available pricing options for a medication based on user context

Input Parameters:
{
  "drugName": "string (required)",
  "hasInsurance": "boolean (optional)",
  "insuranceProvider": "string (optional)",
  "zipCode": "string (optional)"
}
Output:
{
  "drug": "Wegovy 2.4mg pen",
  "prices": {
    "insured": {
      "amount": 1072,
      "provider": "Blue Cross Blue Shield",
      "available": true
    },
    "copayCoupon": {
      "amount": 25,
      "activationRequired": true,
      "url": "https://wegovy.com/savings",
      "eligibility": "Commercially insured patients only",
      "available": true
    },
    "cash": {
      "amount": 1349,
      "pharmacy": "Costco",
      "distance": "3.2 miles",
      "available": true
    },
    "manufacturerDTC": {
      "amount": 699,
      "provider": "NovoCare Pharmacy",
      "url": "https://novocare.com/pharmacy",
      "available": true
    }
  },
  "bestPrice": {
    "type": "copayCoupon",
    "amount": 25
  }
}

Tool 2: explainCopayProgram

Provides educational explanation of copay coupons and cash discount programs

Input Parameters:
{
  "topic": "copayCoupon" | "cashDiscount" | "manufacturerDTC"
}
Output:
{
  "topic": "copayCoupon",
  "explanation": "A copay coupon is a discount card from a drug manufacturer...",
  "useCase": "For patients with commercial insurance",
  "howToUse": "Present both your insurance card and copay coupon..."
}

Tool 3: findNearbyPharmacies

Returns list of pharmacies with cash prices for a specific medication

Input Parameters:
{
  "drugName": "string (required)",
  "zipCode": "string (required)",
  "radius": "number (optional, default: 10 miles)"
}
Output:
{
  "drug": "Aripiprazole 5mg, 30 tablets",
  "pharmacies": [
    {
      "name": "Walmart",
      "price": 15.71,
      "distance": 2.3,
      "address": "123 Main St, Nashville, TN 37215"
    },
    {
      "name": "Costco",
      "price": 27.99,
      "distance": 3.8,
      "address": "456 Oak Ave, Nashville, TN 37215"
    }
  ]
}

Integration Guide for Clients

  1. 1. Subscribe to MCP Server

    Client receives API credentials and MCP server endpoint

  2. 2. Configure LLM with MCP Tools

    Add RxUtility MCP tools to your AI agent's available tools

  3. 3. User Query Triggers Tool

    When user asks about medication costs, LLM invokes getMedicationPrices tool

  4. 4. Display Results

    Client's UI displays pricing data in their own design system

9. Non-Functional Requirements

Performance

  • • Chat responses within 2 seconds
  • • Price data loaded within 3 seconds
  • • API response time < 500ms (p95)
  • • Support 1000 concurrent users
  • • 99.9% uptime SLA

Security

  • • HTTPS/TLS encryption for all traffic
  • • No storage of PHI (patient health info)
  • • API key authentication for MCP server
  • • Rate limiting: 100 requests/minute per user
  • • HIPAA compliance ready (no PII stored)

Scalability

  • • Serverless architecture for auto-scaling
  • • Edge caching for static content
  • • Redis for pricing data cache (5 min TTL)
  • • Horizontal scaling for API routes
  • • CDN for global low-latency access

Mobile

  • • Fully responsive on all screen sizes
  • • Touch-optimized UI (44px tap targets)
  • • Works on iOS Safari and Android Chrome
  • • Progressive Web App (PWA) capable
  • • Fast mobile load time (< 3 seconds)

Accessibility

  • • WCAG 2.1 Level AA compliance
  • • Screen reader compatible (ARIA labels)
  • • Keyboard navigation support
  • • Sufficient color contrast (4.5:1 min)
  • • Focus indicators on all interactive elements

Monitoring

  • • Real-time error tracking (Sentry)
  • • API performance monitoring
  • • User analytics (anonymized)
  • • Uptime monitoring with alerts
  • • Log aggregation for debugging

10. Success Metrics

Product Metrics

User Engagement
  • • Daily Active Users (DAU)
  • • Average queries per session
  • • Session duration
  • • Return user rate
Conversion
  • • Copay coupon click-through rate
  • • Manufacturer DTC link clicks
  • • Completed price lookups
  • • Educational content views
API/MCP Usage
  • • MCP server API calls per day
  • • Number of active integrations
  • • API error rate (< 1%)
  • • Average response time
Business
  • • MRR from MCP subscriptions
  • • Customer acquisition cost (CAC)
  • • Customer lifetime value (LTV)
  • • Churn rate (< 5% monthly)

Success Criteria (6 Months Post-Launch)

  • 🎯
    10,000+ monthly active users

    Across full Mimi product and MCP integrations

  • 🎯
    5+ MCP server subscribers

    Health IT companies with active integrations

  • 🎯
    > 50% of users find lower price option

    Users discover savings vs their default insurance copay

  • 🎯
    4.5+ star rating from users

    High satisfaction with price transparency and ease of use

  • 🎯
    < 2 second average response time

    Fast, responsive user experience

Appendix

References

Questions or Feedback?

This PRD is a living document. If you have questions or suggestions for the IT lead or product team, please reach out.