Skip to main content
Glama
whereabouts
by mxdvl
README.md
# @mxdvl/whereabouts

An [MCP](https://modelcontextprotocol.io) server that answers questions about UK geography with
consistent, structured results and maps in one visual style.

Covers **England and Wales**: electoral wards, their neighbours, and which ward a postcode is in.
_"Which wards neighbour Hackney Wick?"_ · _"Where is E15 2GW?"_

## Use

Needs **Node.js 26 or newer** (it uses `Temporal`). Add it to your MCP client:

```json
{
  "mcpServers": {
    "whereabouts": { "command": "npx", "args": ["-y", "@mxdvl/whereabouts"] }
  }
}
```

## Tools

| Tool | Does |
| --- | --- |
| `find_postcode` | Where is this postcode? Ward, local authority, sector, location, links to findthatpostcode and OpenStreetMap, and a map with the postcode marked. |
| `find_ward` | Look up wards by name (English or Welsh) or code, optionally narrowed by `authority`. |
| `neighbouring_wards` | The wards that border a ward, with a PNG map. `svg: true` also returns the SVG. |

Ward names are not unique (there are 12 called "Abbey"). An ambiguous name returns the candidates;
call again with `authority` (a local authority name) or the ward code.

Every result carries `vintage` (the boundary date) and the `attribution` that must accompany it.
Neighbours are wards whose boundaries share an edge in the ONS data, so wards separated by water
are not neighbours.

Maps are rendered with your system fonts, so text may look slightly different between machines.

## Data and licence

Built data lives in [`data/`](data) and is produced by the pipeline in [`pipeline/`](pipeline) from
ONS open data: ward boundaries (`WD_DEC_2026_UK_BFC`) and the August 2026 National Statistics
Postcode Lookup. Everything ships inside the package, about 10 MB: the postcode data is one brotli
file per postcode area, read on first use. Code is MIT; data is under the Open Government
Licence v3.0. See [NOTICE.md](NOTICE.md) for attribution and [GLOSSARY.md](GLOSSARY.md) for what each
term means.

## Development

```sh
mise install
pnpm install
pnpm test           # offline: the network is blocked in tests
pnpm run data       # pipeline steps; offline unless --fetch or --refetch
pnpm run build
```