MIMI
Medication Cost Guide
Product Requirements Document
Version: 1.0
Date: January 2026
Owner: RxUtility Product Team
Status: Draft for Development
Table of Contents
- Executive Summary
- User Personas
- Technical Architecture
- Data Sources & API Integrations
- Feature Requirements
- MCP Server Integration
- User Flows
- Non-Functional Requirements
- Success Metrics
- Implementation Phases
- Open Questions & Decisions
- Dependencies & Risks
- Glossary
1. Executive Summary
1.1 Product Vision
Mimi is an AI-powered medication cost transparency platform that empowers patients, providers, and pharmacists to understand and access the lowest medication prices across all available options: insured copays, manufacturer copay coupons, cash discount prices, and direct-to-consumer manufacturer programs.
1.2 Business Objectives
- Reduce medication costs for end users by 30-70% through price transparency
- Enable healthcare IT companies to integrate price transparency into existing workflows via MCP Server
- Position RxUtility as the definitive source for comprehensive medication pricing data
- Create two revenue streams: Direct Mimi subscriptions and MCP Server API licensing
1.3 Target Users
- Primary: Patients seeking affordable medication options
- Secondary: Healthcare providers and pharmacists researching costs for patients
- Tertiary: Health IT companies, payers, and self-insured employers (B2B via MCP Server)
2. User Personas
2.1 Sarah - Uninsured Patient
Demographics: 34, self-employed, no health insurance
Goals: Find the absolute cheapest way to get her prescriptions
Pain Points: Can't afford medications at full retail price, doesn't know about manufacturer programs
Usage Pattern: Mobile-first, needs simple guidance
2.2 Dr. Martinez - Primary Care Provider
Demographics: 45, family medicine physician
Goals: Prescribe medications patients can actually afford
Pain Points: No visibility into patient costs at point of prescribing
Usage Pattern: Desktop during patient visits, needs quick answers
2.3 Jamie - Retail Pharmacist
Demographics: 29, chain pharmacy employee
Goals: Help patients save money at pickup
Pain Points: Limited time to research alternatives, patients upset at counter
Usage Pattern: Quick lookups during busy pharmacy hours
2.4 Marcus - Health IT Product Manager
Demographics: 38, works for benefits navigation platform
Goals: Add medication pricing to their existing member app
Pain Points: Building from scratch is expensive, needs reliable data source
Usage Pattern: API integration via MCP Server
3. Technical Architecture
3.1 Technology Stack
Frontend
- Framework: Next.js 16 (App Router)
- Language: TypeScript 5+
- Styling: Tailwind CSS v4
- UI Components: shadcn/ui
- State Management: React hooks + SWR for data fetching
Backend
- Runtime: Node.js 20+
- API Framework: Next.js API Routes
- Authentication: NextAuth.js or Supabase Auth
- Database: PostgreSQL (via Supabase or Neon)
- Caching: Redis (Upstash) for API response caching
AI/NLP
- Vercel AI SDK for chat interface
- GPT-4 or Claude for natural language understanding
- Custom intent recognition for medication queries
Deployment
- Platform: Vercel
- CDN: Vercel Edge Network
- Monitoring: Vercel Analytics + custom logging
3.2 Database Schema
users table
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
email VARCHAR(255) UNIQUE,
created_at TIMESTAMP DEFAULT NOW(),
last_active TIMESTAMP,
user_type VARCHAR(50) -- 'patient', 'provider', 'pharmacist'
);conversations table
CREATE TABLE conversations (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
user_id UUID REFERENCES users(id),
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW(),
metadata JSONB -- insurance info, zip code, etc.
);messages table
CREATE TABLE messages (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
conversation_id UUID REFERENCES conversations(id),
role VARCHAR(20), -- 'user' or 'assistant'
content TEXT,
pricing_data JSONB, -- structured price results
created_at TIMESTAMP DEFAULT NOW()
);price_cache table
CREATE TABLE price_cache (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
drug_name VARCHAR(255),
ndc VARCHAR(11),
zip_code VARCHAR(5),
insurance_type VARCHAR(100),
pricing_data JSONB,
expires_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW()
);4. Data Sources & API Integrations
4.1 RxUtility API - Copay Coupons
Base URL: https://api.rxutility.com/v1/copay-coupons
Endpoint: GET /search
Caching Strategy: Cache for 24 hours (coupons change infrequently)
4.2 RxUtility API - Cash Discount Prices
Base URL: https://api.rxutility.com/v1/cash-prices
Endpoint: GET /search
Caching Strategy: Cache for 6 hours (prices change frequently)
4.3 Insurance Price API (RTPBC)
Base URL: To be determined (partner integration)
Endpoint: POST /rtpbc/price-check
Caching Strategy: Cache for 1 hour per unique insurance + drug combination
4.4 Manufacturer DTC Programs
Source: Web scraping or manual data entry
Examples: NovoCare Pharmacy (Wegovy), Manufacturer direct-purchase programs
5. Feature Requirements
5.1 Chat Interface (MVP)
User Story: As a patient, I want to ask Mimi about medication costs in plain language so I can quickly understand my options.
Requirements
- Natural language input field with example prompts
- Conversational AI responses using Vercel AI SDK
- Message history preserved within session
- Auto-scroll to latest message
- Loading states during API calls
- Mobile-responsive design (primary use case)
Example Queries
- "What does Wegovy cost?"
- "How much is Abilify with insurance?"
- "What's the cheapest way to get my diabetes medication?"
Acceptance Criteria
- User can type medication name and receive price comparison
- System asks for missing information (insurance status, zip code)
- Responses appear within 3 seconds
- Chat history persists during session
- Works on mobile devices (320px+ width)
5.2 Information Collection Flow
User Story: As Mimi, I need to gather insurance status and zip code to provide accurate pricing.
Requirements
- Conversational approach to data collection
- Allow users to skip optional fields
- Remember information across queries in same session
- Clear explanation of why information is needed
Acceptance Criteria
- System asks for insurance status first
- If user has insurance, asks for provider name
- Asks for zip code last
- User can type "skip" to bypass any question
- Insured prices hidden if no insurance
- Cash prices hidden if no zip code
- Copay coupons hidden if no insurance
5.3 Price Comparison Display
User Story: As a user, I want to see all available prices side-by-side so I can choose the cheapest option.
Requirements
- Display up to 4 price types in card format
- Highlight the lowest price with badge
- Show relevant details for each price type
- Include actionable links (coupon activation, DTC enrollment)
- Responsive grid layout (mobile: stack, desktop: side-by-side)
UI Specifications
- Card padding: 1.5rem (24px)
- Card border: 1px solid border color
- Best price: Green border (2px), "BEST PRICE" badge
- Font sizes: Title (1.125rem), Price (2rem bold), Details (0.875rem)
- Mobile: Full width cards, stacked vertically with 1rem gap
- Desktop: Grid layout, 2-4 columns depending on available prices
5.4 Educational Content
User Story: As a user unfamiliar with medication pricing, I want to understand what copay coupons and cash discounts are.
Key Educational Topics
- What is a copay coupon?
- What is a cash discount card?
- What's the difference between copay coupons and cash discounts?
Acceptance Criteria
- Recognizes educational queries in natural language
- Provides clear, jargon-free explanations
- Explains when to use each price type
- Distinguishes between using insurance vs. not using insurance
- Includes example queries in UI for discoverability
6. MCP Server Integration
6.1 MCP Server Overview
The Model Context Protocol (MCP) Server allows external applications to integrate Mimi's pricing intelligence into their existing chatbots or applications.
Use Cases
- Health IT companies with existing member apps
- Telehealth platforms wanting to add pricing to consultations
- EHR vendors adding cost transparency to prescribing workflows
- Benefits navigation platforms showing medication affordability
6.2 MCP Server Tools
Tool 1: search_medication_prices
Description: Search for comprehensive medication pricing including insured, cash, copay coupon, and manufacturer direct prices.
Tool 2: explain_price_type
Description: Get educational content explaining different price types (copay coupons, cash discounts, etc.)
Tool 3: get_copay_coupon_details
Description: Retrieve full copay coupon information for a specific medication
6.3 MCP Server Technical Specifications
Authentication
- API Key-based authentication
- Keys generated per client organization
- Rate limiting: 1000 requests/hour per key (adjustable)
Rate Limiting
- Standard tier: 1,000 requests/hour
- Premium tier: 10,000 requests/hour
- Enterprise tier: Custom limits
Common Error Codes
DRUG_NOT_FOUND: Medication not in databaseINVALID_INSURANCE: Insurance information invalidMISSING_ZIP_CODE: Zip code required for cash pricingRATE_LIMIT_EXCEEDED: Too many requestsAUTHENTICATION_FAILED: Invalid API key
7. User Flows
7.1 Basic Price Query Flow
- User opens Mimi chat interface
- User types: "What does Wegovy cost?"
- Mimi responds: "I can find that for you! Do you have health insurance?"
- User responds: "Yes"
- Mimi asks: "What is your insurance provider?"
- User responds: "Blue Cross"
- Mimi asks: "What is your zip code?"
- User responds: "37203"
- Mimi fetches pricing data from multiple sources
- Mimi displays price comparison with all available options
- User reviews options and takes action
7.2 Uninsured User Flow
- User opens Mimi
- User types: "Abilify price"
- Mimi asks: "Do you have health insurance?"
- User responds: "No"
- Mimi asks: "What is your zip code?"
- User responds: "10001"
- Mimi displays available options (cash discount, manufacturer DTC)
- Note: Insured price and copay coupon are hidden
7.3 Educational Query Flow
- User types: "What is a copay coupon?"
- Mimi immediately responds with educational content
- No additional information needed
- User can ask follow-up questions or new price query
8. Non-Functional Requirements
8.1 Performance
Response Times
- Initial page load: < 2 seconds
- Chat message response (cached): < 500ms
- Chat message response (API calls): < 3 seconds
- MCP Server API: < 2 seconds (p95)
Scalability
- Support 10,000 concurrent users (Phase 1)
- Support 100,000 concurrent users (Phase 2)
- Handle 1M API requests/day via MCP Server
8.2 Security
Data Protection
- HIPAA compliance for PHI (if storing insurance member IDs)
- Encrypt all PII in database (insurance info, zip codes)
- TLS 1.3 for all API communications
- API keys rotatable by clients
- No storage of conversation content beyond 30 days
8.3 Accessibility
WCAG 2.1 Level AA Compliance
- Keyboard navigation support
- Screen reader compatibility
- Sufficient color contrast (4.5:1 minimum)
- Alt text for all images/icons
- Focus indicators on interactive elements
- Responsive text sizing (no horizontal scrolling)
8.4 Browser Support
- Chrome/Edge: Last 2 versions
- Safari: Last 2 versions
- Firefox: Last 2 versions
- Mobile Safari (iOS): Last 2 versions
- Chrome Mobile (Android): Last 2 versions
9. Success Metrics
9.1 User Engagement Metrics
- Daily Active Users (DAU): Target 10,000 DAU by Month 6
- Messages per Session: Target 5+ messages (indicates engagement)
- Conversion to Price Check: >70% of conversations result in price comparison
- Return Users: >40% of users return within 7 days
9.2 Business Metrics
- Cost Savings Delivered: Track total savings vs. regular pricing
- Copay Coupon Activations: Number of users who click activation links
- MCP Server Subscriptions: Target 10 B2B clients by Month 6
- MCP API Usage: Target 100K API calls/month from partners
9.3 Technical Metrics
- API Response Time: p95 < 2 seconds
- Uptime: 99.9%
- Cache Hit Rate: >80% for pricing queries
- Error Rate: <1% of requests
9.4 User Satisfaction
- NPS Score: Target 50+
- Support Ticket Volume: <5% of users require support
- Partner Satisfaction: Quarterly surveys for MCP Server clients
10. Implementation Phases
Phase 1: MVP (Months 1-2)
Deliverables
- Chat interface with basic NLP
- Integration with RxUtility API (copay coupons + cash prices)
- Information collection flow (insurance, zip)
- Price comparison display (2-4 price types)
- Basic educational responses
- Mobile-responsive design
- Deploy to production
Success Criteria
- 100 beta users testing successfully
- Average response time < 3 seconds
- Positive user feedback (NPS >30)
Phase 2: Enhanced Features (Months 3-4)
Deliverables
- Insurance pricing integration (RTPBC)
- Manufacturer DTC program data
- User accounts and conversation history
- Enhanced NLP for complex queries
- Provider/pharmacist personas
- Advanced caching and optimization
Success Criteria
- All 4 price types available
- 1,000+ active users
- Response time < 2 seconds
Phase 3: MCP Server (Months 4-5)
Deliverables
- MCP Server API with 3 core tools
- API key management system
- Client libraries (TypeScript, Python)
- Technical documentation for partners
- Rate limiting and monitoring
- First 3 B2B integrations
Success Criteria
- 3+ partners integrated
- 10K+ API calls/month
- 99.9% uptime
Phase 4: Scale & Optimization (Month 6+)
Deliverables
- Advanced analytics and reporting
- A/B testing framework
- Enhanced personalization
- Additional MCP Server tools
- Enterprise features (SSO, custom branding)
- International expansion prep
Success Criteria
- 10,000+ DAU
- 10+ MCP Server clients
- Profitability metrics achieved
11. Dependencies & Risks
11.1 External Dependencies
- RxUtility API: Core dependency for copay coupons and cash prices
- Risk: API downtime affects all functionality
- Mitigation: Implement fallback caching, SLA with RxUtility
- Insurance Pricing Partner: Required for insured price data
- Risk: Integration delays, data accuracy issues
- Mitigation: Build MVP without this, add in Phase 2
11.2 Technical Risks
- Performance at Scale: Multiple API calls per query could slow response times
- Mitigation: Aggressive caching, parallel API calls, CDN
- Data Accuracy: Pricing data changes frequently
- Mitigation: Cache invalidation strategy, freshness indicators
11.3 Business Risks
- Regulatory Changes: Medication pricing transparency laws evolving
- Mitigation: Legal review, adaptable architecture
- Competition: GoodRx, SingleCare already in market
- Mitigation: Differentiate with comprehensive pricing + AI interface
12. Glossary
- BIN (Bank Identification Number)
- 6-digit number identifying pharmacy benefit manager
- Cash Discount Price
- Medication price without insurance, using discount card (GoodRx, SingleCare)
- Copay Coupon
- Manufacturer savings program that reduces copay when using commercial insurance
- DTC (Direct-to-Consumer)
- Manufacturer program selling directly to patients
- MCP (Model Context Protocol)
- API standard allowing AI assistants to integrate external tools
- NDC (National Drug Code)
- 11-digit number uniquely identifying drug product
- PCN (Processor Control Number)
- Identifies specific plan within a BIN
- RTPBC (Real-Time Pharmacy Benefit Check)
- Live query to get patient-specific insurance pricing