MCP Server
Connect AI assistants like Claude Desktop, Cursor, or any MCP-compatible client to Deed Insight for natural language access to UK property & land data.
What is MCP?
The Model Context Protocol (MCP) is an open standard that lets AI assistants connect to external data sources. With Deed Insight's MCP server, you can ask your AI assistant questions like:
- "What's the recent sale history for OX1 5BW?"
- "List every property owned by Companies House number 07465254."
- "Who are the proprietors of title CYM566831?"
- "Show me the most expensive UK property sales ever recorded."
Installation
Prerequisites
- Python 3.12+
asyncpgpackage installed- Network access to the Deed Insight database (or run locally)
Option 1: Claude Desktop
Add to your Claude Desktop config file (~/Library/Application Support/Claude/claude_desktop_config.json on Mac
or %APPDATA%/Claude/claude_desktop_config.json on Windows):
{
"mcpServers": {
"deed-insight": {
"command": "python",
"args": ["-m", "src.mcp.server"],
"cwd": "/path/to/deedinsight/backend"
}
}
}Option 2: Claude Code
Add to your .claude/settings.json:
{
"mcpServers": {
"deed-insight": {
"command": "python",
"args": ["-m", "src.mcp.server"],
"cwd": "/path/to/deedinsight/backend"
}
}
}Option 3: Any MCP client (stdio)
cd /path/to/deedinsight/backend python -m src.mcp.server
The server communicates over stdio using the JSON-RPC protocol.
Available Tools
search
Search UK property records. Auto-detects title number / postcode / free text.
query | string (required) | Title number, postcode, address, or proprietor name |
limit | int | Max results, 1-50 (default: 20) |
get_title
Full detail for a Land Registry title — addresses, proprietors (with Companies House numbers when available), and nearby sale history.
title_number | string (required) | e.g. "CYM566831" |
titles_for_company
Every UK title held by a Companies House company. The bridge from Firm Insight to Deed Insight.
company_number | string (required) | e.g. "07465254" |
limit | int | Max results (default: 50) |
titles_for_proprietor
Every title owned by a proprietor name (exact match — useful for overseas owners that don't have a UK company number).
name | string (required) | Proprietor name |
limit | int | Max results (default: 50) |
search_transactions
Search Price Paid Data sales by postcode, town, date range, or minimum price.
postcode | string | Postcode (full or prefix) |
town | string | Town name (exact) |
from_date | string | YYYY-MM-DD |
to_date | string | YYYY-MM-DD |
min_price_pence | int | Minimum price (pence) |
biggest_sales
Top N most expensive UK property sales ever recorded by HMLR.
limit | int | Max results (default: 20) |
Database Configuration
By default the MCP server reads DB_HOST, DB_PORT, DB_NAME, DB_USER, and DB_PASSWORD from environment variables (falling back to localhost/deedinsight). You can also set DB_URL directly:
export DB_URL="postgresql://chuser:[email protected]:5432/deedinsight" python -m src.mcp.server
Data Coverage
The database contains:
- ~4.4M UK-company-owned titles (CCOD, refreshed monthly)
- ~91k overseas-company-owned titles (OCOD, refreshed monthly)
- ~31M historical sales (Price Paid Data, refreshed monthly)