Skip to main content
Glama
amadeuserras

lease-qa-mcp

by amadeuserras

leaseclear-mcp

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

Listed in the official MCP Registry as io.github.amadeuserras/leaseclear-mcp.

Tools

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

Related MCP server: MCP RAG Server

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 usage

Argument

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

_meta

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

Security: The _meta field is used to pass metadata to the tool call that the model doesn't see. Having document_ids there is intentional: it prevents cross-document prompt injection because the model is never able to choose which documents it has access to. See a real-world example in LeaseOps: prompt injection and the tenants table.

MCP Python SDK example

Tool call:

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

Output:

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

Tech stack

  • Python 3.12

  • Model Context Protocol Python SDK (mcp[cli]) over stdio

  • httpx for LeaseClear API calls

  • Pydantic and pydantic-settings for schemas and config

  • uv and uv_build for running and packaging

  • pytest, Ruff, and Pyright for tests, linting, and type checking

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

Available Tools

1 tool
lease_qaA

Ask one neutral, precise question about the tenant's lease. The lease document is already scoped for this email. Returns an answer grounded in the lease, or states that the lease does not address the question.

ParametersJSON Schema
NameRequiredDescriptionDefault
questionYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
answerYes

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden of explaining behavior. It discloses that the tool returns an answer grounded in the lease, or states when the lease does not address the question. It also mentions the input should be one neutral, precise question, and that the lease is pre-scoped. This is meaningful behavioral context, though it doesn't fully explain all edge cases (e.g., handling of ambiguous questions).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences and front-loads the core action. It includes only essential information: what to ask, the scoping context, and the expected response behavior. No redundant phrasing or irrelevant details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with one parameter and an output schema, the description covers the key contextual details: the lease is already scoped for the email, the question must be neutral and precise, and the answer is grounded in the lease with a fallback if not addressed. Since an output schema exists, return-value details aren't required. It could be more complete with a brief example, but it's sufficient for use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single required parameter is named 'question' and has no schema description. The tool description adds the guidance that the question should be neutral and precise, which is helpful, but it doesn't give examples or specify the expected format/length. This partially compensates for the schema coverage of 0%, but leaves room for more detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool asks one neutral, precise question about the tenant's lease, and explicitly notes the scope ('already scoped for this email'). It uses a specific verb ('ask') and resource ('lease') and describes the outcome, so the purpose is unambiguous even without sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use the tool: whenever you need to ask a single question about the lease for this email. It does not mention exclusions or alternatives (none are listed), but the scope qualifier and the requirement for a neutral, precise question serve as usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 1 tool updatev0.1.0
    • First observedlease_qa

TDQS

A4.2/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap. The tool's purpose is clear and unique.

Naming Consistency5/5

A single tool name cannot be inconsistent with others. The name 'lease_qa' is straightforward and matches the server's purpose.

Tool Count3/5

Having only one tool feels thin for a typical server, but it may be appropriate for this narrow scope. The calibration suggests 1-2 tools is borderline.

Completeness4/5

The tool directly fulfills the stated purpose of asking lease questions and getting grounded answers. Minor gaps exist, such as no ability to retrieve the full lease or ask multiple questions in a batch, but the core workflow is covered.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers