fbi-crime-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@fbi-crime-mcp-servershow me crime estimates for violent crime in California"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Overview
FBI Crime Data Explorer (CDE) data — monthly UCR offense rates and counts by national, state, or agency scope, plus Law Enforcement Officers Killed and Assaulted (LEOKA) statistics. Query crime trends and officer-safety data from any MCP client; the CDE's legacy UCR endpoints (agency search, NIBRS breakdowns, hate crimes, arrests, human trafficking, participation) have been decommissioned by the FBI, and their tools and resources return an error. Runs as a stdio process or a local Streamable HTTP server.
Tools
Tool | Description |
| Monthly UCR offense rates and counts by national, state, or agency scope, from the CDE summarized endpoint |
| Same CDE summarized endpoint, scoped to a single agency, state, or the national level |
| Officer fatality, weapon, and circumstance data (LEOKA) by month or year-to-date |
| [UNAVAILABLE] Redirects to |
| [UNAVAILABLE] UCR agency search backend decommissioned |
| [UNAVAILABLE] UCR agency profile backend decommissioned |
| [UNAVAILABLE] UCR arrests backend decommissioned |
| [UNAVAILABLE] UCR hate crimes backend decommissioned |
| [UNAVAILABLE] UCR human trafficking backend decommissioned |
| [UNAVAILABLE] UCR NIBRS breakdown backend decommissioned |
| [UNAVAILABLE] UCR and CDE participation backends decommissioned |
| [UNAVAILABLE] UCR code table backend decommissioned |
Resources
Resource | Description |
| [UNAVAILABLE] Agency profile by ORI; UCR backend decommissioned |
| [UNAVAILABLE] State participation overview; CDE backend decommissioned |
Related MCP server: mcp-fbi-crime
Capability reference
fbi_get_crime_estimates tool
scope:national,state(requiresstate_abbr, 2 letters), oragency(requiresori, 9 characters)offense: one ofviolent-crime,property-crime,robbery,burglary,larceny,motor-vehicle-theft,arson,aggravated-assault,rape,homicideDate range via
from_year/from_month(default January) andto_year/to_month(default December), years 2000–2030Returns per-100k rates and raw actual/clearance counts by month, plus
data_last_updatedwhen the CDE reports a refresh dateTyped errors:
scope_param_missing(missingstate_abbr/orifor the chosen scope),no_data
fbi_get_agency_offenses tool
Same CDE summarized endpoint as
fbi_get_crime_estimates, scoped byscope:national,state(state_abbr), oragency(ori)Same
offenseenum andfrom_year/from_month/to_year/to_monthrange (years 2000–2030)Typed errors:
scope_param_missing,no_data
fbi_get_leoka tool
period:ytd(year-to-date) ormonthly(requiresmonth, 1–12);yearis required (2000–2030)Returns fatality totals (feloniously/accidentally killed, incident counts), plus weapon, officer-activity, lighting-condition, and geographic-region breakdowns when the CDE reports them
deaths_by_yearanddeaths_by_regionare keyed byFelonious/AccidentalTyped errors:
month_required(monthly period withoutmonth),no_data
fbi_get_arson tool
Always throws
ServiceUnavailable— the dedicated UCR arson endpoint is decommissionedRecovery hint redirects to
fbi_get_crime_estimateswithoffense="arson", which serves arson data via the CDE summarized endpointInput fields (
scope,state_abbr,since_year,until_year) are accepted but unused
fbi_search_agencies tool
Always throws
ServiceUnavailable— the UCR agency search backend (crime-data-api.fr.cloud.gov) is decommissionedRecovery hint points to cde.ucr.cjis.gov or the FBI UCR program
Input fields (
state_abbr,agency_type,city,population_group,page,per_page) are accepted but unused
fbi_get_agency tool
Always throws
ServiceUnavailable— the UCR agency profile backend is decommissioned, with no CDE replacement identifiedRecovery hint points to cde.ucr.cjis.gov
oriinput is accepted but unused
fbi_get_arrests tool
Always throws
ServiceUnavailable— the UCR arrests backend is decommissionedRecovery hint points to cde.ucr.cjis.gov or FBI bulk CSV downloads
since_year/until_yearinputs are accepted but unused
fbi_get_hate_crimes tool
Always throws
ServiceUnavailable— the UCR hate crimes backend is decommissionedRecovery hint points to cde.ucr.cjis.gov
Input fields (
scope,state_abbr,since_year,until_year,cross_offense) are accepted but unused
fbi_get_human_trafficking tool
Always throws
ServiceUnavailable— the UCR human trafficking backend is decommissionedRecovery hint points to cde.ucr.cjis.gov
Input fields (
scope,state_abbr,ori,since_year,until_year) are accepted but unused
fbi_get_nibrs_breakdown tool
Always throws
ServiceUnavailable— the UCR NIBRS breakdown backend is decommissionedRecovery hint points to cde.ucr.cjis.gov
Input fields (
dimension,variable,scope,state_abbr,offense_name,since_year,until_year) are accepted but unused
fbi_get_participation tool
Always throws
ServiceUnavailable— both the UCR legacy backend and the CDE/LATEST/participation/path are decommissioned (404)Recovery hint points to cde.ucr.cjis.gov
Input fields (
scope,state_abbr,year,nibrs_only,page,per_page) are accepted but unused
fbi_list_code_table tool
Always throws
ServiceUnavailable— the UCR code table backend is decommissionedRecovery hint points to cde.ucr.cjis.gov
tableinput (one of 10 code-table names) is accepted but unused
fbi://agency/{ori} resource
Always throws
ServiceUnavailableon read — the UCR agency profile backend is decommissionedoriis the 9-character ORI (Originating Agency Identifier) code
fbi://state/{state_abbr} resource
Always throws
ServiceUnavailableon read — the CDE/LATEST/participation/state/path returns 404state_abbris the two-letter US state abbreviation
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
FBI CDE-specific:
CDE summarized endpoint (
/cde/summarized/) for national, state, and per-agency offense rates and counts across 10 offense typesCDE LEOKA endpoint (
/cde/leoka/) for officer fatality, weapon, and circumstance data by month or year-to-dateDEMO_KEYworks without registration (shared, rate-limited pool); a registered api.data.gov key raises throughput9 of 12 tools and both resources return a
ServiceUnavailableerror — the legacy UCR backend (crime-data-api.fr.cloud.gov) was decommissioned;fbi_get_arsonredirects callers tofbi_get_crime_estimates
Agent-friendly output:
Typed error reasons (
scope_param_missing,no_data,month_required,endpoint_decommissioned) each carry a recovery hint naming the next step or the cde.ucr.cjis.gov replacementSparse upstream fields surface as
nullrather than fabricated zeros, on the rate, clearance, and count fields offbi_get_crime_estimatesandfbi_get_agency_offensesdata_last_updatedechoes the CDE's own refresh timestamp so agents can reason about freshness
Getting started
Add the following to your MCP client configuration file. See the FBI CDE API key registration to obtain a key — DEMO_KEY works for exploration but is rate-limited.
{
"mcpServers": {
"fbi-crime-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/fbi-crime-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"FBI_API_KEY": "your-api-key"
}
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"fbi-crime-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/fbi-crime-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"FBI_API_KEY": "your-api-key"
}
}
}
}Or with Docker:
{
"mcpServers": {
"fbi-crime-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"-e", "FBI_API_KEY=your-api-key",
"ghcr.io/cyanheads/fbi-crime-mcp-server:latest"
]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 FBI_API_KEY=... bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
Bun v1.4.0 or higher (or Node.js v24+).
An api.data.gov API key for the FBI CDE API.
DEMO_KEYworks for testing but is rate-limited to ~1,000 req/hr from a shared pool.
Installation
Clone the repository:
git clone https://github.com/cyanheads/fbi-crime-mcp-server.gitNavigate into the directory:
cd fbi-crime-mcp-serverInstall dependencies:
bun installConfigure environment:
cp .env.example .env
# edit .env and set FBI_API_KEYConfiguration
All configuration is validated at startup via Zod schemas in src/config/server-config.ts. Key environment variables:
Variable | Description | Default |
| Required. api.data.gov API key for the FBI CDE API. Use | — |
| Override UCR base URL. |
|
| Override CDE base URL. |
|
| Per-request timeout in milliseconds. |
|
| Transport: |
|
| Port for HTTP server. |
|
| HTTP endpoint path. |
|
| HTTP session mode: |
|
| Public origin override for TLS-terminating reverse-proxy deployments. | none |
| Auth mode: |
|
| Log level (RFC 5424). |
|
| Opt-in Bun-only forced-GC pressure interval (ms). Try |
|
| Directory for log files (Node.js only). |
|
| Storage backend: |
|
| Enable OpenTelemetry instrumentation. |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Build and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:httpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker build -t fbi-crime-mcp-server .
docker run --rm -e FBI_API_KEY=your-key -p 3010:3010 fbi-crime-mcp-serverThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/fbi-crime-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
|
|
| Server-specific environment variable parsing and validation with Zod. |
| Tool definitions ( |
| Resource definitions ( |
| FBI API service layer — UCR and CDE clients with shared retry/timeout logic. |
| Unit and integration tests mirroring |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storageRegister new tools and resources via the barrels in
src/mcp-server/*/definitions/index.tsActive tools call the CDE API (
/cde/summarized/,/cde/leoka/); decommissioned tools throwserviceUnavailablewith a recovery hintWrap FBI API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
FBI Crime Data Explorer MCP — UCR/NIBRS statistics
Query SEC EDGAR filings, XBRL financials, and company data through MCP. STDIO & Streamable HTTP.
UK Police MCP — wraps the UK Police Data API (free, no auth)
Query FDA data on drugs, food, devices, and recalls via openFDA. STDIO or Streamable HTTP.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceAccess FEC campaign finance data through MCP. Query data about candidates, money trails, and election filings. STDIO & Streamable HTTP.552 npm2Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables querying FBI crime data using UCR/NIBRS statistics through a simple MCP interface.1 npmMIT
- AlicenseNot gradedqualityAmaintenanceBrowse and query the U.S. Energy Information Administration API v2 — electricity, petroleum, natural gas, coal, forecasts, and more via MCP. STDIO or Streamable HTTP.258 npm2Apache 2.0
- AlicenseNot gradedqualityAmaintenanceSearch and fetch ~800K Federal Reserve economic time-series from the FRED API via MCP, with STDIO or Streamable HTTP transport.297 npm1Apache 2.0