Skip to main content

leaseclear-mcp

A Model Context Protocol server that exposes LeaseClear lease Q&A.

Tools

  • lease_qa — ask one question about lease terms; returns an answer grounded in the lease, or states that the lease is silent

Usage

Add this to your MCP client config (e.g. claude_desktop_config.json or Cursor mcp.json):

{
  "mcpServers": {
    "lease-qa": {
      "command": "uvx",
      "args": ["leaseclear-mcp"]
    }
  }
}

The package is on PyPI. uvx fetches and runs it as a local subprocess, communicating over stdio. uv required.

Optional environment variables

Variable Description Default
LEASECLEAR_API_KEY Use the server with your own LeaseClear account LeaseClear demo mode
LEASECLEAR_API_URL Override the API endpoint (local or private instances) LeaseClear production backend
{
  "mcpServers": {
    "lease-qa": {
      "command": "uvx",
      "args": ["leaseclear-mcp"],
      "env": {
        "LEASECLEAR_API_KEY": "lc_...",
        "LEASECLEAR_API_URL": "https://..."
      }
    }
  }
}

lease_qa

Argument

  • question (string, required) — one question about the lease

_meta (client / server only)

  • document_ids (string[], optional) — UUIDs of the documents to query. Omitted means all.

_meta is MCP's reserved field for additional metadata on a request that the model can't see or set. That's a deliberate anti-prompt injection choice: the host app decides which lease(s) are in scope, and the model can only ask the question.

[!WARNING] Without document_ids, a model can query any document the LeaseClear account can access. See a real-world example in LeaseOps: prompt injection and the tenants table.

Python ClientSession.call_tool example:

result = await session.call_tool(
    name="lease_qa",
    arguments={
        "question": "How much is the security deposit for Yuna Kim?"
    },
    meta={
        "document_ids": [
            "a1b2c3d4-e5f..."
        ]
    }
)

Example output:

{
  "answer": "The security deposit is $6,400.00. This deposit is held in Owner's Broker's trust account [california-johnson-kim §4]."
}

Project structure

leaseclear-mcp/
├── src/leaseclear_mcp/
│   ├── server.py        # MCP server + lease_qa
│   ├── leaseclear.py    # LeaseClear HTTP client
│   ├── schemas.py
│   └── config.py
├── tests/
├── pyproject.toml
├── .env.example
└── README.md

Local Development

git clone https://github.com/you/leaseclear-mcp.git
cd leaseclear-mcp
uv sync
cp .env.example .env
uv run pytest
uv run ruff check .
uv run pyright

Debugging

Use the MCP Inspector to test the server interactively:

npx @modelcontextprotocol/inspector uvx leaseclear-mcp

From a checkout, use uv run leaseclear-mcp instead of uvx leaseclear-mcp.

License

MIT

Metadata

Release files for leaseclear-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for leaseclear-mcp 0.1.1
File Size Uploaded
leaseclear_mcp-0.1.1.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for leaseclear-mcp 0.1.1
File Interpreter ABI Platform
leaseclear_mcp-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / leaseclear_mcp-0.1.1.tar.gz

Download URL leaseclear_mcp-0.1.1.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bb8af1cadb38e6677e8ae1d478cbcf4392188186ccb123965a11f34a282023e7
BLAKE2b-256 checksum
How to use checksums
0299a9c7c4d7f05f64c7178bfc2ea70ba04225548a7163120f1e0d9dbd5523d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / leaseclear_mcp-0.1.1-py3-none-any.whl

Download URL leaseclear_mcp-0.1.1-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c66967ed41dcf73a50bedc0eb37091959fb08fc4a5d525922cee4817b302d10
BLAKE2b-256 checksum
How to use checksums
cd238216b3602785752140126fc6f1d14c6bd3e05d703298edfc4fd8091539e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.1.3

2 release files

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page