ukpolice-mcp
v1.1.0
Published
MCP server for UK Police street-level crime data via data.police.uk
Downloads
204
Maintainers
Readme
uk-police-mcp
An MCP server for UK crime and stop-and-search data from the UK Police API. No API key required.
Usage
Claude CLI
claude mcp add --scope user uk-police -- npx -y ukpolice-mcpManual configuration
Add to your MCP config:
{
"mcpServers": {
"uk-police": {
"command": "npx",
"args": ["ukpolice-mcp"]
}
}
}Tools
get-street-crimes
Returns street-level crimes within a 1-mile radius of a point, or within a custom polygon area.
Parameters:
category(string, optional) — Crime category slug. Defaults toall-crime. Other examples:violent-crime,burglary,drugs,robbery,theft-from-the-personlat(number) — Latitude. Required ifpolyis not provided.lng(number) — Longitude. Required ifpolyis not provided.poly(string) — Polygon boundary aslat,lngpairs separated by colons. Required iflat/lngnot provided.date(string, optional) — Month inYYYY-MMformat. Defaults to latest available.
Example response:
Street-level crimes for (51.5074, -0.1278) — 1 mile radius — 2024-01
Total: 142 crimes
==================================================
By category:
violent-crime 38
anti-social-behaviour 31
theft-from-the-person 22
...
Recent crimes (up to 10):
[2024-01] violent-crime — On or near Oxford Street (Under investigation)
...get-crimes-at-location
Returns crimes at a specific predefined location point (not a radius search). The API snaps lat/lng to the nearest predefined point.
Parameters:
date(string, required) — Month inYYYY-MMformat.location_id(number, optional) — Specific location ID. If provided,lat/lngare ignored.lat(number, optional) — Latitude. Required iflocation_idis not provided.lng(number, optional) — Longitude. Required iflocation_idis not provided.
get-outcomes-for-crime
Returns all recorded outcomes for a specific crime, identified by its persistent ID (returned by other crime tools).
Parameters:
persistent_id(string, required) — The 64-character persistent crime ID.
Example response:
Outcomes for crime 4b6e3d8a...
==================================================
Crime details:
Category: violent-crime
Month: 2024-01
Location: On or near Oxford Street (51.5074, -0.1278)
Outcomes (2):
[2024-02] Under investigation (under-investigation)
[2024-04] Offender given a caution (offender-cautioned)get-stop-and-searches-by-area
Returns stop and searches within a 1-mile radius of a point, or within a custom polygon area.
Parameters:
lat(number, optional) — Latitude. Required ifpolyis not provided.lng(number, optional) — Longitude. Required ifpolyis not provided.poly(string, optional) — Polygon boundary aslat,lngpairs separated by colons. Required iflat/lngnot provided.date(string, optional) — Month inYYYY-MMformat. Defaults to latest available.
Example response:
Stop and searches for (51.5074, -0.1278) — 1 mile radius — 2024-01
Total: 23
==================================================
By object of search:
Controlled drugs 14
Stolen goods 6
...
By outcome:
Nothing found - no further action 10
Arrest 8
...
Recent records (up to 10):
[2024-01-15T14:32:00+00:00] Person search (Misuse of Drugs Act 1971) — Controlled drugs → Arrest [Male, 18-24, White]
...get-stop-and-searches-at-location
Returns stop and searches at a specific predefined location ID.
Parameters:
location_id(number, required) — The location ID to query.date(string, optional) — Month inYYYY-MMformat. Defaults to latest available.
Rate Limiting
The UK Police API enforces a limit of 15 requests/second (burst up to 30) using a leaky bucket algorithm. Exceeding this returns HTTP 429.
This server handles rate limiting automatically:
- A token bucket (capacity 15, refill 15/s) throttles outgoing requests to stay within the sustained limit
- On HTTP 429, the server waits 1 second and retries automatically (up to 3 retries)
No configuration needed — it works transparently in the background.
Testing with MCP Inspector
npx @modelcontextprotocol/inspector node ./build/index.jsLicense
MIT
