Skip to main content
Glama
MCP Server Police UK

MCP Server Police UK

by dwain-barnes

MCP Server Police UK

npm version License: MIT GitHub

A Model Context Protocol (MCP) server providing tools to access and interact with the police.uk API, offering comprehensive data on crimes, police forces, neighbourhoods, and stop-and-search incidents across the UK.

Features

  • 21 distinct tools for querying police.uk API endpoints

  • Retrieve street-level crimes, neighbourhood details, force information, stop-and-search records, and more

  • Built with the official MCP TypeScript SDK

  • Easy integration with MCP-compatible systems

  • Comprehensive error handling and type safety

Related MCP server: Zyfy MCP Server

Installation

Install directly from npm:

npm install -g mcp-server-police-uk

Or use with npx (no installation required):

npx mcp-server-police-uk

Usage

With Claude Desktop

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "police-uk": {
      "command": "npx",
      "args": ["-y", "mcp-server-police-uk"]
    }
  }
}

Development

To contribute or run locally:

# Clone the repository
git clone https://github.com/dwain-barnes/police-uk-api-mcp-server.git
cd police-uk-api-mcp-server

# Install dependencies
npm install

# Build the project
npm run build

# Run locally
npm start

With other MCP clients

npx mcp-server-police-uk

Available Tools

Crime Data

  • get_street_level_crimes - Retrieve street-level crimes by location or area

  • get_crimes_at_location - Get crimes at a specific location

  • get_crimes_no_location - Retrieve crimes that couldn't be mapped to a location

  • get_crime_categories - Get valid crime categories

  • get_last_updated - Get the date when crime data was last updated

  • get_outcomes_for_crime - Get outcomes for a specific crime

  • get_street_level_outcomes - Retrieve outcomes by location or area

Police Forces

  • get_list_of_forces - Get all police forces

  • get_force_details - Get details for a specific police force

  • get_senior_officers - Get senior officers for a police force

Neighbourhoods

  • get_neighbourhoods - Get neighbourhoods for a police force

  • get_neighbourhood_details - Get details for a specific neighbourhood

  • get_neighbourhood_boundary - Get boundary coordinates for a neighbourhood

  • get_neighbourhood_team - Get team members for a neighbourhood

  • get_neighbourhood_events - Get scheduled events for a neighbourhood

  • get_neighbourhood_priorities - Get policing priorities for a neighbourhood

  • locate_neighbourhood - Find neighbourhood team for given coordinates

  • get_stop_searches_by_area - Get stop and searches within an area

  • get_stop_searches_by_location - Get stop and searches at a specific location

  • get_stop_searches_no_location - Get stop and searches with no location

  • get_stop_searches_by_force - Get stop and searches by police force

Examples

Get crimes near a location

// Get crimes within 1 mile of coordinates
get_street_level_crimes({
  lat: 51.5074,
  lng: -0.1278,
  date: "2024-01"
})

Find your local police team

// Find neighbourhood team for coordinates
locate_neighbourhood({
  lat: 51.5074,
  lng: -0.1278
})

Get force information

// Get details about Metropolitan Police
get_force_details({
  force_id: "metropolitan"
})

API Rate Limits

This server respects the police.uk API rate limits. The API is free to use but has usage limits in place to ensure fair access for all users.

Data Source

All data is sourced from the official police.uk API, which provides open data about policing in England, Wales, and Northern Ireland. The data is typically updated monthly.

Contributing

Contributions are welcome! Please feel free to:

  • Report issues on GitHub Issues

  • Submit Pull Requests

  • Suggest new features or improvements

Repository

License

MIT License - see LICENSE file for details.

Support

If you encounter any issues or have questions:

Author

Created by Dwain Barnes

Available Tools

21 tools
get_crime_categoriesB

Retrieve valid crime categories for a given date

Inputs: date.

get_crimes_at_locationB

Retrieve crimes at a specific location by ID or nearest to lat/lng

Inputs: lat, lng, location_id, date.

get_crimes_no_locationB

Retrieve crimes that could not be mapped to a location

Inputs: category (required), force (required), date.

get_force_detailsB

Retrieve details for a specific police force

Inputs: force_id (required).

get_last_updatedA

Retrieve the date when crime data was last updated

Inputs: no named parameters.

get_list_of_forcesA

Retrieve a list of all police forces

Inputs: no named parameters.

get_neighbourhood_boundaryB

Retrieve the boundary coordinates for a specific neighbourhood

Inputs: force_id (required), neighbourhood_id (required).

get_neighbourhood_detailsC

Retrieve details for a specific neighbourhood within a force

Inputs: force_id (required), neighbourhood_id (required).

get_neighbourhood_eventsB

Retrieve events scheduled for a specific neighbourhood

Inputs: force_id (required), neighbourhood_id (required).

get_neighbourhood_prioritiesB

Retrieve policing priorities for a specific neighbourhood

Inputs: force_id (required), neighbourhood_id (required).

get_neighbourhoodsA

Retrieve a list of neighbourhoods for a specific police force

Inputs: force_id (required).

get_neighbourhood_teamB

Retrieve the team members for a specific neighbourhood

Inputs: force_id (required), neighbourhood_id (required).

get_outcomes_for_crimeC

Retrieve outcomes for a specific crime by persistent ID

Inputs: persistent_id (required).

get_senior_officersB

Retrieve senior officers for a specific police force

Inputs: force_id (required).

get_stop_searches_by_areaB

Retrieve stop and searches within a 1-mile radius or custom area

Inputs: lat, lng, poly, date.

get_stop_searches_by_forceA

Retrieve stop and searches reported by a specific force

Inputs: force_id (required), date.

get_stop_searches_by_locationB

Retrieve stop and searches at a specific location by ID

Inputs: location_id (required), date.

get_stop_searches_no_locationB

Retrieve stop and searches that could not be mapped to a location

Inputs: force_id (required), date.

get_street_level_crimesB

Retrieve street-level crimes by lat/lng or custom polygon area

Inputs: lat, lng, poly, date, +1 more.

get_street_level_outcomesB

Retrieve outcomes by lat/lng, custom polygon, or location ID

Inputs: lat, lng, poly, location_id, +1 more.

locate_neighbourhoodA

Find the neighbourhood policing team for a given latitude and longitude

Inputs: lat (required), lng (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 21 tools

    Disambiguation4/5

    Most tools have distinct purposes (crimes, stops, forces, neighbourhoods), but some like get_crimes_at_location and get_street_level_crimes could be confused due to similar inputs and outputs.

    Naming Consistency5/5

    All tools follow a consistent 'get_' prefix with descriptive snake_case names, e.g., get_crime_categories, get_neighbourhood_events.

    Tool Count5/5

    21 tools is appropriate for a police data API covering forces, neighbourhoods, crimes, stop searches, and outcomes without being overwhelming.

    Completeness5/5

    Covers key police data aspects: forces, neighbourhoods, crimes, stop searches, outcomes, and location features. No obvious gaps for the intended domain.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Provides access to FBI Crime Data Explorer API, enabling queries for crime statistics, arrests, hate crimes, NIBRS incidents, law enforcement employment, and more via 17 tools with smart caching and spillover handling.
      17
      3
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables natural language queries about UK postcodes and vehicles, including flood risk, crime rate, broadband coverage, property prices, MOT history, and ULEZ compliance.
      4
      38 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Wraps the UK Police Data API to enable querying crime data, police forces, and other UK police information through natural language.
      273 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Irish and UK official statistics by county and local authority: CSO, Central Bank, government and council data joined on one geography, with caveats on every figure and a comparability check. Built for AI agents.
      6
      1,130 PyPI
      MIT