mortgage-qa-memory

mortgage-qa-memory

Enables Playwright QA automation with a custom Memory MCP that provides tiered retention and mortgage compliance audit, allowing AI agents to remember flakiness history and journey maps while adhering to data privacy and audit requirements.

Category
Visit Server

README

Mortgage QA Memory MCP

Repository: C:\Repo\mcp-memory
Status: Design & templates + working POC/MVP implementation. See IMPLEMENTATION.md for the runnable packages/* monorepo, docs/INTEGRATION.md, and docs/DEFINITION-OF-DONE.md.

A from-scratch design for Playwright QA automation with a custom Memory MCP, tiered retention, and mortgage compliance audit — adapted from DoorDash's agentic memory architecture and Salesforce Agentic Memory patterns.

See PROJECT-CONTEXT.md for how this repo was assembled and AGENTS.md for agent working rules.

Who this is for

  • Platform / QA engineers building internal AI tooling on Cursor, Gemini gateway, KB MCP, and Azure MCP
  • Mortgage technology teams that need QA intelligence without creating a second store of loan data or NPI
  • Teams evaluating Playwright MCP + a QA memory expander they control end-to-end

Document index

# Document Contents
01 Architecture Overview System diagram, components, data flow, build order
02 DoorDash Memory Pattern Review of DoorDash memory diagram; mapping to mortgage QA
03 QA Automation & Playwright MCP Browser automation, CI vs agentic modes, flakiness memory
04 Mortgage Compliance & Audit LL-2026-04, thin audit model, QC query surface
05 Data Retention & Privacy Tiered memory, deny-by-default writes, what never to store
06 Build From Scratch Repo layout, phased implementation, code patterns
07 MCP Tools Specification Full tool catalog, inputs/outputs, policy gates
08 Integration With Existing Stack Gateway, KB MCP, doc wizard, PR assistant, Azure, Cursor
09 Multi-Domain Memory (Namespaces) Extending memory across QA, PR, ops, compliance, product
10 DoorDash & Salesforce Deep Dive Primary reference to recreate memory architecture

Reference artifacts

Path Purpose
policies/mqm-policy.yaml Policy template: URLs, retention, deny patterns, write permissions
examples/journeys/le_generation.yaml Sample mortgage journey with TRID checkpoints
examples/ai-inventory.yaml LL-2026-04 AI tool inventory template
examples/cursor/mcp.json Cursor MCP server configuration
examples/cursor/skills/mortgage-qa-triage/SKILL.md Cursor skill for CI triage workflow

Executive summary

The problem

QA teams using AI agents (Cursor + Playwright MCP) face two opposing forces:

  1. Agents need memory — flakiness history, journey maps, locators, environment quirks — or they rediscover the same failures every session.
  2. Mortgage teams must not hoard sensitive data — NPI, raw snapshots, prompts with borrower fields, and unbounded long-term storage create compliance and security risk.

DoorDash's production memory architecture (see diagram in doc 02) solves a similar problem for consumer personalization by inserting policy enforcement before save and separating generation → pipeline → storage → retrieval.

This guide adapts that pattern for internal mortgage QA automation.

The solution: Mortgage QA Memory (MQM)

Layer Our implementation
Memory generation Playwright reporter + optional session notes from Cursor agents
Shared save pipeline Sanitize → extract facts → dedupe → classify (no raw snapshots)
Memory policy mqm-policy.yaml — retention, PII deny, URL allowlist, write tiers
Storage Tier 0 session (ephemeral) / Tier 1 operational (SQLite, 30d) / Tier 2 curated (git YAML)
Tooling Custom mortgage-qa-memory MCP server + official @playwright/mcp
Audit Thin append-only log via Gemini gateway — metadata long, evidence short
Eval Golden CI failure set; flake classification accuracy; checkpoint regression

What we explicitly do not build

  • Full loan file intelligence (buy Ocrolus / vendor doc AI)
  • Long-term storage of a11y snapshots, prompts, or network bodies
  • Agent-driven Playwright in production CI (deterministic tests only in CI)
  • Unapproved agent writes to curated journey/locator registries

Recommended build sequence

Week 1: Policy + Playwright reporter + SQLite (read-only MCP)
Week 2: Journey YAML + compliance checkpoints + Cursor skill
Week 3: Playwright MCP local triage + audit client
Week 4: CI artifact + purge jobs + golden eval set

See 06-build-from-scratch.md for full detail.


Architecture at a glance

flowchart TB
  subgraph gen [Memory Generation]
    CONV[Session notes Tier 0]
    CI[Playwright CI reporter]
    EVAL[Eval platform]
  end

  subgraph pipe [Shared Save Pipeline]
    SAN[Sanitize]
    EXT[Extract facts]
    DED[Dedupe and merge]
  end

  subgraph pol [Memory Policy - pre-save]
    RET[Retention rules]
    PII[PII deny patterns]
    PERM[Agent write permissions]
  end

  subgraph store [Storage]
    T0[(Session Redis 8h)]
    T1[(Operational SQLite 30d)]
    T2[(Curated journeys git)]
    AUD[(Audit metadata 365d)]
  end

  subgraph tools [MCP Tooling]
    MQM[mortgage-qa-memory MCP]
    PW[Playwright MCP]
  end

  subgraph agents [Agents]
    CUR[Cursor QA agent]
    PRA[PR assistant]
  end

  CONV --> SAN
  CI --> SAN
  SAN --> EXT --> DED --> pol
  pol -->|allow| T1
  pol -->|allow| T0
  pol -->|human approve| T2
  pol -->|deny| BLOCK[Blocked + audit]
  MQM --> T0 & T1 & T2 & AUD
  CUR --> MQM & PW
  PW --> AUD
  EVAL <--> T1
  PRA --> MQM

Key design decisions (locked)

Decision Choice Rationale
Browser execution Official @playwright/mcp for explore/repro only Accessibility snapshots, cross-browser, tracing
CI execution Deterministic playwright test + custom reporter No agent token burn or NPI leak in CI
Long-term QA facts Aggregates only (flake rate, signatures, pass/fail) User concern: don't store data we don't want long-term
Curated definitions Git-reviewed YAML (Tier 2) Human approval = compliance control
Audit Metadata 365d, evidence blobs 90d LL-2026-04 traceability without PII archive
Flakiness OSS Hybrid: borrow reporter pattern, own MCP + policy Speed + mortgage-specific control

Related external references


Next steps

  1. Review 05-data-retention-and-privacy.md with security / compliance
  2. Customize policies/mqm-policy.yaml for your staging URLs and retention windows
  3. Follow 06-build-from-scratch.md Week 1 checklist
  4. Add three journey YAML files for your highest-traffic borrower flows

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured