{"$schema":"https://api.postcodecontext.uk/schemas/mcp-discovery.json","name":"postcode-context","version":"1.0.0","description":"Great Britain Postcode & Outcode Intelligence MCP Server covering England, Scotland, and Wales across 1.76M postcodes. Provides area-level context including ONS Census 2021 & NRS Scotland Census 2022 demographics, statutory IMD deprivation deciles, HM Land Registry & Registers of Scotland property prices, Open & Scottish EPC ratings, Ofcom broadband, nearest schools, GP healthcare, and National Rail/metro proximity. Excludes Northern Ireland (BT) and Crown Dependencies (JE, GY, IM).","provider":{"organization":"PostcodeContext.UK","url":"https://api.postcodecontext.uk","contact":"support@postcodecontext.uk"},"documentation":{"home":"https://api.postcodecontext.uk","openapi":"https://api.postcodecontext.uk/openapi.json","dictionary":"https://api.postcodecontext.uk/api/v1/dictionary","attribution":"https://api.postcodecontext.uk/api/v1/attribution","legal":"https://api.postcodecontext.uk/terms","llms_txt":"https://api.postcodecontext.uk/llms.txt","mcp_guide":"https://api.postcodecontext.uk/mcp-guide"},"coverage":{"territorial_scope":"Great Britain (England, Scotland, Wales)","exclusions":"Covers Great Britain (England, Scotland, and Wales). Northern Ireland (BT) postcodes and Crown Dependencies (JE, GY, IM) are not covered."},"servers":[{"name":"production","endpoint":"https://api.postcodecontext.uk/mcp","transport":"streamable-http","protocolVersion":"2025-11-25","supportedProtocolVersions":["2025-11-25","2025-06-18","2025-03-26","2024-11-05"],"authentication":{"type":"x402","protocol":"x402-v2","network":"eip155:8453","token":"USDC","tokenAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","tokenDecimals":6,"recipient":"0x8ab7568ac097523e81a94644235fcf19a2b85670","rates":{"lookup_postcode":"$0.005 USDC per query","compare_postcodes":"$0.010 USDC (covers 2 to 5 postcodes)","enrich_postcodes":"$0.050 USDC (covers up to 50 postcodes)","summarise_outcode":"$0.005 USDC per query","get_postcode_ai_brief":"$0.005 USDC per query","get_property_and_energy_profile":"$0.005 USDC per query","get_demographics_and_deprivation":"$0.005 USDC per query","screen_postcodes":"$0.010 USDC (covers 2 to 5 postcodes)","get_data_attribution":"$0.000 USDC (no payment or auth required; subject to Terms of Service)","get_data_dictionary":"$0.000 USDC (no payment or auth required; subject to Terms of Service)"},"atomicRates":{"lookup_postcode":"5000","compare_postcodes":"10000","enrich_postcodes":"50000","summarise_outcode":"5000","get_postcode_ai_brief":"5000","get_property_and_energy_profile":"5000","get_demographics_and_deprivation":"5000","screen_postcodes":"10000","get_data_attribution":"0","get_data_dictionary":"0"}},"capabilities":{"tools":true,"resources":true,"prompts":false}}],"resources":[{"uri":"postcode://data-dictionary","name":"data_dictionary","title":"Postcode Context Data Dictionary","description":"Complete field definitions, mathematical formulas, statistical scales, and data sources for all 113 metrics in the database.","mimeType":"application/json"},{"uri":"postcode://data-attribution","name":"data_attribution","title":"Postcode Context Statutory Attribution & Provenance Register","description":"Official statutory attribution statements, Crown copyright notices, and Open Government Licence v3.0 metadata across all 19 data providers.","mimeType":"application/json"}],"tools":[{"name":"lookup_postcode","aliases":["get_postcode_intelligence"],"x-openapi-operationId":"get_postcode_intelligence","title":"Lookup Great Britain Postcode Intelligence Profile","description":"Use when you need demographic, property, EPC energy efficiency, broadband, or socio-economic context for a Great Britain unit postcode (England, Scotland, Wales). Returns full profile by default; use view=\"brief\" (~80 tokens) for low-token, concise briefings when managing context budget. Do not use for non-GB postcodes (e.g. Northern Ireland BT) or when comparing multiple postcodes simultaneously (use compare_postcodes instead).","price":"$0.005 USDC","annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","additionalProperties":false,"properties":{"postcode":{"type":"string","description":"Great Britain unit postcode to analyze (e.g. SW1A 1AA, BB7 3BB, EH1 1YZ, CF10 1EP). Space-optional, case-insensitive."},"view":{"type":"string","enum":["full","brief","summary","ai","property","demographics","education","healthcare","transit","services","schools","health","transport","infrastructure"],"default":"full","description":"View slice to return: \"full\" (complete 113-metric profile, default), \"brief\" (or \"summary\"/\"ai\", ~80 tokens summary with AI affluence tier & persona, recommended for token efficiency), \"property\" (prices & EPC), \"demographics\" (Census & IMD deciles), \"education\" (or \"schools\"), \"healthcare\" (or \"health\"), \"transit\" (or \"transport\"), or \"services\" (or \"infrastructure\")."},"exclude":{"description":"Optional domain(s) to exclude: \"schools\", \"healthcare\", \"transit\" as a comma-separated string (e.g. \"schools, healthcare\") or an array of strings (e.g. [\"schools\", \"healthcare\"]). Note: exclude only applies when view=\"full\"; ignored if a specific view slice is selected.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["postcode"]}},{"name":"compare_postcodes","aliases":["compare_gb_postcodes","compare_uk_postcodes"],"x-openapi-operationId":"compare_gb_postcodes","title":"Compare Great Britain Postcodes Side-by-Side","description":"Use when you need to directly contrast 2 to 5 Great Britain postcodes across affluence, safety, housing cost per m², broadband, and family suitability. Returns full profiles by default; use view=\"brief\" (~80 tokens per postcode) to keep context compact alongside the comparison ranking. Do not use for single postcode inspection (use lookup_postcode) or bulk batches of >5 postcodes (use enrich_postcodes).","price":"$0.010 USDC","annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","additionalProperties":false,"properties":{"postcodes":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":5,"description":"Array of 2 to 5 Great Britain postcodes to compare."},"view":{"type":"string","enum":["full","brief","summary","ai","property","demographics","education","healthcare","transit","services","schools","health","transport","infrastructure"],"default":"full","description":"View slice for returned postcode profiles: \"full\" (complete profile per postcode, default), \"brief\" (or \"summary\"/\"ai\", ~80 tokens per postcode, recommended to minimize context usage alongside comparison ranking), \"property\", \"demographics\", \"education\", \"healthcare\", \"transit\", or \"services\"."}},"required":["postcodes"]}},{"name":"enrich_postcodes","aliases":["enrich_postcodes_batch"],"x-openapi-operationId":"enrich_postcodes_batch","title":"Enrich Bulk Great Britain Postcodes Cohort","description":"Bulk demographic, economic, and spatial lookup for 1 to 50 Great Britain postcodes. Returns brief profile by default (~80 tokens per postcode) to prevent context blow-up; use view=\"full\" when all 113 metrics are needed. Cost-effective for 6 to 50 postcodes ($0.050 flat fee). For 1 postcode use lookup_postcode ($0.005); for 2 to 5 postcodes use compare_postcodes ($0.010). Do not use when detailed side-by-side comparative rankings are required (use compare_postcodes).","price":"$0.050 USDC","annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","additionalProperties":false,"properties":{"postcodes":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":50,"description":"Array of 1 to 50 Great Britain postcodes to enrich. Cost-effective for 6 to 50 postcodes ($0.050 flat fee). For 1 postcode use lookup_postcode ($0.005); for 2 to 5 postcodes use compare_postcodes ($0.010)."},"view":{"type":"string","enum":["full","brief","summary","ai","property","demographics","education","healthcare","transit","services","schools","health","transport","infrastructure"],"default":"brief","description":"View slice for each postcode in the batch results: \"brief\" (or \"summary\"/\"ai\", ~80 tokens per postcode, default for batch calls to prevent context blow-up), \"full\" (complete 113-metric dataset per postcode, explicitly requested when all metrics needed), \"property\", \"demographics\", \"education\", \"healthcare\", \"transit\", or \"services\"."}},"required":["postcodes"]}},{"name":"summarise_outcode","aliases":["get_outcode_district_summary"],"x-openapi-operationId":"get_outcode_district_summary","title":"Summarise Outward Postal District","description":"Use when you only have an outward code / district (e.g. SW1A, BB7, EH1, CF10) and need high-level district demographic and property statistics (~150 tokens). Do not use when an exact full unit postcode is available (use lookup_postcode).","price":"$0.005 USDC","annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","additionalProperties":false,"properties":{"outcode":{"type":"string","description":"Valid outward postal district code (e.g. SW1A, BB7, EH1, CF10)."},"view":{"type":"string","enum":["full","brief","summary","ai","property","demographics","education","healthcare","transit","services","schools","health","transport","infrastructure"],"default":"full","description":"Optional view slice to return: \"full\" (complete district summary, default), \"brief\" (or \"summary\"/\"ai\", ~80 tokens context summary), \"property\", \"demographics\", \"education\", \"healthcare\", \"transit\", or \"services\"."},"exclude":{"description":"Optional domain(s) to exclude: \"schools\", \"healthcare\", \"transit\" as a comma-separated string (e.g. \"schools, healthcare\") or an array of strings (e.g. [\"schools\", \"healthcare\"]). Note: exclude only applies when view=\"full\"; ignored if a specific view slice is selected.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["outcode"]}},{"name":"get_postcode_ai_brief","aliases":[],"x-openapi-operationId":"get_postcode_intelligence","title":"Get Great Britain Postcode AI Briefing (Low-Token)","description":"Retrieve an ultra-lightweight, token-efficient natural language briefing, affluence tier, and persona profile (~80 tokens) for fast autonomous agent decision-making across Great Britain. Covers England, Scotland, and Wales (excludes Northern Ireland BT postcodes).","price":"$0.005 USDC","annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","additionalProperties":false,"properties":{"postcode":{"type":"string","description":"Great Britain unit postcode to summarize (e.g. SW1A 1AA, BB7 3BB, EH1 1YZ, CF10 1EP). Space-optional, case-insensitive. Returns ~80 tokens of concise natural language context for LLM agents."}},"required":["postcode"]}},{"name":"get_property_and_energy_profile","aliases":[],"x-openapi-operationId":"get_postcode_intelligence","title":"Get Great Britain Property & Energy Efficiency Profile","description":"Retrieve real estate valuation (HM Land Registry / Registers of Scotland median house price, price per sqm, 3yr sales volume), EPC energy efficiency (current/potential band, retrofit upside), and Ofcom gigabit broadband connectivity for any Great Britain postcode. Covers England, Scotland, and Wales (excludes Northern Ireland BT postcodes).","price":"$0.005 USDC","annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","additionalProperties":false,"properties":{"postcode":{"type":"string","description":"Great Britain unit postcode to inspect for real estate transactions, £/sqm, and EPC ratings (e.g. SW1A 1AA, BB7 3BB, EH1 1YZ, CF10 1EP). Space-optional, case-insensitive."}},"required":["postcode"]}},{"name":"get_demographics_and_deprivation","aliases":[],"x-openapi-operationId":"get_postcode_intelligence","title":"Get Great Britain Demographics & Deprivation Profile","description":"Retrieve Census demographic breakdown (ONS Census 2021 / NRS Scotland Census 2022 income estimate, qualifications, tenure, employment, age) and statutory IMD deprivation deciles (IoD 2025, WIMD 2025, SIMD 2020 crime safety, education, living environment) for any Great Britain postcode. Covers England, Scotland, and Wales.","price":"$0.005 USDC","annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","additionalProperties":false,"properties":{"postcode":{"type":"string","description":"Great Britain unit postcode to inspect for Census demographics and statutory IMD deprivation deciles (e.g. SW1A 1AA, BB7 3BB, EH1 1YZ, CF10 1EP). Space-optional, case-insensitive."}},"required":["postcode"]}},{"name":"screen_postcodes","aliases":[],"x-openapi-operationId":"compare_gb_postcodes","title":"Screen & Rank Great Britain Postcodes","description":"Rank and screen 2 to 10 Great Britain postcodes by a specific target metric (affluence, house price, crime safety, broadband speed, family suitability, or connectivity). Returns a sorted leaderboard. For 11 to 50 postcodes use enrich_postcodes; for full cross-metric comparison of 2 to 5 postcodes use compare_postcodes.","price":"$0.010 USDC","annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","additionalProperties":false,"properties":{"postcodes":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":10,"description":"List of 2 to 10 Great Britain postcodes to screen and rank (e.g. [\"SW1A 1AA\", \"BB7 3BB\", \"M1 1AE\"]). Maximum 10 postcodes."},"metric":{"type":"string","enum":["affluence","house_price","crime_safety","broadband_speed","family_suitability","connectivity"],"description":"Target metric to rank postcodes by: \"affluence\" (1-100 score), \"house_price\" (median GBP), \"crime_safety\" (IMD crime decile), \"broadband_speed\" (gigabit availability), \"family_suitability\" (1-100 score), or \"connectivity\" (transit & broadband)."},"order":{"type":"string","enum":["desc","asc"],"default":"desc","description":"Sort order: \"desc\" (highest first, default) or \"asc\" (lowest first)."}},"required":["postcodes","metric"]}},{"name":"get_data_attribution","aliases":[],"x-openapi-operationId":"get_data_attribution","title":"Get Data Provenance & Statutory Attribution Register","description":"$0.00 USDC reference tool (no payment or authentication required; subject to Terms of Service): Retrieve official statutory attribution statements, Crown copyright notices, Royal Mail Gridlink sublicence details, and Open Government Licence v3.0 metadata across all 19 contributing data providers (ONS, OS, Royal Mail, HM Land Registry, Registers of Scotland, MHCLG, Ofcom, Scottish Government, Welsh Government, DfE, CQC, PHS, NWSSP, DfT, ORR).","price":"$0.000 USDC","annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","additionalProperties":false,"properties":{}}},{"name":"get_data_dictionary","aliases":[],"x-openapi-operationId":"get_data_dictionary","title":"Get Data Dictionary & Field Methodology","description":"$0.00 USDC reference tool (no payment or authentication required; subject to Terms of Service): Retrieve exact field specifications, mathematical calculation formulas, statistical scales, and data sources for any metric across Great Britain in the Postcode Context database.","price":"$0.000 USDC","annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","additionalProperties":false,"properties":{"domain":{"type":"string","enum":["all","summary_for_ai","property_and_energy","deprivation_deciles","census_demographics","digital_infrastructure","location","query_and_fallbacks","landmark_context","schools_and_education","education_and_schools","healthcare_and_services","transit"],"default":"summary_for_ai","description":"Statistical domain category filter. Use \"summary_for_ai\" (default) for a compact token-efficient overview (~8 fields) for AI agents, or \"all\" for the complete 113-metric specification."},"field":{"type":"string","description":"Optional specific field name to inspect."}}}}]}