The Technology Behind ESQ CoPilot
An MCP server that gives ChatGPT, Claude and other AI apps a rule-bound connection to more than 1 million licensed U.S. lawyers from official state licensing records. Consent is bound to the exact words, every status means one thing, and the core listing rules are proven in Lean 4 and re-checked on every change.
- Protocol
- Model Context Protocol, streamable HTTP
- Registry
com.esqcopilot/matching-engine- Published tools
- 26, including older names kept for compatibility
- Intake standard
- OLIP 1.0, open, works with MCP
- Formal proofs
- 44 theorems, Lean 4, kernel-checked in CI
- Differential check
- 1,500 production cases compared to the proven model
01 · Architecture
Five Layers, Six Guarantees That Cross All of Them
People work where they already are: inside ChatGPT, Claude, other MCP apps, our website or a firm’s own AI. Instructions shape how the AI behaves, open protocols carry each request, the ESQ Matching Engine applies the rules, and the data layer keeps every fact tied to its source. The guarantees on the right hold at every layer.
02 · Request Lifecycle
From a Plain Question to One Approved Message
A full journey takes sixteen steps between five parties. The AI app does the talking; the engine does the deciding about what is eligible and what may be sent. The step in red is the only one that unlocks sending, and only the person can take it.
- The person to AI app + skillDescribes the problem in plain words
- AI app + skill to ESQ Matching Engine
get_search_filters - ESQ Matching Engine to AI app + skillMissing: state, type of matter
- AI app + skill to The personConfirms the filters
- AI app + skill to ESQ Matching Engine
search_attorneys (filters + sort) - ESQ Matching Engine to Listing dataEligible, licensed lawyers only
- Listing data to ESQ Matching EngineFacts with source and date
- ESQ Matching Engine to AI app + skillListings in the person's order, labeled
- The person to AI app + skillPicks a lawyer, writes a message
- AI app + skill to ESQ Matching Engine
preview_client_message - ESQ Matching Engine to AI app + skillExact text, recipient, shared details
- AI app + skill to The personShows the preview
- The person to AI app + skillSays yes to that exact version
- AI app + skill to ESQ Matching Engine
send_client_message - ESQ Matching Engine to Lawyer pickedOne message, sent once
- ESQ Matching Engine to AI app + skillStatus: sent only after it went out
03 · Inside the Engine
A Deterministic Pipeline, Not a Black Box
Each search runs through the same fixed stages. The reader that turns plain words into filters uses fixed word rules, with no AI model and no per-request cost, so the same words always give the same reading.
- Plain-language readerEvery field is marked STATED in the person’s words or DEDUCED from them. Deductions go back to the person to confirm.
- Eligibility gateOnly an active license in the matter’s state qualifies. Lawyers whose employer is a court, government agency or the military are left out by default.
- FiltersPractice area, place, language and the lawyer’s own stated limits, such as sides they do not represent.
- Person’s sortThe person picks the order. Ties keep a fixed shuffle seeded by the lawyer and the filters, so no one gets a standing advantage.
- Evidence labelsEvery fact carries its basis, source and date, plus a confidence level with the share of facts that are known.
The six orders a person can pick
Every answer states the order it uses and that the order is not a judgment that any lawyer is better. Fees and availability older than a freshness window drop back to unknown instead of being shown as current.
04 · Evidence Model
Evidence Is Labeled, Never Upgraded
Every fact the engine returns says where it came from. A copied record is never presented as a fresh check, and a lawyer’s own description is never presented as official.
| Basis | Meaning |
|---|---|
| Official | Copied from the state licensing authority named on the profile, with its load date. |
| Self-reported | Stated by the lawyer, for example practice areas the lawyer edited. |
| Lawyer-provided | Supplied by the lawyer’s firm, such as fees or intake limits. |
| Person-provided | What the person said about the matter. |
| Estimated | A published range, labeled as an estimate. |
| Unknown | Not on file. Shown as unknown, never guessed. |
Simplified, fictional example of how one listing is labeled
// fictional lawyer, fictional data { "name": "Jordan Example", "license": { "status": "active", "basis": "official", "source": "State licensing authority", "last_official_check": "unknown" }, "practice_areas": { "value": ["Landlord-tenant"], "basis": "self_reported" }, "fees": { "basis": "unknown" }, "data_confidence": { "level": "medium", "evidence_coverage_percent": 60 } }
05 · Skills
Packaged Know-How That Keeps the AI on the Rules
MCP gives an AI app tools. Skills tell it how to use them. A skill is a short package of instructions that the AI app loads only when a question needs it, so the rules arrive exactly when they matter. Our skills ship inside the ESQ CoPilot apps for ChatGPT and Claude.
Trigger
When to load
A one-line description the AI app reads to decide whether this skill fits the question.
Procedure
Steps in order
Confirm filters, search, show every listing in the person’s order, then offer next steps.
Tool map
Which call, when
Names the MCP tool for each step, so the app never improvises a send.
Guardrails
What never happens
Never pick or rank a lawyer, never say sent before it was, one send per yes.
Data rules
What to ask for
No government ID numbers, card numbers or health details in a message.
Examples
Worked cases
Short sample conversations that show the expected behavior.
Skills in the ESQ CoPilot apps
06 · Consent
Approval Is Bound to the Exact Words
Today, every message through ESQ CoPilot is previewed first: the exact text, the one recipient and every detail to be shared. It goes out only after the person says yes to that version, once. OLIP 1.0 turns that rule into a standard any system can implement and check.
- PreviewOne recipient, every shared field with its exact value, the purpose and the notice version.
- DigestA SHA-256 fingerprint of all of it. Change one word and the fingerprint changes.
- ApprovalOn a page the AI app cannot complete alone, with a one-time code sent to the person.
- AuthorizationSingle-use, short-lived, tied to that fingerprint. The host recomputes it at submit time.
- Signed receiptThe firm’s system signs what it received with Ed25519, so anyone can check it.
// OLIP 1.0, consent digest (Part 1, section 5.4) consent_digest = "sha256:" + hex(SHA-256(canonical_json({ olip_version, recipient_id, casebrief_id, casebrief_revision, purpose, mode, shared_fields: [{path, value}] sorted by path, notice_version })))
One recipient per approval
A preview naming more than one recipient is refused outright.
No silent edits
Any change after approval breaks the fingerprint, so the old approval stops working.
No double sends
An idempotency key makes a retry return the same result instead of sending again.
07 · Status Machine
Each Status Means One Thing, and Only the Right Party Can Set It
OLIP defines fifteen states and every allowed move between them. A move is accepted only from the party named for it, carrying the required evidence. An AI app can never mark a message delivered, and an automatic reply never counts as a person reading it.
draftAI appapprovedThe personrecordedHost systemqueuedHost systemsentEmail or delivery channeldeliveredFirm's intake system, signed receiptacknowledgedA person at the firmrespondedA person at the firmconsultation_requestedA person at the firmconsultation_confirmedA person at the firmcompletedA person at the firmcancelledPerson or app withdraws, from draft through sentexpiredApproval or hold window endedfailedDelivery attempts used updeclinedRecipient will not take the matter
08 · Formal Verification
The Core Rules Are Proven, Not Just Tested
We wrote the listing rules as mathematics in Lean 4, a proof assistant used for machine-checked mathematics, and proved them. Then we run the real production code on the same cases as the proven model and require identical answers. This runs on every proposed change and daily.
- Written rulesPlain policy: who is eligible, how labels work, what may never affect order.
- Lean 4 modelThe rules as definitions a computer can check.
- ProofsTheorems about the model, checked by the Lean kernel. An audit rejects shortcuts.
- Production runThe real engine answers the same 1,500 cases.
- CompareAny difference fails the build.
| What is proven | Plain meaning |
|---|---|
| Ads never change the order | Changing any advertising or billing data, for any lawyer, never changes the listing or its order. |
| The rule has teeth | A version that adds a payment to the score provably breaks that rule, so the rule is not empty. |
| Only eligible lawyers return | Every lawyer returned has an active license in the person’s state. Inactive, suspended, pending and unknown statuses never qualify, and a license in another state never counts. |
| Dates are never invented | The last official check date is only ever the recorded date, never today and never a copy date. |
| Labels stay honest | Practice areas are never labeled official, lawyer-edited ones stay self-reported, and a missing practice area always means low confidence. |
| Consent model | No receipt means no disclosure; wrong recipient, extra fields, expired, forged, withdrawn or reused receipts are denied; at most one delivery. |
Proofs cover the model of the rules; the 1,500-case comparison ties the model to production. The consent model is proven ahead of the receipt-based sending it describes.
09 · Threat Model
Built Against the Ways AI Systems Fail
OLIP ships with a published threat model. These are the risks that matter most when an AI app sits between a person and a lawyer, and the control for each.
| Risk | Control |
|---|---|
| An AI app approves for the person | Approval only on the host’s own page with a code sent to the person; the MCP adapter has no approve tool. |
| Silent edit after approval | The consent fingerprint covers the text, recipient, fields, purpose and notices, and is recomputed at submit. |
| Replay or duplicate sends | Required idempotency key and single-use approval. |
| Fake “the lawyer confirmed” | Recipient events only from authenticated firm credentials; receipts and events signed with Ed25519. |
| Prompt injection in case text | Case text is marked untrusted user data and never executed; state changes only through typed operations. |
| Overstated verification | Fixed evidence levels and display wording; a copied record must say it was not checked. |
| Case data in logs | Logs keep the route and status only; analytics keep coarse codes, never case facts. |
10 · For Law Firms
EsqHarness: The Firm’s Side of the Same System
EsqHarness connects a firm’s own Claude or ChatGPT to ESQ CoPilot. New client messages arrive as clean OLIP files, and the firm’s AI gets work tools whose output always stops at a lawyer’s approval.
- Client messageApproved by the person, with a receipt for each step.
- OLIP fileSummary and draft timeline, unclear dates flagged for the lawyer.
- Today pageEvery open matter in one list; documents become dated timelines linked to their source lines.
- DraftsClient email, cited chronology, missing-documents list, research questions.
- Lawyer approvesNothing reaches a client until a lawyer approves the exact words.
Citation check
Every cited case is looked up before filing
Citations the AI writes are checked against CourtListener, a public case-law database. Anything not found is clearly marked not verified for the lawyer to review.
Boundaries
Prepared for attorney review
Everything is a draft for the lawyer. ESQ CoPilot never calculates court or filing deadlines, and every listed lawyer is reachable the same way, with or without EsqHarness.
$149 per lawyer per month after 14 days.
11 · Stack
Technical Specification
| Server | TypeScript on Node.js, built on the official MCP TypeScript SDK; PostgreSQL database. |
| Interfaces | MCP over streamable HTTP at match.esqcopilot.com/mcp, no sign-in; REST API described in OpenAPI; both share one implementation. |
| Discovery | Official MCP Registry entry com.esqcopilot/matching-engine; server card at /.well-known/mcp.json; llms.txt guides for AI agents. |
| AI apps | ESQ CoPilot app in ChatGPT with skills; custom connector in Claude; any app that supports remote MCP servers. |
| Data | Official state licensing records as copied by the ESQ CoPilot Lawyer Directory, with load dates per state; lawyer-provided facts kept separate and labeled. |
| Intake standard | OLIP 1.0: JSON Schemas, OpenAPI 3.1 binding, MCP and A2A bindings, Ed25519 receipts over canonical JSON, a conformance suite. |
| Assurance | Lean 4 proofs with an axiom audit, differential testing against production, negative controls, and a copy check that blocks wording a listing service may not use. |
| Also on MCP | The AI Practice Risk Score runs as its own MCP server and as a Claude plugin, so lawyers can take it inside their AI app. |
Notice. ESQ CoPilot is a listing service, not a lawyer referral service, and it does not give legal advice. OLIP 1.0 was published on November 10, 2026 by its initial sponsor, Digital Crossings Inc, and is open to independent contributors. ChatGPT, Claude, Lean and CourtListener are names of their owners; their mention does not mean endorsement.