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 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
- PyPI: pypi.org/project/publicsafetyapi-mcp
- REST API docs: publicsafetyapi.dev/docs
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file publicsafetyapi_mcp-0.1.1.tar.gz.
File metadata
- Download URL: publicsafetyapi_mcp-0.1.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4079dd31442aafca8f5105628b94f3e0deda747a7b88e62da6c9dda85f8a0630
|
|
| MD5 |
39c403ce7687fa0fbafbec9eb741899b
|
|
| BLAKE2b-256 |
08e8a2c5fd83bbb84d1df45dbb81bf4034f69be6778cd838b1f060e204f50f77
|
File details
Details for the file publicsafetyapi_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: publicsafetyapi_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
521dc61677225460efae3824a111b0f26d2124dfaa637d225bd5dfed269c3976
|
|
| MD5 |
89b0b7c28839bfe6ce44e625fd6f90d5
|
|
| BLAKE2b-256 |
223a1d6136a257933b3144dd57f74eae027eac284bfd3539ccef49d0c7ba86f9
|