Back to all days

Day 9 — AI Engineering / Legal

AI Document Analyzer

Hand it a contract. Get back: parties, key dates, obligations, red flags.

An MCP server that turns a stack of legal documents into a queryable knowledge base. Ask about any contract in plain English — no more ctrl+F through 30-page PDFs.

Example Queries

“What contracts are expiring in the next 6 months?”
“Show me all high-severity red flags across our documents”
“What are Cascade Digital’s obligations under the lease?”
“Does the CloudVault license auto-renew? When do we need to cancel by?”
“What non-compete clauses do we have and are any high risk?”
“What deadlines are coming up in the next 30 days?”

Tools

6 MCP Tools

ToolWhat It Does
document_searchSearch and browse contracts by title, type (MSA, NDA, lease, etc.), or status
party_lookupFind parties across all documents — names, roles, entity types, and contact info
key_dates_trackerTrack deadlines, expirations, and renewal dates — flags overdue items
obligation_trackerParty obligations grouped by document — payment terms, compliance, restrictions
clause_analyzerAnalyze clauses across documents — termination, IP, non-compete — with risk levels
red_flagsSurface risks and red flags — severity-ranked with section refs and recommendations

Why This Build

Why Document Analysis?

Every company has a drawer full of contracts they signed but never read again. The lease auto-renewed. The non-compete is unenforceable. The vendor agreement expired three months ago.

Legal teams charge $500/hour to read these. Paralegals spend days building clause comparison spreadsheets. Meanwhile, the CEO asks “when does our office lease expire?” and nobody knows without digging.

This is the first AI Engineering build in the challenge. Same MCP pattern, but the value proposition shifts from “query your data” to “understand your documents.”

Demo Data

What's Inside

10

Documents

20

Parties

31

Key Dates

26

Obligations

25

Clauses

14

Red Flags

10 realistic legal documents for a mid-size digital agency: MSA, NDA, commercial lease, software license, employment agreement, contractor agreement, partnership, vendor contract, settlement, and a DPA under review. Includes edge cases — an expired vendor contract, a settlement with payment deadlines, an auto-renewing license with an 8% increase, and a non-compete that may not be enforceable in California.

Setup

Try It Locally

cd day09-document-analyzer
npm install && npm run seed && npm run build

Then add the config to Claude Desktop and restart.

Drowning in contracts?

If your team spends more time searching for answers in documents than acting on them, let's build something better.