Inspiration

Across the $600B+ North American residential HVAC, plumbing, and appliance repair sector, 34% to 37% of all field service dispatches fail to resolve the equipment fault on the first visit. Field service telemetry shows that the root cause is rarely technician competency—it is an information and inventory asymmetry at the moment of booking known in the trades as the "Second Truck Roll."

Conventional scheduling platforms—and naive LLM voice wrappers—treat home repair as a calendar-slot matching problem. Even when a homeowner provides a model number (for example, a Bosch 800 Series Dishwasher SHPM65Z55N/01), OEMs frequently revise internal electromechanical sub-assemblies mid-cycle without altering the exterior model badge:

  • Manufacturing Batch FD97–FD98 (2017–2018): Requires BOSCH-00611332 ($46.00 AC Synchronous Twist-Lock Drain Pump with twin spade terminals).
  • Manufacturing Batch FD99+ (2019–Present): Requires BOSCH-00631200 ($42.00 3-Prong Brushless DC Inverter Drain Pump with an incompatible bayonet housing).

When a dispatcher routes the earliest open van without disambiguating the serial batch or verifying physical on-truck stock, the technician arrives empty-handed, collects a diagnostic fee, places a parts backorder, and schedules a return visit 10 to 14 days later. Each wasted truck roll destroys $150 to $180 in unbillable technician labor, fleet fuel, and lost opportunity cost:

$$\Delta E[\text{Margin per Dispatch}] = \left(\text{FTFR}{\text{FirstFix}} - \text{FTFR}{\text{Industry}}\right) \times C_{\text{TruckRoll}} - C_{\text{Compute}} = (0.96 - 0.63) \times \$165.00 - \$0.004 \approx +\$54.45\text{ net value/job}$$

We built FirstFix MCP to transform Alexa+ (Echo Show 15) and Ring from passive smart-home endpoints into a zero-hallucination, multimodal pre-dispatch diagnostic, serial-variant OEM Bill-of-Materials (BOM) resolver, stock-aware booking engine, and cryptographic smart-access controller.


What it does

FirstFix MCP orchestrates an end-to-end B2B2C residential repair transaction across voice, camera vision, touch-screen MCP Apps, agentic commerce, fleet inventory, and smart-doorbell arrival verification:

  1. Pre-Inference <2ms Life-Safety Emergency Intercept (check_life_safety_hazard): Before invoking any foundation model or commercial booking flow, a deterministic state machine screens user utterances for life-safety hazards: mercaptan gas odors ("rotten eggs"), carbon monoxide alarms, 240V electrical arcing, or active main-line water bursts. On detection, FirstFix halts commercial dispatch in <2ms and renders ui://firstfix/emergency-shutoff.html on Echo Show 15 with mechanical shutoff diagrams and evacuation directives.
  2. Multimodal Rating-Plate OCR (Amazon Bedrock Nova Pro) & <0.90 Human-in-the-Loop Gate: The homeowner presents their appliance rating plate to the Echo Show 15 camera or states their fault symptom. Amazon Bedrock Nova Pro (us.amazon.nova-pro-v1:0 in us-east-1) extracts structured telemetry (brand, modelNumber, serialNumber, errorCode, ocrConfidence). If optical confidence falls below 0.90 (e.g., 0.82 on a scratched or angled FD98 label), FirstFix refuses to guess—it pauses autonomous booking and renders an amber confirmation gate inside ui://firstfix/diagnostic-intake.html alongside a 90-second tool-free DIY pre-check (such as verifying the sump filter cover is snapped shut).
  3. Deterministic Serial-Variant OEM BOM & Warranty Resolution (diagnose_equipment_and_bom in <15ms): To guarantee zero hallucinated SKUs or prices, an LLM is never permitted to invent part numbers. Our deterministic BOM engine evaluates Brand + Model + Serial/FD Prefix + Fault Code across 15 residential fault rules × 2 serial batches (30 BOM variants spanning Bosch, Rheem, Carrier, Whirlpool, GE, Trane, A.O. Smith, Samsung, LG, KitchenAid, Lennox, Maytag, Bradford White, Frigidaire, and Moen), computes factory warranty coverage from installation dates, and outputs the exact counterfactual sibling SKU to prove why serial-batch disambiguation is mandatory. Unlisted models return PART_VERIFICATION_REQUIRED.
  4. Stock-Aware Contractor Van Routing (get_stocked_van_availability): Rather than sorting contractors solely by earliest calendar slot, FirstFix joins the resolved OEM SKU against real-time mobile warehouse inventory across 4 regional contractor vans (van_apex_04, van_metro_02, van_precision_01, van_valley_07). For BOSCH-00631200, it automatically filters out Metro Rapid Appliance (van_metro_02) (0 units on truck, despite having an earlier 13:30 slot) and recommends Apex Home Services (van_apex_04 — Tech: Marcus Vance, 2 units on truck at 14:00).
  5. 1-Tap Amazon Pay UCP Checkout, Local Booking SPI & B2B FSM Webhook Dispatch: Inside ui://firstfix/stocked-pro-carousel.html, tapping "Lock Part & Pay $85.00 (Amazon Pay UCP)" emits a spec-compliant JSON-RPC 2.0 ui/message payload (action: "initiate_checkout"), executing the Universal Commerce Protocol (dev.ucp.shopping.checkout 2026-01-11) with 24-hour SHA-256 Idempotency-Key enforcement (HTTP 409 Conflict on mutated payloads), atomically decrementing van stock (2 → 1), booking the slot via Alexa+ Local Booking SPI with a shared HMAC-SHA256 correlationToken, and dispatching a structured ServiceTitan v2 / Jobber / Housecall Pro FSM webhook.
  6. Ring Smart Arrival Access Window & Camera Verification (configure_ring_arrival_access): Bound to the same correlationToken, FirstFix provisions a time-bounded single-entry Ring Smart Access Window (14:00–15:30). When verified technician Marcus Vance arrives at the Ring Battery Doorbell Pro camera, his credential matches the token (✓ ACCESS GRANTED); unauthorized or out-of-window visitors are rejected (HTTP 403 ACCESS DENIED) and recorded in an immutable security audit log.

How we built it

We engineered FirstFix MCP as a modular TypeScript (ES2022 / NodeNext) monorepo deployed live on AWS us-east-1 (https://qe2khmjs7zmipvuuk2ailnsq340lfhrg.lambda-url.us-east-1.on.aws/):

  • MCP 2025-11-25 Streamable HTTP Server (src/server/mcpServer.ts): Built on @modelcontextprotocol/sdk (v1.32.1) and @modelcontextprotocol/ext-apps (v2.0.3), exposing 5 MCP tools (diagnose_equipment_and_bom, get_stocked_van_availability, reserve_part_and_slot, configure_ring_arrival_access, get_household_equipment_registry) and 3 sandboxed ui:// MCP App resources (mimeType: "text/html;profile=mcp-app").
  • Decoupled Multimodal Perception vs. Sub-35ms Deterministic MCP Execution: Because foundation model vision (ConverseCommand on us.amazon.nova-pro-v1:0) requires 1,440ms–2,800ms whereas Alexa+ MCP tools demand <500ms responses, we separated rating-plate OCR (/api/ai/extract-rating-plate) from our synchronous MCP tool handlers (POST /mcp), achieving 2ms–35ms p99 MCP tool execution.
  • Five-Protocol Interoperability Layer:
    1. Model Context Protocol (2025-11-25 Streamable HTTP & text/html;profile=mcp-app)
    2. Universal Commerce Protocol (dev.ucp.shopping.checkout 2026-01-11) (/.well-known/ucp, /checkout-sessions)
    3. Alexa+ Local Booking SPI (/v1/localbooking/businesses/:businessId/...)
    4. Ring Smart Arrival Access API (/v1/ring/access-windows, /v1/ring/simulate-arrival, /v1/ring/audit-logs)
    5. OAuth 2.1 PKCE (S256 per RFC 7636) & RFC 9728 Protected Resource Metadata (/.well-known/oauth-authorization-server, /.well-known/oauth-protected-resource, /oauth/authorize, /oauth/token, /oauth/verify)
  • AWS us-east-1 Serverless Cloud Topology (src/aws/ & template.yaml):
    • Compute: AWS Lambda (nodejs20.x, 512 MB RAM, 30s timeout) fronted by a public HTTPS AWS Lambda Function URL with custom in-memory loopback HTTP bridging (src/aws/lambdaHandler.ts).
    • Persistence: Amazon DynamoDB (FirstFixMcpState, PAY_PER_REQUEST) with non-blocking asynchronous write-through (PutItemCommand) and live state hydration/inspection (ScanCommand at GET /api/aws/dynamo-records).
    • Multimodal AI: Amazon Bedrock Nova Pro (us.amazon.nova-pro-v1:0) in us-east-1.

Challenges we ran into

  1. Resolving the Multimodal LLM Cold-Start (2.8s–4.5s) vs. Alexa+ <500ms Voice SLA Paradox: Placing BedrockRuntimeClient.send(new ConverseCommand(...)) directly inside an MCP tools/call handler violates the <500ms Alexa+ voice responsiveness budget. We solved this by architecting a two-phase pipeline where Nova Pro hydrates the rating-plate state asynchronously while all 5 MCP tools operate deterministically in <35ms.
  2. Stateless MCP Streamable HTTP Header Negotiation (HTTP 406) & Express Stream Consumption: @modelcontextprotocol/sdk's StreamableHTTPServerTransport rejects JSON-RPC clients with 406 Not Acceptable unless Accept contains both application/json and text/event-stream, and hangs if express.json() drains the request stream before transport.handleRequest(req, res, req.body). We solved both and open-sourced the middleware in alexa-plus-ucp-mcp-kit.
  3. Eliminating Iframe ResizeObserver Feedback Loops in text/html;profile=mcp-app: Measuring document.documentElement.scrollHeight inside an MCP App iframe while adding vertical padding in the parent host created an infinite +28px height expansion loop. We resolved this by measuring only the inner #mcp-app-root.offsetHeight container with a clamped deadband ([420px, 640px]).
  4. Atomic Van Inventory Holds Across Concurrent Protocol Paths: Because a booking can be triggered via orchestrator auto-reserve, direct MCP tool call (reserve_part_and_slot), or UCP checkout completion, naive stock decrements risked double-holding parts. We implemented idempotent part-hold tracking (activePartHolds) keyed by ${correlationToken}:${vanId}:${oemPartSku}.

Accomplishments that we're proud of

  • True 5-Protocol Convergence in a Single Live AWS Deployment: Delivering MCP 2025-11-25, Interactive ui:// MCP Apps, UCP 2026-01-11 Checkout, Alexa+ Local Booking SPI, Ring Smart Arrival Access, and OAuth 2.1 PKCE (S256) / RFC 9728 on a live us-east-1 endpoint (https://qe2khmjs7zmipvuuk2ailnsq340lfhrg.lambda-url.us-east-1.on.aws/).
  • 90 / 90 Automated Tests Passing (100% Pass Rate Across 10 Suites): Comprehensive test coverage verifying PNG binary IHDR headers, sub-35ms BOM resolution, <2ms gas-leak halts, <0.90 OCR confirmation gates, UCP 409 Conflict idempotency, OAuth 2.1 401 RFC 9728 headers, and live public HTTPS smoke tests.
  • Published Open-Source Ecosystem Tooling: Publishing alexa-plus-ucp-mcp-kit to the public npm registry (npm install alexa-plus-ucp-mcp-kit) and opening Pull Request #14 on AmazonAppDev/devices-agent-skills.

What we learned

  • AI for Perception, Deterministic Engines for Physical & Financial Contracts: In high-stakes home services, foundation models excel at unstructured perception (reading a tilted, grease-stained rating plate or parsing natural-language symptoms), but part compatibility, safety shutoffs, and binding price estimates must be governed by deterministic state machines.
  • Cryptographic Correlation Tokens Are Essential for Multi-Device Flows: Bridging an Echo Show 15 checkout in the kitchen (UCP) with a contractor's dispatch software (Local Booking SPI / ServiceTitan) and a front-door camera (Ring) requires a shared, tamper-evident correlationToken lifecycle.

What's next for FirstFix MCP: Alexa+ & Ring Stocked-Van Repair Agent

  1. Live Bi-Directional ERP & Distributor Inventory Sync: Connecting our /v1/fsm/* webhook engine directly to live ServiceTitan, Housecall Pro, and Jobber OAuth APIs alongside regional OEM parts distributors (Marcone, Ferguson, Johnstone Supply) for automated same-morning will-call part replenishment when no local van carries a rare SKU.
  2. Acoustic Fault Fingerprinting via Echo Show Microphones: Expanding our multimodal perception layer to analyze compressor short-cycling, drain-pump cavitation, and furnace inducer-motor bearing whine via short audio spectrograms alongside rating-plate OCR.
  3. Ring Intercom & Smart Lock Hardware Pilot: Expanding our Ring Smart Arrival controller to trigger real-time two-way Ring Intercom voice verification and temporary Z-Wave smart-lock PIN provisioning for unattended utility-room repairs.

Built With

Share this project:

Updates

Submission history