Postcodes

Postcode lookup

Turns a UK postcode, or a latitude and longitude, into its place on the map: coordinates, ward, local authority, parliamentary constituency, region, country and police force. postcodes.io builds on ONS, Ordnance Survey and Royal Mail open data. The other servers use it to find places, so a postcode works wherever a tool asks for a location.

Publisher
postcodes.io
Coverage
UK
Endpoint
pubmcp.uk/mcp/postcodes

The postcodes.io lookup for SW1A 1AA.

  1. SW1A 1AA postcode
  2. St James's ward
  3. Westminster council
  4. Cities of London and Westminster constituency
One postcode, the ward, council and constituency it sits in.

Add postcodes.io to your assistant

Use the endpoint https://pubmcp.uk/mcp/postcodes in any MCP client that speaks streamable HTTP.

Claude Code In a terminal

claude mcp add --transport http \
  pubmcp-postcodes https://pubmcp.uk/mcp/postcodes

Claude.ai Settings, Connectors, add a custom connector

https://pubmcp.uk/mcp/postcodes

Cursor ~/.cursor/mcp.json

{
  "mcpServers": {
    "pubmcp-postcodes": {
      "url": "https://pubmcp.uk/mcp/postcodes"
    }
  }
}

VS Code .vscode/mcp.json

{
  "servers": {
    "pubmcp-postcodes": {
      "type": "http",
      "url": "https://pubmcp.uk/mcp/postcodes"
    }
  }
}

1 tool, each with a real call

Examples captured from the live server on 22/11/2026. Lists are cut to three items and long text is shortened. Ask again for today's figures.

lookup_postcode

Look up a UK postcode

Resolve a UK postcode (or a latitude and longitude) to its coordinates, ward, local authority, parliamentary constituency, region, country and police force.

Parameters for lookup_postcode
ParameterType Required Description
lat number No latitude, with lon
lon number No longitude, with lat
postcode string No UK postcode

Give a postcode, or lat and lon together.

Example call

{
  "name": "lookup_postcode",
  "arguments": {
    "postcode": "SW1A 1AA"
  }
}

Answer

SW1A 1AA is in St James's ward, Westminster; constituency Cities of London and Westminster.

{
"codes": {
"constituency": "E14001172",
"local_authority": "E09000033",
"ward": "E05013806"
},
"constituency": "Cities of London and Westminster",
"country": "England",
"latitude": 51.50101,
"local_authority": "Westminster",
"longitude": -0.141563,
"police_force": "Metropolitan Police",
"postcode": "SW1A 1AA",
"region": "London",
"ward": "St James's"
}

Attribution

Every answer from this server carries this line:

Contains public sector information licensed under the Open Government Licence v3.0. Postcode data from postcodes.io: contains OS data © Crown copyright and database right 2026, Royal Mail data © Royal Mail copyright and database right 2026 and ONS data © Crown copyright and database right 2026.

Open Government Licence v3.0