io.github.amadeuserras/leaseclear-mcp

السجل الرسمي أخرى

MCP server for LeaseClear lease Q&A.

ماذا يمكنك أن تفعل مع io.github.amadeuserras/leaseclear-mcp؟

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

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

PYPI package leaseclear-mcp
Claude Code
claude mcp add leaseclear-mcp -e 'LEASECLEAR_API_KEY=<your leaseclear_api_key>' -e 'LEASECLEAR_API_URL=<LEASECLEAR_API_URL>' -- uvx leaseclear-mcp==0.1.3
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "leaseclear-mcp": {
            "command": "uvx",
            "args": [
                "leaseclear-mcp==0.1.3"
            ],
            "env": {
                "LEASECLEAR_API_KEY": "<your leaseclear_api_key>",
                "LEASECLEAR_API_URL": "<LEASECLEAR_API_URL>"
            }
        }
    }
}

متغيرات البيئة

  • LEASECLEAR_API_KEY سري Your LeaseClear API key. Omit for demo mode.
  • LEASECLEAR_API_URL Override the LeaseClear API URL.

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. leaseclear-mcp
  2. Tools
  3. Usage
  4. lease_qa usage
  5. MCP Python SDK example
  6. Tech stack
  7. Project structure
  8. Local Development
  9. License

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

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
VariableDescriptionDefault
LEASECLEAR_API_KEYUse the server with your own LeaseClear accountLeaseClear demo mode
LEASECLEAR_API_URLOverride 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

الأسئلة الشائعة

ما هو io.github.amadeuserras/leaseclear-mcp؟

MCP server for LeaseClear lease Q&A.

كيف أثبّت io.github.amadeuserras/leaseclear-mcp؟

يعمل على جهازك. في Claude Code: claude mcp add leaseclear-mcp -e 'LEASECLEAR_API_KEY=<your leaseclear_api_key>' -e 'LEASECLEAR_API_URL=<LEASECLEAR_API_URL>' -- uvx leaseclear-mcp==0.1.3. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.amadeuserras/leaseclear-mcp إلى مفتاح API؟

نعم. يتطلب LEASECLEAR_API_KEY، وتضبطها في إعداداته.

هل io.github.amadeuserras/leaseclear-mcp مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون io.github.amadeuserras/leaseclear-mcp؟

ينشره amadeuserras. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.