PublicSafetyAPI
US police, fire, EMS and hospital locations near any address, from federal HIFLD data
Install
Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).
publicsafetyapi-mcpclaude mcp add publicsafetyapi -e 'PUBLICSAFETYAPI_KEY=<your publicsafetyapi_key>' -- uvx publicsafetyapi-mcp==0.1.3
{
"mcpServers": {
"publicsafetyapi": {
"command": "uvx",
"args": [
"publicsafetyapi-mcp==0.1.3"
],
"env": {
"PUBLICSAFETYAPI_KEY": "<your publicsafetyapi_key>"
}
}
}
}
Environment variables
PUBLICSAFETYAPI_KEYrequired secret API key from https://publicsafetyapi.dev (free tier: 500 requests/month)
Documentation
From the project's README on GitHub, refreshed weekly. Links open on GitHub.
publicsafetyapi-mcp
mcp-name: dev.publicsafetyapi/publicsafetyapi-mcp
MCP server for 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
pip install publicsafetyapi-mcp
Or run directly with uvx (no install needed):
uvx publicsafetyapi-mcp
Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"publicsafetyapi": {
"command": "uvx",
"args": ["publicsafetyapi-mcp"],
"env": {
"PUBLICSAFETYAPI_KEY": "your_api_key_here"
}
}
}
}
Cursor / other MCP clients
{
"mcpServers": {
"publicsafetyapi": {
"command": "uvx",
"args": ["publicsafetyapi-mcp"],
"env": {
"PUBLICSAFETYAPI_KEY": "your_api_key_here"
}
}
}
}
Get a free API key at 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/town (or county, if unincorporated) contains a location, and which agencies of one type likely serve it |
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
- PyPI: pypi.org/project/publicsafetyapi-mcp
- REST API docs: publicsafetyapi.dev/docs
License
MIT
Frequently asked questions
What is PublicSafetyAPI?
US police, fire, EMS and hospital locations near any address, from federal HIFLD data
How do I install PublicSafetyAPI?
It runs on your machine. In Claude Code: claude mcp add publicsafetyapi -e 'PUBLICSAFETYAPI_KEY=<your publicsafetyapi_key>' -- uvx publicsafetyapi-mcp==0.1.3. For other clients, paste the JSON configuration from this page into their MCP settings.
Does PublicSafetyAPI need an API key?
Yes. It expects PUBLICSAFETYAPI_KEY, which you set in its configuration.
Is PublicSafetyAPI open source?
Its code is public on GitHub, but the repository does not declare a standard license.
Who maintains PublicSafetyAPI?
It is published by public-safety-api. AI.tn lists it but does not maintain or endorse it.
From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.