Skip to main content
Glama

mcp-tw-lvr

PyPI version Python PyPI downloads License: MIT MCP CI GitHub stars GitHub issues GitHub last commit

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.

Related MCP server: taiwan-data-hub

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 筆: ...


Installation

# Install as a uv-managed tool
uv tool install mcp-tw-lvr

# One-time: install the Chromium browser Playwright drives
uvx --from mcp-tw-lvr playwright install chromium

# Run the MCP server
uv tool run mcp-tw-lvr

Or with pipx:

pipx install mcp-tw-lvr
pipx run --spec mcp-tw-lvr playwright install chromium
mcp-tw-lvr

From source (contributors)

git clone https://github.com/asgard-ai-platform/mcp-tw-lvr.git
cd mcp-tw-lvr
uv sync
uv run playwright install chromium
uv run mcp-tw-lvr

# Interactive dev/test (MCP Inspector)
uv run mcp dev src/lvr/server.py

Claude Code / MCP client integration

After installing from PyPI, add to your MCP client config (e.g. ~/.claude.json or a project-local .mcp.json):

{
  "mcpServers": {
    "mcp-tw-lvr": {
      "command": "uvx",
      "args": ["mcp-tw-lvr"]
    }
  }
}

Running from a local clone? Use the in-repo .mcp.json shape instead:

{
  "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

# Fast unit-only run (no network)
uv run pytest -m "not e2e"

# Live E2E tests against the real portal (~30-60s each)
uv run pytest -m e2e -v

See CONTRIBUTING.md for the full dev workflow.

License

MIT License

Available Tools

1 tool
query_real_price_toolA

查詢台灣實價登錄資料。

年份為民國年(西元 - 1911)。若未指定 start_year/end_year, 預設為去年初到今年底。

query_type 可選:

  • biz:買賣

  • rent:租賃

  • presale:預售屋

  • saleremark:預售屋建案

回傳結果預設經過 lvr.adapter.normalize 處理,欄位以可讀的英文鍵 回傳(例如 address / total_price / unit_price / building_name)。 若需要政府 API 原始的 single-letter key('a', 'tp', 'p' …), 傳 raw=True。

ParametersJSON Schema
NameRequiredDescriptionDefault
cityNo高雄市
townNo
roadNo
buildingNo
start_yearNo
start_monthNo
end_yearNo
end_monthNo
query_typeNobiz
rawNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description discloses key behaviors: year adjustment (Minguo), default date range, query types, output normalization via lvr.adapter.normalize, and the raw option. No mention of authentication, rate limits, or side effects, but as a read-only query tool, these are less critical. Overall transparent.

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 brief and well-structured: first sentence states purpose, then explains year defaults, query types, and output format. Every sentence adds value with no redundant information. Ideal length for quick understanding.

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?

Given 10 parameters, 0% schema coverage, no annotations, but an existing output schema, the description covers the most critical aspects (year, query_type, raw) but omits details on location parameters. It provides enough context for a typical use case, though more detail on city/town/road would improve completeness.

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?

Schema description coverage is 0%, requiring compensation. The description explains years (Minguo, defaults), query_type (enum meanings), and raw (key naming). However, it does not describe city, town, road, building, start_month, end_month parameters, leaving them partially undocumented. Adds meaningful context for some but not all parameters.

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 it queries Taiwan's real price registration data (查詢台灣實價登錄資料), specifies the year system (Minguo), query types, and output format. It is specific and distinguishes itself from potential similar tools, though no siblings exist.

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?

It provides guidance on year defaults (last year start to this year end if not specified), explains each query_type option with Chinese translations, and notes the raw flag for original keys. No explicit exclusions or alternative tool references, but context is clear for an isolated tool.

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. Dates show when Glama detected each change.

  1. 1 tool updatev0.1.0
    • First observedquery_real_price_tool

TDQS

A4.1/5.0
Disambiguation5/5

Only one tool exists, so there is no possibility of confusion or overlap.

Naming Consistency5/5

With a single tool, the naming is trivially consistent; the snake_case format is clear.

Tool Count3/5

One tool is borderline; while it serves a specific query purpose, the server feels too minimal for rich interaction.

Completeness3/5

The tool covers multiple query types, but lacks any CRUD operations or auxiliary functions, leaving notable gaps for a data service.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

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

  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server for querying Israeli government real estate data, enabling property deal searches, market trend analysis, and address retrieval.
    4
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An open-source MCP server that aggregates Taiwan public data sources (data.gov.tw, TWSE, MOEA, CWA, etc.) and exposes them through the Model Context Protocol, enabling AI agents to query Taiwan data with a single configuration line.
    1
    Apache 2.0
  • A
    license
    A
    quality
    D
    maintenance
    MCP server for searching and querying detailed housing listings in Taiwan, enabling AI to find properties with filters like city, district, room count, price, and age.
    2
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server that provides real-time, high-quality tender information from Taiwan's government e-procurement website via enhanced web scraping, enabling AI to query and analyze procurement opportunities.
    15
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/asgard-ai-platform/mcp-tw-lvr'

If you have feedback or need assistance with the MCP directory API, please join our Discord server