leaseclear-mcp
A standalone MCP server that exposes lease Q&A as one tool: lease_qa. It asks hosted LeaseClear a question about lease terms and returns a grounded answer.
This is a thin stdio process. By default it calls the public LeaseClear API. Override LEASECLEAR_API_URL only if you run your own instance.
Install
Requires Python 3.12+.
uvx leaseclear-mcp
Or:
pip install leaseclear-mcp
leaseclear-mcp
That starts the MCP server on stdio.
Configure
| Variable | Required | Meaning |
|---|---|---|
LEASECLEAR_API_URL |
no | LeaseClear API URL. Defaults to https://leaseclear-production.up.railway.app. Set this for a local or private instance. |
LEASECLEAR_API_KEY |
no | LeaseClear API key (POST /auth/api-key while logged in). Query-only: asks questions as that user. Omit to use the public demo corpus. |
If the key is set, this server sends it on /query. If omitted, it uses /auth/demo (no account needed).
From a git checkout you can copy .env.example to .env. After pip / uvx, set overrides in the MCP host env block instead.
Cursor / Claude Desktop example
{
"mcpServers": {
"lease-qa": {
"command": "uvx",
"args": ["leaseclear-mcp"]
}
}
}
To use your own account (or a self-hosted API), add env:
{
"mcpServers": {
"lease-qa": {
"command": "uvx",
"args": ["leaseclear-mcp"],
"env": {
"LEASECLEAR_API_KEY": "lc_…"
}
}
}
}
Tool: lease_qa
| Arguments | question (string) — one neutral question about lease terms |
| Metadata | document_ids (list of UUIDs, optional) — which leases to query; not an LLM-visible argument |
| Returns | { "answer": "..." } — LeaseClear’s grounded answer (or that the lease is silent) |
If the host passes document_ids, the question is scoped to those leases. If omitted, LeaseClear searches all leases on the authenticated account. The model only chooses the question; the host chooses whether to scope.
Errors
Failures surface as MCP tool errors, including:
- invalid
document_idsin metadata - empty question
- LeaseClear auth or query failures
- LeaseClear unreachable
Development
git clone https://github.com/amadeuserras/leaseclear-mcp.git
cd leaseclear-mcp
uv sync
cp .env.example .env
uv run leaseclear-mcp
uv run ruff check .
uv run pyright
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file leaseclear_mcp-0.1.0.tar.gz.
File metadata
- Download URL: leaseclear_mcp-0.1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d942a3df58831fa08b6fbd83309f5a9bb276349d32976ce4ef37b1ec053d89b8
|
|
| MD5 |
ce4314af3e57517778b063369d5b8157
|
|
| BLAKE2b-256 |
9155f8830583859afcf33040b3741b753f926575691dfe62083dd3387aeb53ff
|
File details
Details for the file leaseclear_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: leaseclear_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f63921a0a7fda3c84840eb93960fc4502802f75c6f2e30f8364a6282979a052
|
|
| MD5 |
f93a5423d2964c39279a42b1fc38abf6
|
|
| BLAKE2b-256 |
8be58d102de5f0c26e69c97742fcfec2b02e08b0aabce241d428c5f29b8d55e1
|