Nathan Gomes All projects

Project 05 - AI Connector

Private Claude MCP Portfolio Connector

A private data-and-tools layer that connects directly to Claude, giving it verified, structured knowledge of a multifamily property portfolio - so a real question about a building gets a correct, source-backed answer without anyone locating and uploading documents first.

This pilot runs entirely on fictional sample data. No real client, tenant, or financial information is used or shown.
Role
Sole builder - schema, logic, connector, deploy
Stack
Python · MCP · SQLite → PostgreSQL · AWS Lambda · Docker
Status
Live pilot - Lambda Function URL serving all 8 tools
Verified
32 / 32 evaluation checks passing

8

Read-only tools

32/32

Eval checks passing

9

Test categories

$0

Monthly hosting cost

The problem

Claude is already good at answering. The hard part is context.

Claude can summarize documents, compare files, and answer general real-estate questions. But it depends on someone supplying the right documents and business context every single time - which means the answer is only as good as whoever went looking for the files.

This project removes that step. It gives Claude a private, permanent, verifiable memory of the portfolio behind the scenes, so the question "what's going on with Cedar Place?" returns a real briefing instead of a request for attachments.

Architecture

Six layers sit between the source files and Claude. Claude never gets raw database or file-system access - only a small set of controlled, read-only tools that return structured, cited answers.

  1. 01

    Source files

    Invoices, contracts, work orders, inspection reports, notes

  2. 02

    Ingestion & validation

    Deduplication, OCR, classification, entity resolution, confidence scoring

  3. 03

    Structured portfolio database

    Properties, aliases, vendors, equipment, maintenance, contracts, invoices, utility readings, findings, audit log

  4. 04

    Searchable document index

    Metadata-filtered, property-scoped retrieval over chunked documents

  5. 05

    Business logic & analytics

    Deterministic calculations - Claude never does the arithmetic itself

  6. 06

    Private Claude connector (MCP)

    Read-only tools, structured JSON responses, full audit logging

The connector

Eight read-only tools exposed to Claude

Built on the Model Context Protocol - the same standard Claude uses for any custom connector - and verified with a real MCP client over both stdio and HTTPS transports. Every call is written to an audit log table.

resolve_property

Turns a name, alias, address, ownership entity, accounting code, or utility account into a canonical property record.

get_property_summary

Full briefing: profile, open findings, recent maintenance, top expenses, upcoming deadlines.

search_property_documents

Property-scoped document search that never crosses property boundaries.

get_expense_history

Deterministic totals by category and date range, from approved invoices only.

get_maintenance_history

Maintenance events with automatic repeat-issue detection and cost totals.

get_open_anomalies

Open findings - utility anomalies, repeat repairs, conflicting records.

get_contract_deadlines

Contracts with a termination-notice or expiry deadline inside a given window.

get_utility_anomalies

Flags billing periods above a trailing baseline, with estimated annual cost exposure.

Testing

Evaluated against every required test category

A 32-question suite covering identity resolution, expense totals, maintenance history, document retrieval, contract dates, missing information, conflicting records, and cross-property isolation.

Property identity resolution - names, aliases, accounting codes8/8
Ambiguous or unverified property names correctly flagged2/2
Expense totals - category and date-range filters6/6
Maintenance history and repeat-repair detection3/3
Document retrieval and type filtering3/3
Contract deadline window logic2/2
Missing-information handling - no fabricated numbers3/3
Conflicting-records disclosure2/2
Cross-property data isolation3/3

Two real snags

A resolver that trusted the wrong alias

The original resolver treated an exact match on any alias as high confidence - including an unverified one like a loose folder name. Writing the evaluation suite surfaced it. Now unverified matches return confidence: "low" with an explicit warning instead of resolving silently, which is exactly what the spec required: never quietly select a value.

The MCP SDK's HTTP app doesn't fit Lambda

The SDK's built-in streamable-HTTP app runs a session manager designed for a long-lived server process; it can't be re-entered per invocation and raised a RuntimeError on the second call. Rather than force the mismatch, the Lambda handler talks directly to the same registered tools and implements only the JSON-RPC methods a client actually needs - verified against simulated cold starts and a read-only filesystem, with audit logs falling back to /tmp.

Where it stands

Curated database pilotDone
Document retrievalDone - pilot-grade
MCP connector - 8 tools, stdio + HTTPDone
Evaluation suite - 32 checksDone
AWS Lambda deploymentLive
Discovery with real questionsNext
Controlled pilot on real documentsPlanned
Portfolio-wide rolloutPlanned

The architecture is proven end to end, including a live endpoint. The honest gap: the real pilot can't start until the connector is registered in Claude and there's a real property with real documents behind it.