Skip to main content
Glama
FBI Crime Data MCP Server

FBI Crime Data MCP Server

by dathere

FBI Crime Data MCP Server

PyPI CI codecov

An MCP (Model Context Protocol) server that provides access to the FBI's Crime Data Explorer API.

Query crime statistics, arrest data, hate crimes, NIBRS incidents, law enforcement employment, and more — directly from any MCP-compatible client.

Created for data journalists, researchers, and anyone interested in exploring US crime data with the power of language models. Initially created for use by the Policy Analyst Agent of the qsv Claude Cowork plugin.

Features

  • 17 tools covering a wide range of crime data topics

    • Crime trends and Summary Reporting System (SRS) crime data

    • National Incident Based Reporting System (NIBRS) incident-based data and national estimates

    • Arrest statistics with demographic breakdowns

    • Hate crime incidents by bias motivation

    • Expanded homicide and property crime details

    • Police employment, Law Enforcement Officers Killed and Assaulted (LEOKA), Law Enforcement Suicide Data Collection (LESDC), and use of force

    • Agency lookup, reference data, cache management, and spillover reading

  • Geographic query levels — national, state, and agency for most tools; some also support region (get_police_employment, get_nibrs_estimation) or agency-type / population-size breakdowns (get_nibrs_estimation) — all with automatic parameter validation

  • Smart yearly aggregation — monthly API data is automatically rolled up into yearly totals (sums for counts, unweighted averages for rates, last value for population), with an option for monthly granularity. Years with fewer than 12 months of data are flagged in a _partial_years key so partial-year sums are never mistaken for annual totals

  • Tiered disk-backed caching — 90-day time-to-live (TTL) for stable data (trends, reference, summaries, NIBRS estimation), 30-day TTL for dynamic data (incidents, arrests, agency lookups), and 1-day TTL for the homepage summary (refresh dates change frequently). Transient errors (timeouts, HTTP 5xx, rate-limit responses) are never cached

  • Spillover handling — responses exceeding 128K characters are saved to disk with a preview returned, so large queries are never silently truncated

  • Input validation — date format/ordering checks, offense and bias code validation, and level-based parameter requirements with clear error messages

  • Sliding-window rate limiting — 1,000 requests/hour with transparent wait-time feedback

  • Reference tools for agency lookups (by state, Originating Agency Identifier (ORI), or district with name filtering) and code translations

Related MCP server: mcp-fbi-crime

Quick Start

  1. Get a free API key from api.data.gov

  2. Run with Claude Desktop — add to your claude_desktop_config.json:

{
  "mcpServers": {
    "fbi-crime-data": {
      "command": "uvx",
      "args": ["fbi-crime-data-mcp"],
      "env": {
        "FBI_API_KEY": "your-api-key-here"
      }
    }
  }
}
  1. Or run directly:

FBI_API_KEY=your-key uvx fbi-crime-data-mcp

Available Tools (17)

Core Crime Data

Tool

Description

get_summarized_crime_data

SRS crime data — rates, actuals, clearances for violent crime, property crime, homicide, rape, robbery, assault, burglary, larceny, motor vehicle theft, arson

get_nibrs_data

NIBRS incident-based data for 70+ offense types

get_arrest_data

Arrest statistics by offense with optional demographic breakdowns (male, female, sex, race)

get_crime_trends

National crime trend percent changes across 10 crime types

get_nibrs_estimation

NIBRS national estimates by state, region, agency type, or population size

Specialized Crime Data

Tool

Description

get_hate_crime_data

Hate crime incidents by bias motivation (30+ categories)

get_expanded_homicide_data

Supplementary Homicide Reports — victim/offender demographics, weapons, circumstances

get_expanded_property_data

Expanded property crime details — stolen/recovered values for burglary, larceny, motor vehicle theft (MVT), robbery

Law Enforcement Data

Tool

Description

get_police_employment

Officer and civilian employee counts by gender, rates per 1,000 population

get_leoka_data

Officers killed and assaulted — weapons, circumstances, demographics

get_lesdc_data

Law enforcement suicide data — demographics, race, duty status, and more

get_use_of_force_data

Use of force incidents resulting in death, serious injury, or firearm discharge

Overview

Tool

Description

get_cde_homepage_summary

CDE homepage summary — mission statement, navigation, data freshness, date ranges, and national crime trends

Reference & Lookup

Tool

Description

lookup_agency

Find law enforcement agencies by state, ORI code, or judicial district

get_reference_data

State lists, offense/bias code lookups, data refresh dates

manage_cache

View cache stats, clear all entries, or clear only expired entries

read_spillover

Read spillover files saved when tool responses exceed the size limit

Large Responses

When a tool response exceeds 128,000 characters, the full result is saved to ~/.cache/fbi-crime-data-mcp/spillover/ and a truncated preview is returned with the file path. To avoid this, narrow your query (shorter date range, specific state/agency).

The preview, not the full payload, is what gets cached, so the cache and the spillover directory belong together. Clear both with manage_cache action="clear" rather than deleting the spillover directory by hand; otherwise cached previews point at files that no longer exist until the cache entry expires.

Data Sources

All data comes from the FBI's Crime Data Explorer API, which provides Uniform Crime Reporting (UCR) data including both the Summary Reporting System (SRS) and the National Incident-Based Reporting System (NIBRS).

API Rate Limits

  • Registered key: 1,000 requests per hour (rolling window)

  • DEMO_KEY: 30 requests per IP per hour

The server includes a built-in rate limiter (1,000 req/hr). The DEMO_KEY limit is enforced API-side.

For more info on the FBI's Crime Data API, see https://cde.ucr.cjis.gov/LATEST/webapp/#/pages/docApi.

Development

# Install dependencies
uv sync

# Run the server locally
FBI_API_KEY=your-key uv run fbi-crime-data-mcp

# Run tests (offline by default — never hits the network)
uv run pytest

# Run integration tests against the live API.
# DEMO_KEY works, but is capped at 30 requests per IP per hour.
FBI_API_KEY=your-key uv run pytest -m integration

License

MIT

Available Tools

17 tools
get_arrest_dataA

Get arrest statistics by offense, optionally broken down by demographics.

Args: offense: Arrest offense code (e.g., "all", "11" for murder, "30" for robbery, "150" for drug abuse). Use get_reference_data with data_type="offenses" and offense_type="arrest" for full list. level: Geographic level — "national", "state", or "agency" data_type: "counts" for time series or "totals" for demographic breakdowns from_date: Start date in mm-yyyy format (e.g., "01-2020") to_date: End date in mm-yyyy format (e.g., "12-2022") state: Two-letter state abbreviation (required when level is "state") ori: Agency ORI code (required when level is "agency") category: Optional demographic breakdown — "male", "female", "race", or "sex" aggregate: Aggregation level — "yearly" (default, sums monthly into yearly) or "monthly" (monthly granularity). Only applies when data_type is "counts". Years with fewer than 12 months of data are flagged in a top-level "_partial_years" key (rates are unweighted averages of the available months).

Inputs: level (required), offense (required), to_date (required), data_type (required), +5 more. Returns: result

get_cde_homepage_summaryA

Get a summary of the FBI Crime Data Explorer (CDE) homepage.

Returns the CDE mission statement, navigation structure, data freshness (last refresh dates), available data date ranges, and the full national crime trends response (percent changes across 10 crime types, matching the trends section displayed on the CDE homepage). Provides orientation on what the CDE offers and how current its data is.

Inputs: no named parameters. Returns: result

get_expanded_homicide_dataA

Get Supplementary Homicide Report (SHR) data with expanded details on homicides including victim/offender demographics, weapons, and circumstances.

Args: level: Geographic level — "national", "state", or "agency" data_type: "counts" for time series or "totals" for demographic/detail breakdowns from_date: Start date in mm-yyyy format (e.g., "01-2020") to_date: End date in mm-yyyy format (e.g., "12-2022") state: Two-letter state abbreviation (required when level is "state") ori: Agency ORI code (required when level is "agency") aggregate: Aggregation level — "yearly" (default, sums monthly into yearly) or "monthly" (monthly granularity). Only applies when data_type is "counts". Years with fewer than 12 months of data are flagged in a top-level "_partial_years" key (rates are unweighted averages of the available months).

Inputs: level (required), to_date (required), data_type (required), from_date (required), +3 more. Returns: result

get_expanded_property_dataA

Get expanded property crime data with details on stolen/recovered property values.

Args: offense: Property offense code — "NB" (Burglary), "NL" (Larceny), "NMVT" (Motor Vehicle Theft), "NROB" (Robbery). level: Geographic level — "national", "state", or "agency" data_type: "counts" for time series or "totals" for property value breakdowns from_date: Start date in mm-yyyy format (e.g., "01-2020") to_date: End date in mm-yyyy format (e.g., "12-2022") state: Two-letter state abbreviation (required when level is "state") ori: Agency ORI code (required when level is "agency") aggregate: Aggregation level — "yearly" (default, sums monthly into yearly) or "monthly" (monthly granularity). Only applies when data_type is "counts". Years with fewer than 12 months of data are flagged in a top-level "_partial_years" key (rates are unweighted averages of the available months).

Inputs: level (required), offense (required), to_date (required), data_type (required), +4 more. Returns: result

get_hate_crime_dataA

Get hate crime statistics, optionally filtered by bias motivation. Returns incident counts, victim types, offense types, offender demographics, and locations.

Args: level: Geographic level — "national", "state", or "agency" from_date: Start date in mm-yyyy format (e.g., "01-2020") to_date: End date in mm-yyyy format (e.g., "12-2022") bias: Bias code to filter by (e.g., "12" for Anti-Black, "21" for Anti-Jewish, "24" for Anti-Islamic). Use get_reference_data with offense_type="hate-crime" for full list. If omitted, returns all biases. data_type: "counts" for time series or "totals" for aggregate data (default: "counts") state: Two-letter state abbreviation (required when level is "state") ori: Agency ORI code (required when level is "agency") aggregate: Aggregation level — "yearly" (default, sums monthly into yearly) or "monthly" (monthly granularity). Only applies when data_type is "counts". Years with fewer than 12 months of data are flagged in a top-level "_partial_years" key (rates are unweighted averages of the available months).

Inputs: level (required), to_date (required), from_date (required), ori, +4 more. Returns: result

get_leoka_dataB

Get LEOKA data on law enforcement officers killed and assaulted, including weapons used, circumstances, officer demographics, and offender demographics.

Args: report_type: "monthly" for a specific month or "ytd" for year-to-date summary year: Year for the data (e.g., 2022) month: Month number 1-12 (January=1, December=12). Required when report_type is "monthly".

Inputs: year (required), report_type (required), month. Returns: result

get_lesdc_dataA

Get law enforcement suicide data with breakdowns by demographics, race, location, duty status, and more.

Args: year: Year for the data (e.g., 2022) chart_type: Chart/breakdown type. Use get_reference_data or see error message for valid values.

Inputs: year (required), chart_type (required). Returns: result

get_nibrs_dataA

Get NIBRS incident-based crime data for 70+ offense types.

Args: offense: NIBRS offense code (e.g., "13A" for aggravated assault, "09A" for murder, "11A" for rape, "120" for robbery, "220" for burglary). Use get_reference_data for full list. level: Geographic level — "national", "state", or "agency" from_date: Start date in mm-yyyy format (e.g., "01-2020") to_date: End date in mm-yyyy format (e.g., "12-2022") data_type: "counts" for time series data or "totals" for aggregate breakdowns (default: "counts") state: Two-letter state abbreviation (required when level is "state") ori: Agency ORI code (required when level is "agency") aggregate: Aggregation level — "yearly" (default, sums monthly into yearly) or "monthly" (monthly granularity). Only applies when data_type is "counts". Years with fewer than 12 months of data are flagged in a top-level "_partial_years" key (rates are unweighted averages of the available months).

Inputs: level (required), offense (required), to_date (required), from_date (required), +4 more. Returns: result

get_nibrs_estimationA

Get NIBRS national crime estimates derived from incident data. Supports breakdowns by state, region, agency type, and population size.

Args: offense: NIBRS offense code (e.g., "13A", "09A"). Use get_nibrs_data docs for codes. level: "national", "state", "region", "agency-type", or "size" year: Year for estimation data state: Two-letter state abbreviation (required when level is "state") region: Region code — "M" (Midwest), "N" (Northeast), "S" (South), "W" (West). Required when level is "region". agency_type: "S" (Size) or "T" (Agency Type). Required when level is "agency-type" or "size". agency_type_location: "C" (City) or "N" (County). Required when level is "agency-type". size_group: Size group "1"-"8" (1=Cities 250K+, 6=Cities under 10K, 7=MSA Counties, 8=Non-MSA Counties). Required when level is "size".

Inputs: year (required), level (required), offense (required), state, +4 more. Returns: result

get_police_employmentA

Get law enforcement employee data including officer/civilian counts by gender, rates per 1,000 population.

Args: level: Geographic level — "national", "state", "agency", or "region" from_year: Start year in yyyy format (e.g., "2015") to_year: End year in yyyy format (e.g., "2022") state: Two-letter state abbreviation (required for "state" and "agency" levels) ori: Agency ORI code (required for "agency" level) region: Region name — "midwest", "south", "northeast", or "west" (required for "region" level)

Inputs: level (required), to_year (required), from_year (required), ori, +2 more. Returns: result

get_reference_dataA

Get reference data: state lists, offense/bias code lookups, data properties, or data refresh dates.

Args: data_type: Type of reference data — "states" (list of states/territories), "offenses" (offense or bias code lookup), "cde_properties" (data date ranges), or "refresh_date" (last data refresh dates) offense_type: Required when data_type is "offenses" — "arrest" for arrest offense codes or "hate-crime" for hate crime bias codes

Inputs: data_type (required), offense_type. Returns: result

get_summarized_crime_dataA

Get summarized (SRS) crime data including offense rates, actuals, clearances, and population coverage.

Args: offense: SRS offense code (e.g., "V" for Violent Crime, "P" for Property Crime, "HOM", "RPE", "ROB", "ASS", "BUR", "LAR", "MVT", "ARS"). Use get_reference_data for full list. level: Geographic level — "national", "state", or "agency" from_date: Start date in mm-yyyy format (e.g., "01-2020") to_date: End date in mm-yyyy format (e.g., "12-2022") state: Two-letter state abbreviation (required when level is "state") ori: Agency ORI code (required when level is "agency") aggregate: Aggregation level — "yearly" (default, sums monthly into yearly) or "monthly" (monthly granularity). Years with fewer than 12 months of data are flagged in a top-level "_partial_years" key (rates are unweighted averages of the available months).

Inputs: level (required), offense (required), to_date (required), from_date (required), +3 more. Returns: result

get_use_of_force_dataA

Get use of force data from law enforcement agencies. Covers incidents resulting in death, serious bodily injury, or firearm discharge.

Args: report_type: "summary" for participation/submission data, "questions" for detailed question data, "reports" for report data year: Year for the data. Required for "summary" and "questions" types. location: "national" or a two-letter state abbreviation. Required for "summary" type. group: Group identifier for "questions" or "reports" types. quarter: Quarter (1-4) for "questions" type. spec: Report specification for "reports" type.

Inputs: report_type (required), spec, year, group, +2 more. Returns: result

lookup_agencyA

Look up law enforcement agencies by state, ORI code, or judicial district code.

Args: lookup_type: How to look up — "by_state" (list agencies in a state), "by_ori" (specific agency by ORI), or "by_district" (agencies by judicial district code) state: Two-letter state abbreviation (required for by_state and by_ori) ori: Agency ORI identifier (required for by_ori) district_code: Judicial district code (required for by_district) name_filter: Optional substring to filter results by agency name (case-insensitive). Only applies to by_state and by_district lookups. offset: Number of results to skip (for pagination). Applied after name_filter. limit: Maximum number of results to return (for pagination). Applied after name_filter.

Inputs: lookup_type (required), ori, limit, state, +3 more. Returns: result

manage_cacheA

Manage the FBI Crime Data response cache.

Args: action: "status" (show cache stats), "clear" (wipe entire cache), or "clear_expired" (remove only expired entries)

Inputs: action (required). Returns: result

read_spilloverA

Read a spillover file that was saved when a tool response exceeded the size limit.

Use this to retrieve data beyond the preview shown in a truncated response. The filename is provided in the spillover notice (e.g., "get_nibrs_data_a1b2c3d4.json").

Args: filename: Name of the spillover file (e.g., "get_nibrs_data_a1b2c3d4.json"). Use "list" to see all available spillover files. offset: Character position to start reading from (default: 0). limit: Maximum number of characters to return (default: 50000, max: 100000).

Inputs: filename (required), limit, offset. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 17 tools

    Disambiguation4/5

    Most tools map to distinct FBI datasets or utilities, but get_nibrs_data vs get_nibrs_estimation and get_summarized_crime_data vs get_crime_trends require careful reading to avoid misselection. Descriptions generally clarify scope.

    Naming Consistency5/5

    All names use snake_case verb_noun structure (get_*, lookup_agency, manage_cache, read_spillover), with a predictable get_ prefix for data retrieval tools. No mixed conventions.

    Tool Count3/5

    17 tools is on the heavy side for a data-access MCP server, falling in the borderline 16-25 range. Each tool maps to a distinct dataset, but the surface is large enough to feel sprawling.

    Completeness5/5

    The server covers the major FBI Crime Data Explorer domains: trends, summarized, NIBRS, NIBRS estimates, arrests, hate crime, expanded homicide/property, LEOKA, police employment, suicide, use of force, agency lookup, reference data, and spillover handling. No obvious lifecycle gaps for a read-only data server.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Provides access to the police.uk API with 21 tools to query UK crime data, police forces, neighbourhoods, and stop-and-search incidents. Enables retrieval of street-level crimes, force details, neighbourhood teams, and policing priorities across England, Wales, and Northern Ireland.
      21
      22 npm
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Exposes the FBI Crime Data Explorer API — crime estimates, agency offense rates, and LEOKA officer safety data via MCP. Supports STDIO or Streamable HTTP transport.
      170 npm
      2
      Apache 2.0
    • A
      license
      Not graded
      quality
      F
      maintenance
      Enables AI agents to search and retrieve details of FBI Most Wanted people via the FBI public API, including photos, aliases, crimes, last known locations, and contact tips.
      6 npm
      MIT