# UK PostcodeKit

> UK PostcodeKit is a freemium MCP server for developer tools. UK postcode lookup, nearest-postcode search and distances for Great Britain addresses. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Platforms:** API
- **Website:** https://rapidapi.com/Olly-1VN9JTXKG/api/uk-postcodekit-postcode-lookup-nearest-distance
- **Repository:** https://github.com/olsols4/webkit-api
- **MCP Registry name:** io.github.OlsOls4/ukpostcode
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-19

## About

The API returns coordinates, county, district and ward with ONS codes for any Great Britain postcode, and checks whether a postcode is valid. It also offers type-ahead autocomplete for address forms, a nearest-postcode search and straight-line distance between two postcodes. The data comes from a local copy of Ordnance Survey Code-Point Open, which the README says keeps responses fast.

Access is through RapidAPI, which handles keys and quotas, and the same endpoints are exposed as a Streamable HTTP MCP server so AI agents can call them as tools. Northern Ireland, the Channel Islands and the Isle of Man are not covered, and lookups for those areas return 404.

It suits checkout and signup forms, delivery zone planning, store locators and reporting teams that need district or ward codes. Coordinates are postcode centroids and distances are straight-line, not driving routes.

## Features

- **Postcode lookup and validation:** Returns location details and ONS codes for a Great Britain postcode and flags invalid input.
- **Autocomplete for address forms:** Provides type-ahead postcode suggestions while a user is typing.
- **Nearest postcode search:** Finds postcodes closest to a given postcode, useful for locating nearby branches or tradespeople.
- **Postcode-to-postcode distance:** Calculates straight-line distance between two postcodes using centroid coordinates.
- **MCP server endpoint:** Exposes the API as a Model Context Protocol server for AI clients over Streamable HTTP.

## Good for

- Validate and format postcodes in checkout and signup forms
- Add postcode autocomplete to an address field
- Find the nearest store or branch to a customer's postcode
- Estimate delivery zones from distances between postcodes
- Add district, ward and ONS codes to customer records for reporting

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport http ukpostcode https://uk-postcodekit-postcode-lookup-nearest-distance.p.rapidapi.com/mcp
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://uk-postcodekit-postcode-lookup-nearest-distance.p.rapidapi.com/mcp
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "ukpostcode": {
      "url": "https://uk-postcodekit-postcode-lookup-nearest-distance.p.rapidapi.com/mcp"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "ukpostcode": {
      "type": "http",
      "url": "https://uk-postcodekit-postcode-lookup-nearest-distance.p.rapidapi.com/mcp"
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "ukpostcode": {
      "serverUrl": "https://uk-postcodekit-postcode-lookup-nearest-distance.p.rapidapi.com/mcp"
    }
  }
}
```

### Grok Bot (Grok Bot desktop app → Connect apps → Add a custom connector)

```sh
https://uk-postcodekit-postcode-lookup-nearest-distance.p.rapidapi.com/mcp
```

Enter a Name (for example "UK PostcodeKit"), choose Type: Remote HTTPS, paste this as the Server URL and choose Add plugin.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "ukpostcode": {
      "type": "http",
      "url": "https://uk-postcodekit-postcode-lookup-nearest-distance.p.rapidapi.com/mcp"
    }
  }
}
```

## FAQ

### Which areas does the data cover?

Great Britain only: England, Scotland and Wales. Northern Ireland, Channel Islands and Isle of Man postcodes are not included and return 404 on lookup.

### Are distances driving routes?

No. The README states distances are straight-line between postcode centroids, not routes.

### Is there a free plan?

The README says a free plan is available on RapidAPI; request quotas depend on the plan chosen.

### What attribution is required?

Responses containing OS data include an attribution field, which the README says the Open Government Licence requires you to display.

### How do I add UK PostcodeKit to Claude Code?

Run this command in your terminal: claude mcp add --transport http ukpostcode https://uk-postcodekit-postcode-lookup-nearest-distance.p.rapidapi.com/mcp

### What are the best alternatives to UK PostcodeKit?

The closest alternatives to UK PostcodeKit are Postio — UK Address, Postcode, Email & Phone Validation, PostCode Check and apitier.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Postio — UK Address, Postcode, Email & Phone Validation](https://ai-powered.com/mcp/postio-uk-address-postcode-email-and-phone-validation): Postio — UK Address, Postcode, Email & Phone Validation is an MCP server for communication.
- [PostCode Check](https://ai-powered.com/mcp/postcode-check): PostCode Check is a freemium MCP server for developer tools.
- [apitier](https://ai-powered.com/mcp/apitier): apitier is an MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/uk-postcodekit
