belle-mcp-server

belle-mcp-server

A reference Model Context Protocol (MCP) server that exposes real Belle Realty property-management data — properties, tenants, leases, maintenance tickets, rent roll — as tools that Claude Desktop, Cursor, or any MCP-compatible client can call directly.

Category
访问服务器

README

belle-mcp-server

A reference Model Context Protocol (MCP) server that exposes real Belle Realty property-management data — properties, tenants, leases, maintenance tickets, rent roll — as tools that Claude Desktop, Cursor, or any MCP-compatible client can call directly.

Six tools. Five are strictly read-only. One is a HITL-gated propose-write. That ratio is intentional and is the whole point of this repo.

Part of the AI Fluency Program — Level 2.


Why this exists

Most "AI + your data" demos give the model unrestricted database access. That is a footgun.

The Model Context Protocol is designed to expose a small, curated surface area with per-tool auth, rate limits, and audit — the same discipline you'd apply to a public REST API. This repo shows what that looks like for a real domain (a Louisiana shopping center) with a real Postgres schema, a working seed, and a single HITL-gated write path.

If you understand this repo, you can build one for any business you run.


What you get

Tool What it does Write?
list_properties Filter portfolio by type/city. no
list_tenants List tenants, optionally scoped to one property. no
get_lease Fetch a lease by lease_id/suite_id/tenant_id. no
search_maintenance_tickets Multi-filter search across tickets. no
get_rent_roll Compute a full rent roll snapshot for a property. no
draft_maintenance_response Save a proposed tenant reply as a DRAFT (approved=false). HITL-gated write

Every call is rate-limited (60/min default) and audit-logged to mcp_audit_log.


Quick start

# 1. Clone + install
git clone https://github.com/OrangeOnyx/belle-mcp-server.git
cd belle-mcp-server
npm install

# 2. Configure
cp .env.example .env
# Paste your Supabase URL + service-role key

# 3. Set up the schema (Supabase project)
#    Copy supabase/migrations/0001_init.sql into the SQL editor and run.

# 4. Seed demo data
npm run db:seed

# 5. Build + inspect
npm run build
npm run inspect

The MCP Inspector opens a UI where you can list tools, call them, and see raw responses.


Wire it into Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent on Windows/Linux:

{
  "mcpServers": {
    "belle-realty": {
      "command": "node",
      "args": ["/absolute/path/to/belle-mcp-server/dist/index.js"],
      "env": {
        "SUPABASE_URL": "https://your-project.supabase.co",
        "SUPABASE_SERVICE_ROLE_KEY": "your-service-role-key"
      }
    }
  }
}

Restart Claude Desktop. You'll now see a belle-realty toolset. Try:

"What suites are currently occupied at On The Boulevard, and how much monthly rent are they producing?"

Claude will call get_rent_roll and answer from the returned data.


The HITL write pattern

The one write tool (draft_maintenance_response) illustrates a general pattern you should copy for any AI-facing service:

  1. AI proposes a change — here, a reply to a tenant maintenance ticket.
  2. The server saves it as approved=false.
  3. Nothing is delivered, sent, or applied until a human approves it out-of-band (typically in the property manager's admin UI).
  4. The MCP surface intentionally does not expose an approve tool. Approval is a human-only operation.

This means an over-eager or prompt-injected agent cannot silently push text to a tenant. It can propose, and it can propose loudly. It cannot ship.

For a longer walkthrough, see docs/hitl-pattern.md.


Personal-use walkthrough

You're an individual landlord with 3 rental houses or one small commercial building.

  1. Run the migration on your Supabase project.
  2. Seed with your own data (edit supabase/seed.ts, or insert rows manually).
  3. Point Claude Desktop at the server.
  4. Ask questions like "which tenant has a lease expiring in the next 90 days?" or "draft a response to the ticket about the water heater."

You've now built an AI-native tenant operations layer that speaks your data. It cost you an evening.


Company-use walkthrough

You run Belle Realty (or an equivalent management company). Multiple staff need Claude access to portfolio data without seeing raw SQL, and without any risk of accidental writes.

  1. Deploy this server as a persistent process (Railway, Fly, or a Docker host).
  2. Set MCP_TRANSPORT=http and MCP_HTTP_TOKEN=<shared-secret>.
  3. Each teammate configures Claude Desktop or Cursor with the URL + token.
  4. Read-only tools give everyone leverage. The single write tool protects the tenant relationship.
  5. mcp_audit_log gives you an after-the-fact record of every AI action.

Architecture

graph LR
    A[Claude Desktop / Cursor] -->|MCP stdio or HTTP| B[belle-mcp-server]
    B --> C[RateLimiter]
    B --> D[Zod validation]
    B --> E[Supabase Postgres]
    B --> F[mcp_audit_log]
    E --> G[(properties, tenants, leases, tickets)]

Details in docs/architecture.md.


Extending it

Add a new tool in 4 steps:

  1. Add a Zod schema for input in src/schemas/domain.ts (if the data shape is new).
  2. Create src/tools/<name>.ts with an input schema, a handler, and a JSON-Schema definition.
  3. Register it in src/tools/index.ts.
  4. Add tests in tests/.

Every write tool should follow the propose-write pattern in draft_maintenance_response.


Deploy

Railway (recommended for HTTP transport)

railway up

railway.json builds the server and runs node dist/index.js. Set env vars in the Railway dashboard.

Local (stdio only)

Just build and point your MCP client at dist/index.js. No hosting needed.


Development

npm run dev       # tsx watch mode
npm run test      # vitest
npm run build     # tsc → dist/
npm run inspect   # MCP Inspector UI

Related repos


License

MIT — see LICENSE.

Not legal, tax, or property-management advice. Do not use for compliance-critical decisions without a licensed professional in the loop.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选