MCP server for querying Taiwan's real estate transaction registry (實價登錄)
Project description
mcp-tw-lvr
MCP server for querying Taiwan's 實價登錄 (real estate transaction registry) via web scraping of lvr.land.moi.gov.tw. Built on Model Context Protocol (MCP) over stdio JSON-RPC 2.0.
Note: This tool automates the government's official web portal using Playwright. Each query takes ~15–20 seconds and loads the live site — use sparingly.
Available Tools
| Tool | Description |
|---|---|
query_real_price_tool |
Query real estate transactions by city, district, road, building, date range, and transaction type |
query_type options:
| Value | Description |
|---|---|
biz |
買賣(sales transactions) |
rent |
租賃(rental transactions) |
presale |
預售屋(pre-sale housing) |
saleremark |
預售屋建案(pre-sale project listings) |
Year defaults: If start_year / end_year are omitted, they default to
"last year through this year" computed at call time in the ROC calendar
(民國 = CE − 1911), so the tool never becomes stale.
Response shape: By default the tool returns dicts with friendly English
keys (address, total_price, unit_price, building_name, layout,
transaction_date, latitude, longitude, …). Field set differs by
query_type — see src/lvr/adapter.py for the
complete mappings. Pass raw=True to receive the government API's
original single-letter keys (a, tp, p, …) instead.
Usage Examples
查詢高雄市買賣行情
你: 我想知道高雄市鹽埕區今年的房屋售價
AI 呼叫:
query_real_price_tool(
city = "高雄市",
town = "鹽埕區",
query_type = "biz",
start_year = 115,
start_month = 1,
end_year = 115,
end_month = 12,
)
結果: 以下是 高雄市鹽埕區 115 年(1–3 月)買賣實價登錄統計,共 21 筆,其中 10 筆為特殊關係交易(親友、含租約等),以下以 一般正常交易 11 筆為主分析: ...
查詢台北市租金行情
你: 台北市信義區今年的租賃行情怎麼樣?
AI 呼叫:
query_real_price_tool(
city = "台北市",
town = "信義區",
query_type = "rent",
start_year = 114,
start_month = 1,
end_year = 114,
end_month = 12,
)
結果: 以下是 台北市信義區 115 年(1–2 月)整戶住宅租賃行情,有效筆數 80 筆: ...
Quick Start
# Install dependencies
uv sync
uv run playwright install chromium
# Run server
uv run mcp-tw-lvr
# Interactive dev/test (MCP Inspector)
uv run mcp dev src/lvr/server.py
Claude Code Integration
.mcp.json is included. To use in another project, add to your config:
{
"mcpServers": {
"mcp-tw-lvr": {
"command": "uv",
"args": ["run", "mcp-tw-lvr"],
"cwd": "/path/to/mcp-tw-lvr"
}
}
}
Data Source
All data is scraped from https://lvr.land.moi.gov.tw — Taiwan Ministry of the Interior's official real estate transaction registry. No API key required, but each query drives a real browser session against the live site.
Testing
# E2E tests against the live site (~1 min)
uv run python tests/test_all_tools.py
License
MIT License
Project details
Release history Release notifications | RSS feed
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 mcp_tw_lvr-0.1.0.tar.gz.
File metadata
- Download URL: mcp_tw_lvr-0.1.0.tar.gz
- Upload date:
- Size: 78.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fd905c726d397afa341b0cc4e9eab4e5f6e21e098cceb2f421c43cdb2baa12b
|
|
| MD5 |
c17b7bd50fef3e00f7e463b7df555321
|
|
| BLAKE2b-256 |
b0870274332637bb9dba633441d0104b3de1a61d7f180c069f0b5578e082912e
|
Provenance
The following attestation bundles were made for mcp_tw_lvr-0.1.0.tar.gz:
Publisher:
publish.yml on asgard-ai-platform/mcp-tw-lvr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_tw_lvr-0.1.0.tar.gz -
Subject digest:
6fd905c726d397afa341b0cc4e9eab4e5f6e21e098cceb2f421c43cdb2baa12b - Sigstore transparency entry: 1254690355
- Sigstore integration time:
-
Permalink:
asgard-ai-platform/mcp-tw-lvr@e6d741c03e0154c9d6021103ccd5cfab4a582c35 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/asgard-ai-platform
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e6d741c03e0154c9d6021103ccd5cfab4a582c35 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mcp_tw_lvr-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_tw_lvr-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dae7b74ae45e908128a6e8403f054e6659f4f71ddaebf8a7dfa30bc765e1ba68
|
|
| MD5 |
6f35be03edcdc5f81ac481aca2ccfad5
|
|
| BLAKE2b-256 |
7b75b428d0bbec7e6af532dd28193e34f0dc0f3eee28419b4fa82fdec9d4fbba
|
Provenance
The following attestation bundles were made for mcp_tw_lvr-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on asgard-ai-platform/mcp-tw-lvr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_tw_lvr-0.1.0-py3-none-any.whl -
Subject digest:
dae7b74ae45e908128a6e8403f054e6659f4f71ddaebf8a7dfa30bc765e1ba68 - Sigstore transparency entry: 1254690435
- Sigstore integration time:
-
Permalink:
asgard-ai-platform/mcp-tw-lvr@e6d741c03e0154c9d6021103ccd5cfab4a582c35 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/asgard-ai-platform
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e6d741c03e0154c9d6021103ccd5cfab4a582c35 -
Trigger Event:
release
-
Statement type: