publicsafetyapi-mcp
OfficialClick on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@publicsafetyapi-mcpWhat's the closest fire station to 350 Fifth Ave, New York?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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-mcpOr run directly with uvx (no install needed):
uvx publicsafetyapi-mcpRelated MCP server: civic-library-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 the nearest facilities to a US street address |
| Same, but from a lat/lng (skips geocoding) |
| Full record for one facility by ID |
| List/search facilities by type, state, name, or ZIP |
| Which city and county contain a location |
| 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
REST API docs: publicsafetyapi.dev/docs
License
MIT
Available Tools
6 toolsfind_stations_near_addressA
Find the public safety facilities nearest to a US street address, sorted by distance.
Args: address: Full US street address, e.g. "350 Fifth Ave, New York, NY" type: Optional filter — "fire", "police", "ems", or "hospital". Comma-separate for several; omit to return all types. radius_miles: Search radius in miles (0.1–50, default 10) limit: Maximum facilities to return (1–25, default 5)
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | ||
| limit | No | ||
| address | Yes | ||
| radius_miles | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and does a good job disclosing core behaviors: sorting by distance, optional type filtering with comma-separation, and parameter ranges. It does not mention potential error handling or output structure, but the primary operational traits are covered.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is tightly focused: a single sentence defining purpose followed by a clean, well-formatted arg list. Every line provides necessary information with no filler, making it easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no output schema and no annotations, the description covers all parameters, the main behavior, and even edge constraints (radius/limit ranges). It stops short of a 5 by not describing the return structure or edge-case behavior (e.g., no results), but it is sufficient for selecting and invoking the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no descriptions for its parameters (0% coverage), so the description fully compensates by explaining each one with examples, allowed values, defaults, and ranges. This adds significant meaning beyond the raw schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action ('Find') and resource ('public safety facilities') with clear scope ('nearest to a US street address') and even includes sorting behavior ('sorted by distance'). This clearly distinguishes it from sibling tools like find_stations_near_coordinates or get_station.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly implies the tool is for address-based queries ('US street address'), providing strong context for when to choose it over the coordinates-based sibling. However, it does not explicitly name alternatives or exclusions, so it stops short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_stations_near_coordinatesA
Find the public safety facilities nearest to a latitude/longitude, sorted by distance. Use this when you already have coordinates; it skips geocoding and is faster than find_stations_near_address.
Args: lat: Latitude (WGS84) lng: Longitude (WGS84) type: Optional filter — "fire", "police", "ems", or "hospital" radius_miles: Search radius in miles (0.1–50, default 10) limit: Maximum facilities to return (1–25, default 5)
| Name | Required | Description | Default |
|---|---|---|---|
| lat | Yes | ||
| lng | Yes | ||
| type | No | ||
| limit | No | ||
| radius_miles | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden. It discloses the read-only nature via 'find', the behavior of skipping geocoding, and sorted-by-distance output. It does not mention error handling or output format, but for a straightforward lookup, this is adequate. No contradiction with annotations (none provided).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact: two introductory sentences plus a clean parameter list. Every line earns its place, with purpose well front-loaded and no redundant fluff. The Args list is necessary given the schema's lack of descriptions.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple, yet the description covers purpose, parameter semantics, and usage guidance. It lacks explicit output structure or edge-case behavior (e.g., no results), but given the absence of an output schema and the straightforward nature of a find operation, it is sufficiently complete. The sibling context further clarifies its niche.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has zero field descriptions (coverage 0%), so the Args section fully compensates by explaining each parameter: lat/lng as WGS84, type with allowed values, radius_miles range 0.1–50 with default 10, and limit range 1–25 with default 5. This adds substantial meaning beyond raw types.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Find the public safety facilities nearest to a latitude/longitude, sorted by distance.' This clearly distinguishes it from sibling find_stations_near_address by noting it skips geocoding, making the purpose explicit and differentiated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use this tool: 'Use this when you already have coordinates; it skips geocoding and is faster than find_stations_near_address.' This names the exact alternative and provides a clear condition, plus a performance rationale.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_jurisdictionA
Determine which Census-defined place (city/town) contains a location, and
which agencies most likely respond there. Returns the place name, state,
Census GEOID, boundary type, and a likelyAgencies list of nearby police,
fire, EMS, and hospital facilities. Useful for routing, coverage reporting,
or working out which local government and responders serve an address.
Provide either an address, or a lat/lng pair.
Args: address: Full US street address (geocoded automatically) lat: Latitude (WGS84) — use with lng instead of address lng: Longitude (WGS84) — use with lat instead of address
| Name | Required | Description | Default |
|---|---|---|---|
| lat | No | ||
| lng | No | ||
| address | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It transparently lists the return values: 'place name, state, Census GEOID, boundary type, and a likelyAgencies list.' It also discloses that address is 'geocoded automatically' and specifies the lat/lng coordinate system (WGS84). It stops short of detailing failure modes or the exact structure of likelyAgencies, but for a read-only lookup it is adequately transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured: a purpose paragraph, a usage paragraph, and a concise Args list. Every sentence adds value. It front-loads the core functionality, making it easy for an agent to quickly grasp the tool's purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite no output schema or annotations, the description covers the tool's purpose, use cases, parameters, and return values. It is complete enough for an agent to invoke correctly. Minor gaps include lack of error-handling details (e.g., what happens if neither/nor both inputs are provided) and deeper structure of the likelyAgencies list, but these are not critical for a basic lookup tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It does so thoroughly with an Args section: 'address: Full US street address (geocoded automatically)', 'lat: Latitude (WGS84) — use with lng instead of address', 'lng: Longitude (WGS84) — use with lat instead of address'. It also clarifies the mutual exclusivity of address vs. lat/lng, which is a constraint not apparent from the schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Determine which Census-defined place (city/town) contains a location, and which agencies most likely respond there.' It clearly distinguishes itself from sibling tools like find_stations_near_address, which focus on station discovery, whereas this tool identifies jurisdiction and responders.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states practical use cases: 'Useful for routing, coverage reporting, or working out which local government and responders serve an address.' It does not explicitly name alternatives or exclusions, but the purpose is clear enough that an agent can infer when to use this tool versus the sibling station-related tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_state_summaryA
Get facility counts by type (fire, police, EMS, hospital) for one state.
Args: state_code: Two-letter state abbreviation, e.g. "CA"
| Name | Required | Description | Default |
|---|---|---|---|
| state_code | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the basic operation and does not mention output format, error handling, read-only nature, or other behavioral traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: a single purpose sentence plus a parameter breakdown. It is front-loaded and every sentence earns its place with no waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple single-parameter tool, the description sufficiently covers the purpose and parameter semantics. It lacks explicit return format details, but the phrase 'facility counts by type' implies the output structure, making it reasonably complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides only 'state_code' with no description. The description adds critical semantics: 'two-letter state abbreviation, e.g. "CA"', fully clarifying the parameter format and example.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves facility counts by type (fire, police, EMS, hospital) for a state. This specific verb-resource-scope combination distinguishes it from sibling tools that focus on station lookups, lists, and jurisdictions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for state-level summary data but does not explicitly state when to use it versus alternatives, nor provide exclusions. It is adequate for a simple tool but lacks direct guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_stationA
Get the full record for one facility by its ID, including address, phone, coordinates, and (for hospitals) beds, trauma level, and ownership.
Args: station_id: Facility ID, e.g. "fire_CA_12345"
| Name | Required | Description | Default |
|---|---|---|---|
| station_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the transparency burden. It discloses what the response includes (address, phone, coordinates, and for hospitals beds, trauma level, ownership) and gives an ID format example. It doesn't mention error handling or auth, but for a non-destructive retrieval tool, the main behavioral traits are adequately conveyed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded. The first sentence states the purpose and key scope, and the Args line efficiently documents the parameter. No filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter get-by-ID tool with no output schema, the description is complete: it explains what the tool does, what data is returned, and the expected ID format. The sibling context clarifies when this tool fits, and no additional behavioral information is necessary.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides only the name and type of station_id (string). The description adds meaning by explaining it as a facility ID and giving a concrete example ('fire_CA_12345'). This compensates for the 0% schema description coverage, though only one parameter exists.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific action (get full record) on a specific resource (one facility by ID), and lists the included fields (address, phone, coordinates, and hospital-specific data). This distinguishes it from siblings like find_stations_near_address or list_stations, which serve different lookup or listing purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The context is clear: use this tool when you have a facility ID and need the full record. It doesn't explicitly name alternatives or state when not to use it, but the implied scenario (direct ID lookup) is evident from the description and sibling tool names. Lacks explicit exclusion, so not a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_stationsA
List or search public safety facilities by type, state, name, or ZIP. Use this for questions like "how many fire stations are in Kansas" or to find a facility by name. For "what's nearest to X", use find_stations_near_address instead.
Args: type: "fire", "police", "ems", or "hospital" (comma-separate for several) state: Two-letter state code, e.g. "CA" name: Full-text search on the facility name zip: 5-digit ZIP code limit: Results per page (1–100, default 25) offset: Pagination offset (default 0)
| Name | Required | Description | Default |
|---|---|---|---|
| zip | No | ||
| name | No | ||
| type | No | ||
| limit | No | ||
| state | No | ||
| offset | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses that the tool lists or searches (non-mutating), supports comma-separated types, and explains pagination via limit and offset. It does not describe the response shape or error behavior, but the read-only nature and key constraints are clear.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with a clear purpose, followed by two concise usage examples and a structured Args block. Every sentence adds value, with no fluff or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers all six parameters, gives usage examples, and references a sibling tool. It lacks return-value details (no output schema exists) and only differentiates from one of five siblings, but for a straightforward list/search tool it is highly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero descriptions, but the Args section fully compensates: each parameter is documented with types, formats, allowed values, defaults, and pagination details. This goes well beyond the schema's raw property names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it lists or searches public safety facilities with specific filters (type, state, name, ZIP). The verb 'list or search' and the resource are explicit, and the description differentiates from a sibling by saying 'For "what's nearest to X", use find_stations_near_address instead.'
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides concrete examples of when to use this tool ('how many fire stations are in Kansas') and explicitly points to an alternative tool for proximity queries. This gives clear context and an exclusion, satisfying the 'when/when-not/alternatives' criterion.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
6 tool updates
v0.1.2- First observed
find_stations_near_address - First observed
find_stations_near_coordinates - First observed
get_jurisdiction - First observed
get_state_summary - First observed
get_station - First observed
list_stations
TDQS
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.
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.
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.
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
- UnifAPIOAuthcom.unifapi
Hosted MCP server for live public-data APIs and Skills for AI agents.
Agent-native MCP server over 49M+ US public and government records, privacy-first, always current.
Hosted MCP server exposing US hospital procedure cost data to AI assistants
- earthOAuthcom.mireye
MCP server for Mireye Earth — federal-source-cited geospatial data for any MCP-aware agent.
Related MCP Servers
- AlicenseAqualityCmaintenanceOpen-source MCP server providing real estate regulatory intelligence (zoning, permits, entitlements, deal scoring) for US properties, enabling AI agents to access 10 callable tools.1215MIT
- AlicenseAqualityBmaintenanceAn MCP server that gives AI agents clean, token-efficient access to US civic & property data — geocoding, census tracts, Opportunity Zones, ACS demographics, and FEMA flood zones — sourced entirely from free federal open data.5521MIT
- AlicenseNot gradedqualityAmaintenanceProvides complete world location data (countries, states, cities) as an MCP server for AI assistants, enabling search and retrieval of geographic information through 11 tools and 5 resources.2872MIT
- AlicenseAqualityCmaintenanceMCP server for the loc8n Geographic Data API. Exposes U.S. demographics, housing, mortgage, migration, employment, and geographic data as tools.2351MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/public-safety-api/publicsafetyapi-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server