Rental data API and MCP
Give your software or AI the council, rule and source behind an English rental decision. Postcode licence checks, council schemes and rules are free over MCP. A REST lookup costs one credit and a property assessment costs ten.
GET /api/examples/rules/gas-safety-annual-check
Annual gas safety check by a Gas Safe registered engineer
- Status in the catalogue
- in_force
- Check interval
- 12 months
Rental data
Read 79 sourced rules, research for 293 of 296 English councils, postcode checks and area market figures. Checks, council schemes and rules are free over MCP. Each delivered REST lookup uses one credit.
Public OpenAPI specificationCoverage and freshness · Compare evidence for up to 25 UPRNs · Application outcomesProperty assessments
Send a home’s letting facts for dated licensing findings and evidence checks. Compare successive results under the property ID and schedule you already use.
Property API and sandboxx402 offerCheck coverage before spending
See which council can be resolved, whether local licensing has been reviewed and which property facts would make the answer more precise.
Check a propertyOn this page
Quickstart
Loading the council directory…
Connect a client
Connect over Streamable HTTP. No sign-in or account is needed for check_address, council_licensing, search_rules, get_rule, plan_rental, data_coverage, council_reviews and preflight_property. They are free, up to 120 tool calls every 10 minutes per network address. For paid pulls, authorise spending project credits through OAuth (credits:spend) or configure a scoped project bearer key. The server is listed in the MCP Registry as com.lettance/rules.
- In Claude on the web or desktop, open Customize, then Connectors.
- Choose Add, then Add custom connector.
- Name it Lettance and paste the server address below, then choose Continue.
- No sign-in is needed for postcode licence checks, council schemes, rules and plans. Choose OAuth and approve the Lettance spending permission only for credit-funded tools.
- In a chat, open + then Connectors, and turn Lettance on.
Custom connectors work on Free, Pro, Max, Team and Enterprise plans. Free accounts can add one. On Team and Enterprise, an owner adds it under Organization settings, then Connectors.
Claude's guide to custom connectorsRun this in a terminal. Add --scope user to use Lettance in every project, or --scope project to share it with your team in .mcp.json.
claude mcp add --transport http lettance https://lettance.com/mcp{
"mcpServers": {
"lettance": {
"type": "http",
"url": "https://lettance.com/mcp"
}
}
}- Go to chatgpt.com/plugins, choose +, then Add custom MCP server. You do not need to turn on developer mode first.
- Name it Lettance and enter the ChatGPT-specific server address below as the Server URL.
- Choose OAuth or no authentication (mixed). Postcode licence checks, council schemes, rules and coverage run anonymously. Sign in and approve credit spending for paid tools.
- Tick I understand and want to continue, then choose Create as a plugin.
- Install it, then mention Lettance in a chat.
Full custom MCP connections are available on the web for ChatGPT Business, Enterprise and Edu; on Business, an admin or owner adds the server. OpenAI also lists limited read/fetch access for Pro, which Lettance has not tested. Where your ChatGPT account supports GPT Actions, configure a bearer key for paid reads in the reference schema at lettance.com/api/v1/openapi.json.
OpenAI's guide to custom MCP serversRun this in a terminal, or add the lines below to ~/.codex/config.toml.
codex mcp add lettance --url https://lettance.com/mcp[mcp_servers.lettance]
url = "https://lettance.com/mcp"- Run this in a terminal, or add the entry below to ~/.gemini/settings.json. httpUrl tells Gemini CLI to use Streamable HTTP.
- Google moved unpaid and Google One users from Gemini CLI to Antigravity CLI on 18 June 2026. Antigravity CLI reads ~/.gemini/config/mcp_config.json and uses serverUrl instead.
gemini mcp add --transport http --scope user lettance https://lettance.com/mcp{
"mcpServers": {
"lettance": {
"httpUrl": "https://lettance.com/mcp"
}
}
}{
"mcpServers": {
"lettance": {
"serverUrl": "https://lettance.com/mcp"
}
}
}Choose Add to Cursor with Cursor installed, or add the entry below to ~/.cursor/mcp.json (or .cursor/mcp.json in a project).
{
"mcpServers": {
"lettance": {
"url": "https://lettance.com/mcp"
}
}
}- Choose Install in VS Code, or add the entry below to .vscode/mcp.json in your workspace. Then use Lettance from Copilot Chat in agent mode.
- VS Code tries Streamable HTTP first. Workspace servers need the folder to be trusted.
{
"servers": {
"lettance": {
"type": "http",
"url": "https://lettance.com/mcp"
}
}
}code --add-mcp '{"name":"lettance","type":"http","url":"https://lettance.com/mcp"}'- Windsurf is now Devin Desktop. Run this in a terminal, or add the entry below to ~/.config/devin/mcp_config.json (%APPDATA%\devin\mcp_config.json on Windows).
- Both the Devin Local agent and Cascade read this file.
devin mcp add -s user lettance https://lettance.com/mcp{
"mcpServers": {
"lettance": {
"url": "https://lettance.com/mcp"
}
}
}On Enterprise plans, an admin turns MCP on first.
Devin Desktop's MCP guideGive Grok the Lettance server as a remote MCP tool in the xAI Responses API. Grok calls the tools itself. Both examples allow only the free council_reviews tool. Set XAI_MODEL to an MCP-capable model on your xAI account and XAI_API_KEY to your xAI API key. To use the hosted Grok chat, add a custom connector at grok.com/connectors.
jq -n --arg model "$XAI_MODEL" '{
model: $model,
input: "Use council_reviews for york and give the latest independent review date with its source.",
tools: [{type: "mcp", server_url: "https://lettance.com/mcp", server_label: "lettance", allowed_tools: ["council_reviews"]}]
}' | curl -fsS https://api.x.ai/v1/responses --json @- -H "Authorization: Bearer $XAI_API_KEY"import os
from openai import OpenAI
client = OpenAI(api_key=os.environ["XAI_API_KEY"], base_url="https://api.x.ai/v1")
response = client.responses.create(
model=os.environ["XAI_MODEL"],
input=[{"role": "user", "content": "Use council_reviews for york and give the latest independent review date with its source."}],
tools=[{"type": "mcp", "server_url": "https://lettance.com/mcp", "server_label": "lettance",
"allowed_tools": ["council_reviews"]}],
)
print(response.output_text)Another client? Add https://lettance.com/mcp as a remote Streamable HTTP server. Keep API credentials in the client’s secret store.
MCP tools
For a paid call, supply a UUID as requestId in the tool arguments. Reuse it only for retries of that observation. Free tools ignore it. compare_addresses, area_market, register_reference, application_outcome_benchmark and an evidence pull for up to 25 UPRNs cost one credit each. An assessment, including one requested through property_history, costs ten. Read the receipt in _meta["com.lettance/receipt"]. Call tools/list on your connected endpoint for the available tools and their input schemas.
The free postcode check answers from the postcode and household type. assess_property checks one exact property’s household and building facts against the reviewed scheme terms. It returns a dated finding with evidence and a receipt. Run preflight_property first to see scope, missing facts and cost.
- check_address
- postcode (max 16 characters), household?
- Free. Whether a home at the postcode needs a council licence for the household type (yes, no or check), each scheme with its dates, fee, exemptions and sources, the registration window and planning context. A decision on one exact property needs a property assessment.
- search_rules
- query (1 to 500 characters)
- Free. Up to 10 matching rule summaries, each with its status and a link to the full rule.
- get_rule
- id (max 120 characters)
- Free. The full rule: legal basis, guidance, requirement, deadlines, evidence and confidence.
- council_licensing
- council (max 120 characters)
- Free. A council's schemes, source links, research dates and open questions. Returns researched: false if we have not researched that council yet.
- plan_rental
- postcode (max 16 characters), household?, letting?, tenancy_start?, last_gas_check?, last_electrical_inspection?, epc_rating?, …
- Free. A home's dated plan for the next 12 months: each duty's status, date and cited rules, the questions still worth asking, and links to the interactive plan and a calendar file. Statuses reflect the supplied letting facts.
- compare_addresses
- postcodes (2 to 4, each max 16 characters), household?, requestId
- Each postcode's check and area market figures, and a side-by-side table where every field names its source, licence and dates. Missing postcodes retain their status. One credit if at least one property resolves; zero if none resolves.
- area_market
- postcode (max 16 characters), requestId
- One credit. ONS average private rent for the council area and HM Land Registry median sale price for the postcode district, from a dated snapshot, with attribution. No charge when neither figure is available.
- data_coverage
- No arguments
- Free. Dataset coverage, source dates, review scope and missing areas.
- council_reviews
- council?, limit?, offset?, edition?
- Free. Find changed or unavailable council sources, affected fields and independent review dates. Pin the edition when paging.
- preflight_property
- facts: { postcode, household?, … }
- Free. Council, scope, missing facts and the price of a property assessment.
- property_history
- properties, since?, asOf?, mode?, knownOn?, requestId
- One credit for evidence on up to 25 UPRNs. Include letting facts for one ten-credit property assessment.
- register_reference
- sourceId, reference, asOf?, requestId
- One credit for a matching council licence or planning reference. No charge for a missing record.
- application_outcome_benchmark
- councilGss, schemeType, requestId
- One credit for a published quarterly aggregate. Insufficient cohorts are free.
- assess_property
- requestId, facts: { postcode, household, … }, acceptNationalOnly?
- Ten credits. Dated licensing findings, source evidence and a comparable fingerprint.
Call the endpoint directly
The endpoint is stateless and returns JSON without opening an event stream. Initialize, send notifications/initialized with no id, then call tools with the negotiated MCP-Protocol-Version header. Send one message per POST.
curl https://lettance.com/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"your-app","version":"1.0.0"}}}'curl https://lettance.com/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H 'MCP-Protocol-Version: 2025-11-25' \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"data_coverage","arguments":{}}}'Browser requests to the MCP endpoint need an allowed Origin, so call it from your own backend. Call paid REST endpoints from your backend so credentials stay private.
REST API
The same data as JSON over HTTPS GET, with a production bearer key scoped to data:read. Every successful REST lookup costs one credit. Send a unique Idempotency-Key for each intended pull and reuse it to recover that result. The coverage endpoint is free. Answers have data and meta: meta.sources lists the sources behind the answer, and meta.coverage says how much of England we have researched.
- GET /api/v1/coverage
- Geographic coverage, source dates and limitations for Lettance’s datasets.
- GET /api/v1/check
- postcode (max 16 characters), household?
- Council, scheme facts and planning context for a postcode. licence.needed is check here. Use a property assessment for applicability.
- GET /api/v1/compare
- postcode (repeat 2 to 4 times, each max 16 characters), household?
- Postcodes side by side with individual statuses. One credit when any property resolves. With zero usable properties, permanent misses return 404 and an upstream outage returns 503. Both cost zero credits.
- GET /api/v1/area-market
- postcode (max 16 characters)
- Available rents and sale prices for the postcode. If neither observation is available, the response is 404 no_data_available with no charge.
- GET /api/v1/councils
- Every English council, with whether and when its licensing was researched.
- GET /api/v1/councils/{slug}
- slug (max 120 characters)
- One council’s factual scheme dates and types, source links and open-question count, or researched: false.
- GET /api/v1/rules
- q? (max 500 characters)
- Every rule, or up to 10 matches. An empty search result is 404 no_data_available with no charge.
- GET /api/v1/rules/{id}
- id (max 120 characters)
- One rule in full, with its legal basis and guidance.
- GET /api/v1/plan
- postcode (max 16 characters), household?, let?, start?, gas_check?, eicr?, epc?, …
- A home's dated plan, as the plan_rental tool returns it. Parameters match the /plan page's address.
- GET /api/v1/plan/calendar
- the same as /api/v1/plan
- The plan's future dates as an iCalendar file, with reminders. One credit per authenticated export.
export POSTCODE_PULL_ID="${POSTCODE_PULL_ID:-$(uuidgen)}"
curl -isS --fail-with-body 'https://lettance.com/api/v1/check?postcode=SE15%205BA&household=small_hmo' \
-H "Authorization: Bearer ${LETTANCE_KEY:?Set your production project key}" \
-H "Idempotency-Key: ${POSTCODE_PULL_ID:?Set a unique purchase ID}"export COMPARE_PULL_ID="${COMPARE_PULL_ID:-$(uuidgen)}"
curl -isS --fail-with-body 'https://lettance.com/api/v1/compare?postcode=SE15%205BA&postcode=SW6%201HS' \
-H "Authorization: Bearer ${LETTANCE_KEY:?Set your production project key}" \
-H "Idempotency-Key: ${COMPARE_PULL_ID:?Set a unique purchase ID}"{
"data": {
"postcode": "SE15 5BA",
"licence": { "needed": "check", "summary": "Check the designation for the exact address, boundary, exclusions and current charge. …", "schemes": [ … ] },
…
},
"meta": {
"sources": ["https://postcodes.io/", "https://www.southwark.gov.uk/…", …],
"coverage": "… English councils researched from council sources …",
"notice": "Information, not legal advice. …",
"catalogueDate": "…",
"links": { "documentation": "…", "openapi": "https://lettance.com/openapi.json", "html": "…" }
}
}Rental plans
A rental plan is one home's duties for the next 12 months, each with its status, date and cited rules. Supply a postcode and any known letting facts, such as the tenancy start or most recent gas safety check. The response identifies missing facts for your application to collect.
Statuses use the facts supplied in the request. Quote the dates exactly and link the rules. Keep the receipt with the observation.
export PLAN_PULL_ID="${PLAN_PULL_ID:-$(uuidgen)}"
curl -isS --fail-with-body 'https://lettance.com/api/v1/plan?postcode=SW9%207AA&let=now&start=2025-06-01&gas_check=2025-12-10&eicr=2021-11-20' \
-H "Authorization: Bearer ${LETTANCE_KEY:?Set your production project key}" \
-H "Idempotency-Key: ${PLAN_PULL_ID:?Set a unique purchase ID}"{"name":"plan_rental","arguments":{"postcode":"SW9 7AA","letting":"now","tenancy_start":"2025-06-01","last_gas_check":"2025-12-10","last_electrical_inspection":"2021-11-20"}}Each answer has a query parameter on the API and an argument on the tool; questions names both. links.plan opens the same plan as an interactive page, and links.calendar returns an iCalendar export for an authenticated one-credit pull. Your application can import the file or publish its own calendar. People can make their own at lettance.com/plan.
OpenAPI
The combined schema covers reference data and property intelligence. The intelligence schema documents dated UPRN history, council reviews, register references, assessments and wallet payments. For a GPT Action, import the reference-only schema, configure bearer authentication and supply a fresh UUID as purchaseId for each paid Action. Reuse that UUID for retries.
TypeScript client
Install lettance from npm for Node.js 22 or newer. It includes TypeScript declarations and has no runtime dependencies. For a single-file integration, download the TypeScript source.
npm install lettanceimport { LettanceRestClient } from "lettance";
const history = await new LettanceRestClient().propertyHistoryExample();
console.log(history.since, history.asOf, history.properties.length);import { LettanceRestClient } from "lettance";
const key = process.env.LETTANCE_KEY;
const purchaseId = process.env.SOUTHWARK_PULL_ID;
if (!key || !purchaseId) throw new Error("Set LETTANCE_KEY and SOUTHWARK_PULL_ID from the Paid REST quickstart.");
const api = new LettanceRestClient({ key });
const { data, meta, receipt } = await api.readData("councils/southwark", {}, purchaseId);
console.log(data.researched, meta.sources, receipt);
Use coverage(), councilReviews() or preflight(facts) without a key. For a paid assessment, call assess(facts, requestKey). Errors expose the HTTP status, code and optional retry interval. The SDK never automatically retries a purchase. See the scheduled comparison example.
Agent skill
The Lettance skill tells agents that read SKILL.md files, such as Claude Code and Codex, when to use Lettance. It also tells them how to answer: lead with the answer, link the law and flag anything not yet confirmed. It uses the MCP tools when connected and the REST API when not.
npx skills add https://lettance.com --skill lettancemkdir -p ~/.claude/skills/lettance
curl -fsS https://lettance.com/skills/lettance/SKILL.md -o ~/.claude/skills/lettance/SKILL.mdmkdir -p ~/.agents/skills/lettance
curl -fsS https://lettance.com/skills/lettance/SKILL.md -o ~/.agents/skills/lettance/SKILL.mdRun the same command again to update an installed copy. The metadata.version field in the downloaded file identifies the release. For one project, use .claude/skills/lettance or .agents/skills/lettance. The skill follows the open Agent Skills format.
Markdown and llms.txt
Agents that read web pages can skip the HTML. Every rule, council and region page has a Markdown copy at the same address plus .md.
- llms.txt: an index of integration and research resources.
- llms-full.txt: the complete integration guide, with authentication, credit prices, request examples and coverage links.
- Examples: /rules/gas-safety-annual-check.md, /councils/southwark.md, /london.md.
Credits, keys and receipts
Checking one property? Check its coverage for free, then sign in if you want to buy the assessment with credits. The developer console shows your balance and receipts. You can also create a key there to connect your own software.
Credits
Top up by card with 10 credits for £1.60 or 50 credits for £8.00, or choose a custom amount at the same price per credit. Each delivered REST lookup or paid MCP tool call spends one credit. A property assessment spends 10. The free MCP tools spend nothing. Check coverage before buying. Wallet clients can buy one assessment via x402.
View balance and buy creditsAPI keys
Create a sandbox key for the published fictional property fixtures. For live data, create a production key and choose data:read for reference lookups or assess:read for assessments. Keep the key in your server or agent host’s secret store and send it in the Authorization header.
export SOUTHWARK_PULL_ID="${SOUTHWARK_PULL_ID:-$(uuidgen)}"
curl -isS --fail-with-body 'https://lettance.com/api/v1/councils/southwark' \
-H "Authorization: Bearer ${LETTANCE_KEY:?Set your production project key}" \
-H "Idempotency-Key: ${SOUTHWARK_PULL_ID:?Set a unique purchase ID}"Receipts and retries
Generate a fresh UUID for each intended purchase. Use it as Idempotency-Key over REST or requestId in an MCP tool call. If delivery is interrupted, retry the same operation and input with the same UUID to retrieve the purchase. A new UUID buys a fresh result.
Recent pulls in your console shows the operation, charge and receipt for each successful credit purchase. Your application decides when to pull again.
Errors and limits
Input and source errors include error.code and a message. Access and payment errors use a top-level string error. A 401 or 403 means you need the correct key and scope. For 402 insufficient_credits, add credits and retry the original request. A 409 idempotency_conflict means the request ID belongs to a different purchase.
- invalid_request
- 400
- A parameter is missing or malformed. A postcode longer than 16 characters, or a rule search longer than 500 characters, is rejected rather than shortened.
- not_found
- 404
- No rule, council or postcode matches. A council or rule id longer than 120 characters is not found.
- outside_england
- 422
- The postcode is in Wales, Scotland or Northern Ireland.
- rate_limited
- 429
- Too many requests from this IP address in the 10-minute window. Wait for the Retry-After time.
- upstream_unavailable
- 503
- A public data source did not answer. Try again shortly.
A rate limit returns 429. Follow Retry-After when present and back off before retrying a temporary failure. Reuse the same purchase ID and inputs to recover a delivered response. A fresh ID starts a new purchase even when the underlying data has stayed the same.
A postcode longer than 16 characters, a council or rule id longer than 120 characters, and a rule search longer than 500 characters are rejected rather than shortened. On the REST API a long postcode or rule search is HTTP 400 and a long council or rule id is HTTP 404. MCP reports them as invalid tool arguments. compare_addresses, area_market, and plan_rental include these maxima in tools/list. The four directory-reviewed public tools keep their reviewed schemas, which do not repeat the maxima; the server still enforces them.
Versions
The public server is version 2.2.0 and supports MCP protocol versions 2025-11-25, 2025-06-18, 2025-03-26. The REST API is versioned in its path, so /api/v1 keeps its shape. New fields can be added; existing ones are not renamed or removed within a version.
Sources and attribution
- Data coverage and freshness lists the geographic scope and source dates for each dataset. Fetch the same report as JSON.
- Rules. Show
status,confidenceandlegal_basis, and link the rule page and the cited legislation or guidance. Proposed rules are not law yet. - Council licensing. Keep
source_urls,researched_at,verified_atandopenQuestionCount. These identify the review dates and outstanding verification work. - Location. postcodes.io finds the postcode and ward, and Planning Data supplies planning context. A null planning count means that source was unavailable. Zero records means the lookup found no match at the postcode centre. Check the exact address against the official designation.
- Local rents and sale prices.
area_marketand comparisons read a dated snapshot of the ONS Price Index of Private Rents (council area) and HM Land Registry Price Paid Data (postcode district, at least 10 sales). Both are under the Open Government Licence v3.0: show each figure'ssource.attributionwith its period and release date. They describe an area, not one home. - Reuse. Each paid JSON read includes
sourceManifestwith the published field and reuse terms. Preserve dataset attribution and check each source’s licence before redistribution.
This is information, not legal advice. Check the stated review dates for your decision. Read how we research and check sources.
Commercial use
Use free coverage checks and published examples to evaluate the data. Fund a project with a one-off credit pack to buy live rental data and property assessments. Your system controls when it pulls, compares and alerts.