UK Property Data
Property Shared
英国房产数据一应俱全。拉取土地注册局销售记录、EPC 证书、Rightmove 房源、租金收益率、印花税计算、规划门户链接以及 Companies House 记录。
可将其用作 Python 库、CLI、HTTP API 或 MCP 服务器。
你得到什么
数据源 | 返回内容 |
Land Registry PPD | 成交价、日期、房产类型、区域对比(含中位数/百分位数) |
EPC (GOV.UK) | 能效等级、建筑面积、供暖成本。仅限英格兰和威尔士。证书查询和摘要搜索——见下方 EPC 说明 |
Rightmove | 当前房源(出售 + 出租)、价格、中介、房源详情 |
收益率分析 | 结合 PPD 销售和 Rightmove 出租数据计算毛收益率 |
印花税 | 按 2025 年 4 月税率计算 SDLT,含 BTL 附加费、首次购房者减免 |
楼宇分析器 | 按建筑分组公寓销售,以发现投资者退出 |
规划 | 地方议会规划门户查询(99 个已验证议会,仅限 stdio) |
Companies House | 按名称或编号搜索和查询公司 |
Related MCP server: UK Due Diligence
技能与插件
Property 和 Legal 包即将推出。如果您在英国房产投资、英国房产中介、房产与产权转让方面有实际经验或专业知识,并希望帮助塑造此项目,请联系我们。 paul@bouch.dev
作为 MCP 服务器使用
无需安装——将 URL 粘贴到您的 MCP 客户端配置中即可使用。
Claude Code、Cursor 以及任何 MCP 客户端:
{
"mcpServers": {
"property-shared": {
"type": "http",
"url": "https://property-shared.fly.dev/mcp"
}
}
}安装
pip install property-shared
# or with uv
uv add property-shared附加项:[cli] 用于 CLI,[api] 用于 HTTP 服务器,[dev] 用于测试。
pip install property-shared[cli]
# or
uv add property-shared --extra cli作为 Python 库使用
from property_core import PPDService, calculate_yield, calculate_stamp_duty
# Get comparable sales for a postcode
comps = PPDService().comps("SW1A 1AA", months=24, property_type="F")
print(f"Median flat price: {comps.median:,}")
# Calculate rental yield
import asyncio
result = asyncio.run(calculate_yield("NG1 1AA", property_type="F"))
print(f"Gross yield: {result.gross_yield_pct}%")
# Stamp duty
sdlt = calculate_stamp_duty(250000, additional_property=True)
print(f"SDLT: {sdlt.total_sdlt:,.0f} ({sdlt.effective_rate}%)")所有模型都在顶层可用:
from property_core import (
PPDTransaction, PPDCompsResponse, EPCData,
RightmoveListing, RightmoveListingDetail,
PropertyReport, YieldAnalysis, RentalAnalysis,
BlockAnalysisResponse, CompanyRecord, StampDutyResult,
)解释辅助函数(核心返回数字,由您决定如何标注它们):
from property_core import classify_yield, classify_data_quality, generate_insights作为 CLI 使用
pip install property-shared[cli] # or: uv add property-shared --extra cli
# Comparable sales
property-cli ppd comps "SW1A 1AA" --months 24 --property-type F
# Rental yield
property-cli analysis yield "NG1 1AA" --property-type F
# Stamp duty
property-cli calc stamp-duty 300000
# Rightmove search (with sort)
property-cli rightmove search-url "NG1 1AA" --sort-by most_reduced
# Full property report
property-cli report generate "10 Downing Street, SW1A 2AA" --property-type F在任何命令中添加 --api-url http://localhost:8000 即可通过 HTTP API 路由,而不是直接调用核心。
作为 HTTP API 使用
pip install property-shared[api] # or: uv add property-shared --extra api
property-api # starts on port 8000交互式文档位于 http://localhost:8000/docs。
关键端点:
GET /v1/ppd/comps?postcode=SW1A+1AA&property_type=F&enrich_epc=trueGET /v1/analysis/yield?postcode=NG1+1AA&property_type=FGET /v1/analysis/rental?postcode=NG1+1AA&purchase_price=200000GET /v1/rightmove/search-url?postcode=NG1+1AA&sort_by=newestGET /v1/calculators/stamp-duty?price=300000&additional_property=truePOST /v1/property/report使用{ "address": "10 Downing Street, SW1A 2AA" }
EPC 说明(v1.14.0)
EPC 服务已迁移到 GOV.UK Bearer API。设置 EPC_API_TOKEN;旧的 EPC_API_EMAIL/EPC_API_KEY 组合针对已退役的主机进行身份验证,不再作为受支持的备用方案。
新的上游服务支持什么,不支持什么:
证书查询:按证书编号查询——完整详情,一次请求。
摘要搜索:按邮政编码搜索——返回地址、UPRN(通常缺失)、能效等级、注册日期和模式类型。它不返回能效评分、建筑面积或房产类型;这些仅存在于完整证书中。
邮政编码选择的是区域,而不是房产。 识别单个房产需要 UPRN 或与证书完全匹配的地址(大小写、标点以及开头的
Flat/Apartment标识符除外)。任何不完整的情况——无地址、无匹配或多个匹配——都会被拒绝,而不是解析为最佳猜测。CLI 和 REST 接口见 USER_GUIDE.md。区域统计仅限于记录数,以及当有界响应包含所有匹配摘要时的评级分布。房产类型细分和建筑面积统计报告为
None——不可用,而非零——因为生成它们意味着每个证书一次请求。覆盖范围是英格兰和威尔士。 苏格兰、北爱尔兰和海峡群岛返回“未找到证书”:这是覆盖边界,而非对房产的陈述。
分页不是稳定的快照。 响应包含
complete、duplicates_removed和unusable_rows;没有任何操作声称对某个区域进行了完整采集。模糊的地址匹配会被拒绝,而不是解析为任意相邻证书。
不支持 search_all_by_postcode()——使用 search_summaries() 发现候选,然后使用 get_certificate() 获取您需要的那个。
环境变量
在仓库根目录创建 .env 文件(已被 gitignore),包含您需要的变量。
完全省略可选变量,而不是将其赋为空值。
KEY=设置的是空字符串,这与未设置不同:os.getenv("KEY", "default")返回"",因此默认值永远不会生效。这影响了 EPC 实时测试,它们向上游发送了空邮政编码。
关键变量:
变量 | 用于 | 描述 |
| EPC 查询 | 来自 GOV.UK EPC 数据 的 Bearer 令牌 |
| (已弃用) | 已退役服务;仅解析以引发配置错误 |
| (已弃用) | 已退役服务;不是受支持的备用方案 |
| 公司搜索 | 来自 Companies House 的免费密钥 |
| 否(默认 0.6 秒) | Rightmove 抓取的速率限制延迟 |
| 规划抓取器 | 视觉引导的规划门户抓取器 |
Land Registry PPD 和 Rightmove 无需凭据即可工作。
开发
# Install with dev extras
uv sync --extra dev
# Run API with reload
uv run uvicorn app.main:app --reload
# Run tests (mocked, no network)
uv run --extra dev pytest -v
# Run live integration tests (real network calls)
RUN_LIVE_TESTS=1 uv run --extra dev pytest -v部署在 https://property-shared.fly.dev,API 文档位于 /docs,MCP 端点位于 /mcp。
Available Tools
13 toolscompany_profileAInspect
Get the full Companies House record for a company by number.
Returns registered address, status, incorporation date, officers, and filing history. Use company_search to find a company number by name.
Inputs: company_number (required).
company_searchAInspect
Search Companies House by company name. Returns a list of matches.
For a direct lookup by company number, use the company://{company_number} resource instead (e.g. read_resource("company://00445790")).
Inputs: query (required).
planning_searchAInspect
Find the planning portal URL for a UK postcode.
Returns the council name, planning system type, and a direct URL to open in a browser. Does NOT return planning application data — scraping is blocked by council portals. Use the returned search_urls.direct_search link to browse applications manually.
Inputs: postcode (required).
ppd_transactionsAInspect
Search Land Registry transactions by postcode, address, date range, or price.
Use for specific property history ("what has 10 Downing Street sold for?") or filtered market queries ("all sales over 500k in SW1 last year").
Inputs: postcode, street, town, paon, +6 more.
property_blocksBInspect
Find buildings with multiple flat sales — block buying opportunities.
Groups Land Registry transactions by building to identify blocks being sold off, investor exits, and bulk-buy opportunities.
Inputs: postcode (required), months, min_transactions.
property_compsBInspect
Comparable property sales from Land Registry Price Paid Data.
Auto-escalates to wider search area if fewer than 5 results found. EPC enrichment adds floor area, price/sqft, and EPC rating to each comp, plus area-level median price/sqft and EPC match rate.
Inputs: postcode (required), months, limit, search_level, +4 more.
property_epcAInspect
EPC certificate data for a UK property or postcode area.
With address: returns the matched certificate for that property — energy rating, score, floor area, construction age, heating costs.
Without address: returns all certificates at the postcode with area-level aggregation (rating distribution, floor area range, property type breakdown). Use this for area analysis rather than a single-property lookup.
Inputs: postcode (required), address.
property_reportAInspect
Full data pull for a UK property in one call.
Returns sale history, area comps, EPC rating, rental market listings, current sales market listings, rental yield calculation, and price range from area median.
Requires a street address + postcode for subject property identification. Postcode-only (e.g. "NG1 2NS") returns area-level data without a subject property — use property_comps or property_yield for postcode-only queries.
Inputs: address (required), include_rentals, include_sales_market, ppd_months, +2 more.
property_yieldBInspect
Calculate rental yield for a UK postcode.
Combines Land Registry sales data with Rightmove rental listings to produce a gross yield figure.
Inputs: postcode (required), months, search_level, property_type, +1 more.
rental_analysisAInspect
Rental market analysis for a UK postcode.
Returns median/average rent, listing count, and rent range. Optionally calculates gross yield from a given purchase price. Auto-escalates search radius if local listings are sparse (thin market).
Inputs: postcode (required), radius, purchase_price, auto_escalate, +1 more.
rightmove_listingAInspect
Fetch full details for a Rightmove listing by ID or URL.
Returns price, tenure, lease years remaining, service charge, ground rent, council tax band, floor area, key features, nearest stations, and floorplan URLs.
Inputs: property_id (required).
rightmove_searchAInspect
Search Rightmove property listings for sale or rent near a postcode.
Returns prices, addresses, bedrooms, agent details, and listing URLs.
Inputs: postcode (required), property_type, building_type, min_price, +6 more.
stamp_dutyBInspect
Calculate UK Stamp Duty Land Tax (SDLT) for a residential property.
Inputs: price (required), additional_property, first_time_buyer, non_resident.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool targets a distinct aspect of UK property data: company records, planning portals, transactions, blocks, comps, EPC, full reports, yield, rental analysis, Rightmove listings, and stamp duty. No two tools have overlapping purposes.
All tool names use a consistent snake_case pattern with descriptive noun_verb or adjective_noun structure (e.g., company_profile, rightmove_search, stamp_duty). No mixing of conventions.
With 13 tools covering the full spectrum of UK property data (companies, planning, transactions, EPC, rental, yield, stamp duty), the count is well-scoped and neither too sparse nor too heavy.
The tool surface covers the major needs for UK property analysis: company info, planning, transactional data, comparables, EPC, rental market, yields, listings, and stamp duty. The aggregate property_report tool fills gaps by combining multiple data sources.
Maintenance
Related MCP Connectors
UK property MCP: Land Registry prices, company charges, House Price Index. x402 USDC on Base.
UK property research tools - crime stats, schools, demographics, valuations for AI.
UK property data: EPC, flood risk, planning, sale prices, MEES 2030 checks and grants.
Property Records MCP — address-level US property records (sales history, assessed value, owner…
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables users to search UK property prices by postcode, street, or city using the HM Land Registry's SPARQL endpoint. It also provides tools for resolving postcodes and finding nearby locations through Ordnance Survey data.22MIT
- AlicenseAqualityBmaintenanceUK due diligence MCP server — Companies House, corporate research, compliance checks18401 PyPI3MIT
- AlicenseNot gradedqualityDmaintenanceUK property data MCP server for AI hosts (Claude, ChatGPT). Wraps Land Registry, Rightmove, EPC, rental yields, stamp duty, and Companies House into 13 tools.2MIT
- AlicenseAqualityCmaintenanceFrench building permits MCP server: 1.2M Sitadel permits (2014-2026, daily refresh), DVF transactions, cadastre DGFiP, PLU zoning, BRGM risks, and property-dealer opportunity scoring through 11 MCP tools. Free tier 500 req/month, no credit card.113MIT