ziroom-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ziroom-mcp Find 2-bedroom apartments under 6000 yuan in Shanghai"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Ziroom MCP
This is a Ziroom rental MCP service: it supports both stateful listing filtering and session-free scraping of a single detail-page URL. When searching, the Agent makes consecutive tool calls within the same session_id, while the server keeps the browser page, filter state, version number, and rollback checkpoints.
Tools
create_search_session: Opens the corresponding Ziroom page for a city.get_filter_schema: Reads the current fields, options, control types, and selected state.search_location: Searches for a residential community, business district, or metro station.select_filter_option: Selects a single-choice or multi-choice tag.set_filter_range: Sets the rent range.set_sort: Sets sorting by price, area, etc.get_results: Returns listing names, URLs, all current conditions, and verification results.get_listing_detail: Returns structured details and a Chinese Markdown report via a/x/{listing-id}.htmlURL.restore_checkpoint: Restores the complete state from before an operation.reset_filter: Resets a specified field entirely to its default value.close_search_session: Closes the page and releases resources.
Related MCP server: mcp-tw-lvr
Installation
cd C:\path\to\ziroom-mcp
python -m venv .venv
.venv\Scripts\python.exe -m pip install -e ".[test]"The service gives priority to Chrome or Edge already installed on Windows. If no browser is available, it installs Playwright Chromium:
.venv\Scripts\python.exe -m playwright install chromiumDetail scraping and search share the same Playwright browser process. Each get_listing_detail call creates a separate BrowserContext and closes it immediately after reading, so it does not pollute an existing search session. The price number sprite images are downloaded and decoded through the Playwright request context.
Startup
.venv\Scripts\ziroom-mcp.exeThe service uses stdio by default; logs must not be written to stdout.
Using Streamable HTTP:
$env:ZIROOM_TRANSPORT="streamable-http"
$env:ZIROOM_HOST="127.0.0.1"
$env:ZIROOM_PORT="8000"
.venv\Scripts\ziroom-mcp.exeThe HTTP MCP endpoint is http://127.0.0.1:8000/mcp and uses a JSON response mode compatible with Cloudflare Quick Tunnel.
When going through a reverse proxy that forwards the public Host, additionally set $env:ZIROOM_BEHIND_PROXY="1". Once enabled, keep ZIROOM_HOST=127.0.0.1 to avoid listening directly on the public network interface.
Ziroom currently returns an empty body to headless Chrome, so the service launches a visible browser by default. Enable headless mode only after confirming that the target page supports it:
$env:ZIROOM_HEADLESS="1"
.venv\Scripts\ziroom-mcp.exeYou can also specify the Chrome/Edge executable via ZIROOM_CHROME_PATH.
The same search session always reuses the same browser tab. After filter-link navigation, the service preserves existing query parameters, restores isOpen to 1, and then re-locates the next item; if the site still hides the target link in the DOM, it uses a DOM click as a fallback.
Agent Calling Conventions
When scraping a single detail page, call get_listing_detail directly once; there is no need to create or close a search session:
{
"url": "https://wh.ziroom.com/x/123456.html",
"timeout_seconds": 30,
"retries": 4,
"include_report": true
}The return value includes listing_id, url, fetched_at, a structured listing, and optional report_markdown.
When filtering listings, follow this order:
Call
create_search_session.Call
get_filter_schemaand select only the tags currently returned by the page.location,area, andmetroare mutually exclusive property search methods; keep only one. Build a fallback queue in the orderlocation→area→metro. If the preferred option errors, is not retained, or returns zero results, confirm that the page has been restored before trying the next one.All modification tools use the same
session_idand pass thestate_versionreturned by the previous step.After each modification, check
has_results.If it is
false, callrestore_checkpointwith thecheckpointreturned this time, and setreasontoempty_results.If it returns
skipped=trueandreason=page_did_not_retain_option, the page did not retain this tag and the tool has already restored the original state; do not callrestore_checkpoint. Instead, refresh the schema and record it as unavailable, or retry a limited number of times according to business rules. Other modification tools correspondingly returnreason=page_did_not_retain_change.Finally call
get_resultsand verify all conditions that should be retained viaexpected_filters.After completing, call
close_search_session.
Expected filter conflicts are not returned as tool errors. When the current page has no option, the option has already been applied, the page did not retain a change, or there is a location/area/metro conflict, the modification tool returns skipped=true and state_changed=false, keeping the original state_version and all selected conditions. The Agent should record the reason and continue to the next item. Real version conflicts, invalid sessions, site failures, and internal errors are still returned as tool errors.
Testing
All MCP tools have offline protocol-layer tests:
.venv\Scripts\python.exe -m pytest -m "not live" -vThe tests also start a stdio server subprocess that uses a fake web backend to verify MCP initialization, tool discovery, and tool invocation. ZIROOM_BACKEND=fake is for automated testing only.
Real-webpage smoke tests:
$env:ZIROOM_LIVE_TEST="1"
.venv\Scripts\python.exe -m pytest -m live -vAvailable Tools
11 toolsclose_search_sessionB
关闭搜索会话并释放对应的浏览器页面。
Inputs: session_id (required). Returns: object
create_search_sessionC
为支持的城市创建连续的自如浏览器搜索会话。
Inputs: city (required). Returns: object
get_filter_schemaB
读取当前页面的筛选字段、可选标签、已选值和状态版本。
Inputs: session_id (required). Returns: object
get_listing_detailA
抓取单个自如详情页 URL,返回结构化字段和可选中文 Markdown 报告。
Inputs: url (required), retries, include_report, timeout_seconds. Returns: object
get_resultsD
返回房源名称、URL、当前全部条件及最终条件验证结果。
Inputs: session_id (required), limit, expected_filters. Returns: object
reset_filterC
将指定字段整体恢复为默认值,不影响其他已选字段。
Inputs: field_id (required), session_id (required), expected_version. Returns: object
restore_checkpointC
恢复某次筛选操作前的完整状态;零结果时 reason 使用 empty_results。
Inputs: checkpoint (required), session_id (required), reason, expected_version. Returns: object
search_locationC
搜索一个小区、商圈或地铁站;多个用户答案应由 Agent 先选择一个。
Inputs: keyword (required), session_id (required), expected_version. Returns: object
select_filter_optionC
选择当前标签;页面未保留时返回 skipped=true,而不是工具错误。
Inputs: option (required), field_id (required), session_id (required), expected_version. Returns: object
set_filter_rangeB
设置租金等范围字段;当前页面实现支持 field_id=rent。
Inputs: field_id (required), session_id (required), maximum, minimum, +1 more. Returns: object
set_sortC
设置结果排序方式,例如价格或面积。
Inputs: option (required), session_id (required), expected_version. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
每个工具都有明确的职责:会话管理(创建/关闭)、搜索(位置、筛选选项、范围、排序)、结果获取、详情抓取、状态恢复/重置。工具之间没有明显重叠,边界清晰,代理可以准确选择所需工具。
所有工具名称均采用一致的动词_名词的snake_case模式,如create_search_session、get_filter_schema、select_filter_option等,命名风格统一,可预测性强。
11个工具完整覆盖了浏览器搜索会话的整个生命周期,从创建、配置、执行到关闭,每个工具都有其存在的价值,数量合理,既不冗余也不单薄。
覆盖了搜索流程的主要环节:会话管理、位置搜索、筛选和排序、结果获取、详情查看、状态恢复和重置。缺少一些如取消特定筛选选项之类的边缘操作,但核心工作流完整,代理可以正常完成任务。
Maintenance
Related MCP Connectors
Zenrows MCP server: Fetch, Extract, Batch, and Browser Sessions for AI agents
Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.
Structured, sourced data on China visa-free entry rules and Chinese regulatory changes, served as a remote MCP server for agents.
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP 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.216 PyPIMIT
- AlicenseAqualityDmaintenanceMCP server for querying Taiwan's real estate transaction registry via web scraping of the Ministry of the Interior's official portal. Enables natural language queries for real estate sales, rentals, and pre-sale housing data.11MIT
- AlicenseAqualityDmaintenanceA remote MCP server that wraps the StreetEasy GraphQL API to enable LLM agents to search and parse NYC rental listings.41MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Airbnb — lets AI agents search listings, check availability, manage reservations, and book stays via browser automation.13 npmMIT