fbi-crime-data-mcp: Instructions file for Claude Code

CLAUDE.md

fbi-crime-data-mcp CLAUDE.md is an instructions file for Claude Code from dathere/fbi-crime-data-mcp. It costs 1,154 tokens per session, scanned A, original, MIT.

A set of Claude Code instructions for an FBI Crime Data MCP server, a Python service that provides tools for querying the FBI Crime Data Explorer API. It documents setup, running, tests, architecture, caching, and response handling.

In plain words
What is it for?
It is for installing dependencies, starting the server, running tests, understanding its 17 tools, and finding key server and middleware components.
Why use it?
It gives a coding agent the project context needed to work consistently in the repository.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is dathere/fbi-crime-data-mcp's own configuration. It tells Claude Code how to work on fbi-crime-data-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything fbi-crime-data-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to dathere/fbi-crime-data-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dathere/fbi-crime-data-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/dathere/fbi-crime-data-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fbi-crime-data-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/dathere/fbi-crime-data-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/dathere/fbi-crime-data-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/dathere/fbi-crime-data-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/dathere/fbi-crime-data-mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fbi-crime-data-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/dathere/fbi-crime-data-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/dathere/fbi-crime-data-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,154 This file is loaded in full into every session.
When invoked 1,154 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01154 $0.01154
Opus 5.5 $0.00462 $0.00462
Sonnet 5.5 $0.00231 $0.00231
Haiku 4.5 $0.00115 $0.00115

Measured 2mo ago against content hash 629afe899808, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fbi-crime-data-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 37 lines

How it starts

The opening of the file, as written. The whole thing — 37 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

FBI Crime Data MCP Server — a Python MCP server providing 17 tools (15 for querying the FBI Crime Data Explorer API at https://api.usa.gov/crime/fbi/cde, plus 2 admin tools for cache and spillover management). Built with fastmcp (v3.2+) and httpx, deployable via uvx fbi-crime-data-mcp.

Build & Run

uv sync                                           # install deps
FBI_API_KEY=xxx uv run fbi-crime-data-mcp          # run server (stdio)
uv run pytest                                      # run tests
FBI_API_KEY=xxx uv run pytest -m integration        # integration tests (hits real API)

Architecture

  • src/fbi_crime_data_mcp/server.py — FastMCP server entry point with lifespan context. Imports all tool modules. Configures three ErrorAwareCachingMiddleware instances (from caching.py) with FileTreeStore for tiered disk-backed caching (90-day TTL for summaries/trends/reference/NIBRS estimation; 30-day TTL for agency lookups and granular crime/officer data; 1-day TTL for homepage summary), plus a ResponseSpilloverMiddleware for oversized responses. Cache persists to ~/.cache/fbi-crime-data-mcp/.
  • src/fbi_crime_data_mcp/api_client.py — Shared httpx.AsyncClient wrapper with sliding-window rate limiter (1000 req/hr). AppContext dataclass is the lifespan context available to all tools via ctx.lifespan_context.
  • src/fbi_crime_data_mcp/response_utils.py — Post-processing for API responses: process_crime_response() trims verbose sections (tooltips, participated_population) and aggregates monthly mm-yyyy data into yearly totals, adding a top-level _partial_years marker when any year has fewer than 12 months of data; filter_agencies_by_name() does case-insensitive substring filtering on agency lists.
  • src/fbi_crime_data_mcp/constants.py — All validation enums: SRS offenses, NIBRS codes, arrest offenses, bias codes, LESDC chart types, states.
  • src/fbi_crime_data_mcp/caching.py — ErrorAwareCachingMiddleware, a ResponseCachingMiddleware subclass whose on_call_tool skips writing results that start with an UNCACHEABLE_PREFIXES entry (Error:, Rate limit reached). Tools never raise, so without this a timeout or HTTP 5xx would be cached for the full TTL. Mirrors fastmcp 3.2 private internals; tests/test_caching.py guards the layout.
  • src/fbi_crime_data_mcp/spillover.py — ResponseSpilloverMiddleware saves oversized tool responses (>128K chars) to disk under ~/.cache/fbi-crime-data-mcp/spillover/, returning a preview with the file path. Content-addressed filenames avoid duplicates.
  • src/fbi_crime_data_mcp/validators.py — Shared validation helpers used by tools: level, data_type, aggregate, state, ORI, date format (mm-yyyy / yyyy), year range, and offense code validators. Also provides build_geo_path() for constructing national/state/agency API paths and effective_aggregate() for aggregate passthrough logic.
  • src/fbi_crime_data_mcp/tools/ — One module per tool, each registers via @mcp.tool() decorator on the shared mcp instance imported from server.py.

Read the full file on GitHub · 37 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed · +1 lines · +220 tokens per session 629afe899808
  2. 2mo ago First seen · 36 lines · 934 tokens per session scan A f7732e35c478

Subscribe to this mod's changes

fbi-crime-data-mcp CLAUDE.md is an instructions file published in the GitHub repository dathere/fbi-crime-data-mcp (3 stars, last pushed 8d ago), licensed MIT. It adds 1,154 tokens to every session, about $0.0046 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

fbi-crime-data-mcp CLAUDE.md compared with instructions from other repositories

fbi-crime-data-mcp CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
fbi-crime-data-mcp CLAUDE.mddathere/fbi-crime-data-mcpInstructions file38d agoMITA1,154Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode