lookup_postcode

Pack: postcodes · Endpoint: https://gateway.pipeworx.io/postcodes/mcp

Get geographic details for a UK postcode (e.g., ‘SW1A 1AA’). Returns coordinates, region, district, ward, and constituency.

Parameters

NameTypeRequiredDescription
postcodestringyesUK postcode to look up (e.g. “SW1A 1AA” or “SW1A1AA”).

Example call

Arguments

{
  "postcode": "SW1A 1AA"
}

curl

curl -X POST https://gateway.pipeworx.io/postcodes/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"lookup_postcode","arguments":{"postcode":"SW1A 1AA"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('lookup_postcode', {
  "postcode": "SW1A 1AA"
});

More examples

{
  "postcode": "M1 1AE"
}

Response shape

Always returns: postcode, incode, outcode, country, codes

FieldTypeDescription
postcodestringThe UK postcode
incodestringIncode part of postcode
outcodestringOutcode part of postcode
countrystringCountry name
regionstring | nullRegion name
admin_districtstring | nullAdministrative district
admin_wardstring | nullAdministrative ward
parliamentary_constituencystring | nullParliamentary constituency
latnumber | nullLatitude coordinate
lonnumber | nullLongitude coordinate
eastingsnumber | nullEastings grid reference
northingsnumber | nullNorthings grid reference
codesobjectCodes mapping object
Full JSON Schema
{
  "type": "object",
  "properties": {
    "postcode": {
      "type": "string",
      "description": "The UK postcode"
    },
    "incode": {
      "type": "string",
      "description": "Incode part of postcode"
    },
    "outcode": {
      "type": "string",
      "description": "Outcode part of postcode"
    },
    "country": {
      "type": "string",
      "description": "Country name"
    },
    "region": {
      "type": [
        "string",
        "null"
      ],
      "description": "Region name"
    },
    "admin_district": {
      "type": [
        "string",
        "null"
      ],
      "description": "Administrative district"
    },
    "admin_ward": {
      "type": [
        "string",
        "null"
      ],
      "description": "Administrative ward"
    },
    "parliamentary_constituency": {
      "type": [
        "string",
        "null"
      ],
      "description": "Parliamentary constituency"
    },
    "lat": {
      "type": [
        "number",
        "null"
      ],
      "description": "Latitude coordinate"
    },
    "lon": {
      "type": [
        "number",
        "null"
      ],
      "description": "Longitude coordinate"
    },
    "eastings": {
      "type": [
        "number",
        "null"
      ],
      "description": "Eastings grid reference"
    },
    "northings": {
      "type": [
        "number",
        "null"
      ],
      "description": "Northings grid reference"
    },
    "codes": {
      "type": "object",
      "description": "Codes mapping object"
    }
  },
  "required": [
    "postcode",
    "incode",
    "outcode",
    "country",
    "codes"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "postcodes": {
      "url": "https://gateway.pipeworx.io/postcodes/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026