Postcodes

live Geography

Look up, validate, and explore UK postcodes via postcodes.io

4 tools
0ms auth
free tier 50 calls/day

Tools

lookup_postcode required: postcode

Get full geographic and administrative details for a UK postcode.

Parameters
Name Type Description
postcode req string UK postcode to look up (e.g. "SW1A 1AA" or "SW1A1AA").
Try it
nearest_postcodes required: postcode

Find the nearest UK postcodes to a given postcode.

Parameters
Name Type Description
postcode req string UK postcode to find neighbours for (e.g. "SW1A 1AA").
Try it
validate_postcode required: postcode

Check whether a UK postcode is valid.

Parameters
Name Type Description
postcode req string UK postcode to validate (e.g. "SW1A 1AA").
Try it
random_postcode

Get a random valid UK postcode with full geographic and administrative details.

No parameters required.

Try it

Test with curl

The gateway speaks JSON-RPC 2.0 over HTTP POST. You can test any pack directly from the terminal.

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

Use with the SDK

Install @pipeworx/sdk to call tools from any TypeScript/Node project.

TypeScript
import { Pipeworx } from '@pipeworx/sdk';
const px = new Pipeworx();
const result = await px.call("lookup_postcode", {"postcode":"example"});
ask_pipeworx
// Or ask in plain English:
const answer = await px.ask("look up, validate, and explore uk postcodes via postcodes");

Related packs

Other Pipeworx packs in the same categories (Geography):