Skip to main content
Glama
Lease Intelligence MCP Server

Lease Intelligence MCP Server

Lease Intelligence Crew

A multi-agent system for commercial real-estate lease analysis, built with LangGraph. A supervisor routes an analyst's question to specialist agents — RAG over lease documents, live market research, and a human-in-the-loop analyst that runs code only after approval — with persistent memory and structured lease abstraction. The same capabilities are also exposed over an MCP (Model Context Protocol) server. Provider-agnostic across Azure OpenAI, AWS Bedrock, Google Gemini, and Anthropic.

What it does

  • Portfolio Q&A (RAG): ask questions about a folder of commercial lease PDFs and get grounded, cited answers — or an honest "I don't know" when the answer isn't in the documents.

  • Lease abstraction: extract key terms (parties, rent, term, escalation, break clause, deposit) from a lease into validated JSON via structured output.

  • Market research: pull current market/vacancy/rent context from the web (Tavily).

  • Analyst with approval: writes small Python for rent math and pauses for human approval before running it.

  • Memory: conversations persist across restarts, keyed by thread_id (SQLite checkpointer).

  • MCP server: search_leases, extract_lease_terms, project_rent exposed to any MCP host (e.g. Claude Desktop).

  • Tracing: every run is traced in LangSmith.

Related MCP server: lease-qa-mcp

Architecture

   User
     |
     v
   CLI  ----------------  SQLite checkpointer  (persistent memory by thread_id)
     |
     v
   SUPERVISOR  (LangGraph)  --- routes each question to one specialist ---
     |
     +--  Lease Expert       -> search_leases   (grounded RAG, cites sources)
     +--  Market Researcher  -> Tavily web search
     +--  Analyst            -> writes Python -> interrupt() for approval -> runs it
     |
     |  every specialist calls into...
     v
   core/   retrieval . abstraction . projection . ingest   (framework-neutral logic)
     |
     +-->  Chroma vector store   (Titan embeddings over the lease PDFs)
     |
     +-->  MCP server (FastMCP)  exposes the SAME core over JSON-RPC:
              search_leases, extract_lease_terms, project_rent

Key design decision — a framework-neutral core. Business logic lives once in core/ and is exposed two ways: as LangChain tools for the agents, and as MCP tools for the server. No duplication, no coupling to a framework.

Provider-agnostic. config.py picks the chat model and embeddings independently from two .env switches, so switching between Azure OpenAI (the production target), AWS Bedrock, Gemini, or Anthropic is a config change — everything else codes against LangChain's shared model interface.

Tech stack

Python 3.13 · LangGraph · LangChain · Azure OpenAI / AWS Bedrock / Gemini / Anthropic · Chroma · Tavily · Pydantic (structured output) · MCP (FastMCP) · SQLite checkpointer · LangSmith.

Setup

python -m venv .venv
.venv/Scripts/python -m pip install -r requirements.txt
.venv/Scripts/python -m pip install -e .
cp .env.example .env        # then fill in provider + LangSmith (+ Tavily) keys

Set PROVIDER and EMBEDDINGS in .env (e.g. azure, bedrock, gemini) and the matching keys. See .env.example.

Usage

# 1. Add lease PDFs to data/leases/ (or generate synthetic samples)
.venv/Scripts/python scripts/make_sample_leases.py

# 2. Ingest them into the vector store (load -> chunk -> embed -> persist)
.venv/Scripts/python -m lease_crew.ingest

# 3. Chat with the crew (memory persists under this thread_id)
.venv/Scripts/python -m lease_crew.cli my-session

# 4. MCP: run the server, or drive it with the demo client
.venv/Scripts/python mcp_server/server.py          # stdio server
.venv/Scripts/python mcp_server/client_demo.py     # client: discover + call tools
mcp dev mcp_server/server.py                        # inspect in the MCP Inspector

Project layout

lease_crew/
  config.py       provider-agnostic model + embeddings factory
  state.py        shared graph state (messages + routing)
  ingest.py       load -> chunk -> embed -> persist (Chroma)
  retrieval.py    search_leases (RAG core)
  abstraction.py  extract_lease_terms (structured output)
  projection.py   project_rent (pure math)
  tools.py        LangChain @tool adapters over core
  agents.py       the three specialist workers
  graph.py        supervisor graph + human-in-the-loop analyst
  cli.py          chat loop with persistent memory
mcp_server/
  server.py       FastMCP server (same core, over MCP)
  client_demo.py  minimal MCP client

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    • LeaseCommand is lease administration software with ASC 842 lease accounting for multi-location businesses, with an MCP server that works with ChatGPT, Claude, Cursor and VS Code. Its MCP server gives Claude, ChatGPT and other MCP clients organization-scoped access to lease records and accounting data: lease portfolios, payment and amortization schedules, critical dates and journal entries. Tools: view_portfolio_dashboard (lease portfolio), review_lease (a lease and its saved terms), view_accounting_dashboard (journal entries and balance evidence), view_supplemental_rent_dashboard (sales and supplemental rent), find_sites, find_contracts, search_operations and describe_operation (discover wider operations), execute_read (run a read operation) and get_write_status (status of a submitted change). Connect in ChatGPT (web): Plugins (chatgpt.com/plugins) → + → Add custom MCP server → Server URL https://app.leasecommand.com/api/mcp → Authentication: OAuth → create the plugin, install it and sign in. Connect in Claude: Settings → Connectors → Add custom connector → paste https://app.leasecommand.com/api/mcp → Connect and sign in. Cursor, VS Code and other clients: add https://app.leasecommand.com/api/mcp as a remote HTTP MCP server. How to connect: follow the LeaseCommand MCP setup guide for your client. Use OAuth (sign in through LeaseCommand with S256 PKCE, select an organization, check the callback address and scopes, then approve) or an API key created in Developer settings with only the MCP permissions needed. Access never exceeds the user's own role, and platform administration is excluded. Setup guide: https://leasecommand.com/ai-assistants-mcp/ Support: kcatolico@leasecommand.com

    • Commercial lease abstraction, CAM reconciliation audits, DSCR/Cap Rate underwriting & tax exits.

      https://credominion.com/api/mcp
    • Extract verified data from CRE rent rolls and T12 operating statements (PDF, Excel, CSV, scans)

      https://rentrollapi.com/mcp
    • Built-environment forecasts, public benchmarks, and permit or zoning readiness through remote MCP.

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP server exposing lease Q&A via the lease_qa tool, querying a LeaseClear API to return grounded answers about specific lease documents.
      1
      17 PyPI
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients to search and retrieve contract intelligence over public contract data, with agent skills for precedent lookup, negotiation checks, and risk flagging, all with verification and citations.
      -