Lease Intelligence MCP Server

Lease Intelligence MCP Server

Enables querying, extracting terms, and projecting rent from commercial lease documents via MCP tools.

Category
访问服务器

README

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.

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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选