# PublicSafetyAPI

Look up US police stations, fire departments, EMS stations, and hospitals by address or coordinates. Useful for mapping public safety infrastructure in AI agents.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: public-safety-api
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/public-safety-api/publicsafetyapi-mcp
- Updated: 2026-10-04
- HTML: https://affpapa.org/en/nevibecode/mcp/publicsafetyapi

## What it does

This MCP server links US federal emergency service records directly to your coding assistant. It taps into public domain data from HIFLD, USFA, and CMS across four categories: police, fire, EMS, and hospitals.

The server exposes tools to locate facilities by street address (`find_stations_near_address`) or coordinates (`find_stations_near_coordinates`), retrieve specific facility details by ID (`get_station`), filter by ZIP code or state (`list_stations`), inspect local jurisdictions (`get_jurisdiction`), and pull state-level aggregates (`get_state_summary`).

Running the tools requires a valid `PUBLICSAFETYAPI_KEY` passed via environment variables, otherwise requests fail. The free tier covers 500 queries per month without requiring payment card details.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `PUBLICSAFETYAPI_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add publicsafetyapi-mcp -e PUBLICSAFETYAPI_KEY=<PUBLICSAFETYAPI_KEY> -- uvx publicsafetyapi-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from publicsafetyapi-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add publicsafetyapi --env PUBLICSAFETYAPI_KEY=<PUBLICSAFETYAPI_KEY> -- uvx publicsafetyapi-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from publicsafetyapi-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "publicsafetyapi": {
            "command": "uvx",
            "args": [
                "publicsafetyapi-mcp"
            ],
            "env": {
                "PUBLICSAFETYAPI_KEY": "<PUBLICSAFETYAPI_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from publicsafetyapi-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "publicsafetyapi": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "publicsafetyapi-mcp"
            ],
            "env": {
                "PUBLICSAFETYAPI_KEY": "<PUBLICSAFETYAPI_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from publicsafetyapi-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e PUBLICSAFETYAPI_KEY=<PUBLICSAFETYAPI_KEY> publicsafetyapi uvx publicsafetyapi-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from publicsafetyapi-mcp <command>

## When to use it
- locate emergency stations near a specific US street address
- retrieve hospital bed counts and trauma center designations
- determine which emergency agencies serve a specific town or county
- aggregate public safety facility counts across an entire US state

## Example prompts
- Find the nearest fire station to 350 Fifth Ave, New York
- List hospitals located in Montana that operate a trauma center
- Show all emergency facilities near coordinates 30.2672, -97.7431

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89899
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16730
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40459
- [dbx](https://affpapa.org/en/nevibecode/mcp/dbx.md) — MCP server · ★ 27844
- [Metabase](https://affpapa.org/en/nevibecode/mcp/metabase.md) — MCP server · ★ 49863

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
