npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ukpolice-mcp

v1.1.0

Published

MCP server for UK Police street-level crime data via data.police.uk

Downloads

204

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-mcp

Manual 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 to all-crime. Other examples: violent-crime, burglary, drugs, robbery, theft-from-the-person
  • lat (number) — Latitude. Required if poly is not provided.
  • lng (number) — Longitude. Required if poly is not provided.
  • poly (string) — Polygon boundary as lat,lng pairs separated by colons. Required if lat/lng not provided.
  • date (string, optional) — Month in YYYY-MM format. 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 in YYYY-MM format.
  • location_id (number, optional) — Specific location ID. If provided, lat/lng are ignored.
  • lat (number, optional) — Latitude. Required if location_id is not provided.
  • lng (number, optional) — Longitude. Required if location_id is 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 if poly is not provided.
  • lng (number, optional) — Longitude. Required if poly is not provided.
  • poly (string, optional) — Polygon boundary as lat,lng pairs separated by colons. Required if lat/lng not provided.
  • date (string, optional) — Month in YYYY-MM format. 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 in YYYY-MM format. 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.js

License

MIT