Skip to main content

UK property data MCP server and API — Land Registry comparable sales, Rightmove listings, EPC certificates, rental analysis, and stamp duty.

Project description

Property Shared

property-shared MCP server

UK property data in one package. Pulls Land Registry sales, EPC certificates, Rightmove listings, rental yields, stamp duty calculations, planning portal links, and Companies House records.

Use it as a Python library, CLI, HTTP API, or MCP server for AI agents.

What You Get

Data Source What It Returns
Land Registry PPD Sold prices, dates, property types, area comps with median/percentiles
EPC Register Energy ratings, floor area, construction age, heating costs
Rightmove Current listings (sale + rent), prices, agents, listing details
Yield Analysis Gross yield from PPD sales + Rightmove rentals combined
Stamp Duty SDLT calculation with April 2025 bands, BTL surcharge, FTB relief
Block Analyzer Groups flat sales by building to spot investor exits
Planning Local council planning portal lookup (99 verified councils)
Companies House Company search and lookup by name or number

Skills

Want structured property reports instead of raw data? Claude skills that chain these tools into investment summaries are available at bouch.dev/products.

Install

pip install property-shared

# or with uv
uv add property-shared

Extras: [cli] for CLI, [api] for HTTP server, [dev] for tests.

pip install property-shared[cli]
# or
uv add property-shared --extra cli

Use as a Python Library

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}%)")

All models are available at top level:

from property_core import (
    PPDTransaction, PPDCompsResponse, EPCData,
    RightmoveListing, RightmoveListingDetail,
    PropertyReport, YieldAnalysis, RentalAnalysis,
    BlockAnalysisResponse, CompanyRecord, StampDutyResult,
)

Interpretation helpers (core returns numbers, you decide how to label them):

from property_core import classify_yield, classify_data_quality, generate_insights

Use as 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

Add --api-url http://localhost:8000 to any command to route through the HTTP API instead of calling core directly.

Use as MCP Server (AI Agents)

For Claude.ai, Claude Code, ChatGPT, or any MCP-compatible host.

pip install uk-property-mcp
property-mcp  # starts stdio transport
# or without installing:
uvx uk-property-mcp

12 tools available: property_report, property_comps, ppd_transactions, property_yield, rental_analysis, property_epc, rightmove_search, rightmove_listing, property_blocks, stamp_duty, planning_search, company_search.

Remote server deployed at https://property-shared.fly.dev/mcp (Streamable HTTP).

Use as HTTP API

pip install property-shared[api]  # or: uv add property-shared --extra api
property-api  # starts on port 8000

Interactive docs at http://localhost:8000/docs.

Key endpoints:

  • GET /v1/ppd/comps?postcode=SW1A+1AA&property_type=F&enrich_epc=true
  • GET /v1/analysis/yield?postcode=NG1+1AA&property_type=F
  • GET /v1/analysis/rental?postcode=NG1+1AA&purchase_price=200000
  • GET /v1/rightmove/search-url?postcode=NG1+1AA&sort_by=newest
  • GET /v1/calculators/stamp-duty?price=300000&additional_property=true
  • POST /v1/property/report with { "address": "10 Downing Street, SW1A 2AA" }

Full endpoint list in USER_GUIDE.md.

Environment Variables

Copy .env.example to .env. Key variables:

Variable Required For Description
EPC_API_EMAIL EPC lookups Free key from EPC Register
EPC_API_KEY EPC lookups Paired with email above
COMPANIES_HOUSE_API_KEY Company search Free key from Companies House
RIGHTMOVE_DELAY_SECONDS No (default 0.6s) Rate limit delay for Rightmove scraping
OPENAI_API_KEY Planning scraper Vision-guided planning portal scraper

Land Registry PPD and Rightmove work without credentials.

Development

# 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

Architecture

Three-layer separation — core stays framework-agnostic:

property_core/     Pure Python library (all business logic)
app/               FastAPI wrapper (thin HTTP layer)
property_cli/      Typer CLI (thin CLI layer)

All three consumers import directly from property_core. No adapter layers.

Deploy (Fly.io)

fly secrets set EPC_API_EMAIL=... EPC_API_KEY=...
fly deploy

Deployed at https://property-shared.fly.dev with API docs at /docs and MCP endpoint at /mcp.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

property_shared-1.7.1.tar.gz (678.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

property_shared-1.7.1-py3-none-any.whl (136.5 kB view details)

Uploaded Python 3

File details

Details for the file property_shared-1.7.1.tar.gz.

File metadata

  • Download URL: property_shared-1.7.1.tar.gz
  • Upload date:
  • Size: 678.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for property_shared-1.7.1.tar.gz
Algorithm Hash digest
SHA256 dee9e9d14b4f6a3ebdefe0e672bc5208cf2b1fb76b74222f2900641327562e37
MD5 6062263a400f973decb50a3de6e4b826
BLAKE2b-256 7fcc71e4f1f619bf4ff59d59b9fe67fd6fdd2ed4d29d471b04fc3548f1062410

See more details on using hashes here.

Provenance

The following attestation bundles were made for property_shared-1.7.1.tar.gz:

Publisher: release.yml on paulieb89/property-shared

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file property_shared-1.7.1-py3-none-any.whl.

File metadata

  • Download URL: property_shared-1.7.1-py3-none-any.whl
  • Upload date:
  • Size: 136.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for property_shared-1.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7e8521e072d57a9da82d923f5f94d2a1d7e519794f5dbcaaa89fcc158df08956
MD5 1bff95ee834733065ac0c5500833476a
BLAKE2b-256 eb8913d3e56db6cfccaf80ca631ff4ae9407fdcf8c2ddea7e4d04ebf0257322a

See more details on using hashes here.

Provenance

The following attestation bundles were made for property_shared-1.7.1-py3-none-any.whl:

Publisher: release.yml on paulieb89/property-shared

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page