Skip to main content
Glama
public-safety-api

publicsafetyapi-mcp

Official
README.md
# publicsafetyapi-mcp

<!-- Links this package to its entry in the official MCP registry -->
mcp-name: dev.publicsafetyapi/publicsafetyapi-mcp

MCP server for [publicsafetyapi.dev](https://publicsafetyapi.dev) — US police stations, fire departments, EMS bases, and hospitals for AI agents.

Expose public safety facility lookups as tools to any MCP-compatible AI assistant (Claude, Cursor, Copilot, etc.). Built on federal HIFLD, USFA, and CMS data — public domain, commercially usable.

## Installation

```bash
pip install publicsafetyapi-mcp
```

Or run directly with `uvx` (no install needed):

```bash
uvx publicsafetyapi-mcp
```

## Configuration

### Claude Desktop

Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "publicsafetyapi": {
      "command": "uvx",
      "args": ["publicsafetyapi-mcp"],
      "env": {
        "PUBLICSAFETYAPI_KEY": "your_api_key_here"
      }
    }
  }
}
```

### Cursor / other MCP clients

```json
{
  "mcpServers": {
    "publicsafetyapi": {
      "command": "uvx",
      "args": ["publicsafetyapi-mcp"],
      "env": {
        "PUBLICSAFETYAPI_KEY": "your_api_key_here"
      }
    }
  }
}
```

Get a free API key at [publicsafetyapi.dev](https://publicsafetyapi.dev) — 500 requests/month, no credit card.

## Available Tools

| Tool | Description |
|------|-------------|
| `find_stations_near_address` | Find the nearest facilities to a US street address |
| `find_stations_near_coordinates` | Same, but from a lat/lng (skips geocoding) |
| `get_station` | Full record for one facility by ID |
| `list_stations` | List/search facilities by type, state, name, or ZIP |
| `get_jurisdiction` | Which city and county contain a location |
| `get_state_summary` | Facility counts by type for a state |

Facility types: `fire`, `police`, `ems`, `hospital`.

## Examples

Once configured, you can ask your AI assistant:

> "What's the closest fire station to 350 Fifth Ave, New York?"

> "How many hospitals are in Montana, and which have trauma centers?"

> "I'm building an emergency-response app — find every police and fire station within 5 miles of downtown Austin."

The assistant calls the matching tool and gets structured JSON back — addresses, phone numbers, coordinates, and for hospitals, beds, trauma level, and ownership.

## Links

- **Website:** [publicsafetyapi.dev](https://publicsafetyapi.dev)
- **PyPI:** [pypi.org/project/publicsafetyapi-mcp](https://pypi.org/project/publicsafetyapi-mcp)
- **REST API docs:** [publicsafetyapi.dev/docs](https://publicsafetyapi.dev/docs)

## License

MIT

TDQS

A4.4/5.0

Scored across 6 tools

Disambiguation4/5

The tools are mostly distinct: find_stations_near_address vs find_stations_near_coordinates differ only by input method, but both are clearly explained. get_jurisdiction returns nearby agencies alongside place info, which slightly overlaps with find_stations, but the descriptions explicitly differentiate use cases.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (find_, get_, list_). The action verbs are semantically appropriate, and naming conventions are uniform throughout.

Tool Count5/5

With 6 tools, the server is well-scoped for a public safety facility lookup API. Each tool serves a distinct query need (proximity, detail, search, jurisdiction, summary), and none are redundant.

Completeness5/5

The read-only query surface covers the expected operations: proximity search by address or coordinates, detail by ID, filtered/paginated listing, jurisdiction lookup, and state-level aggregation. No critical gaps appear for the stated purpose.

Maintenance

ActivityMaintained
ResponsivenessNo issues