PublicSafetyAPI

السجل الرسمي الصحة

US police, fire, EMS and hospital locations near any address, from federal HIFLD data

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

PYPI package publicsafetyapi-mcp
Claude Code
claude mcp add publicsafetyapi -e 'PUBLICSAFETYAPI_KEY=<your publicsafetyapi_key>' -- uvx publicsafetyapi-mcp==0.1.3
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "publicsafetyapi": {
            "command": "uvx",
            "args": [
                "publicsafetyapi-mcp==0.1.3"
            ],
            "env": {
                "PUBLICSAFETYAPI_KEY": "<your publicsafetyapi_key>"
            }
        }
    }
}

متغيرات البيئة

  • PUBLICSAFETYAPI_KEY إلزامي سري API key from https://publicsafetyapi.dev (free tier: 500 requests/month)

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. publicsafetyapi-mcp
  2. Installation
  3. Configuration
  4. Available Tools
  5. Examples
  6. Links
  7. License

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

ToolDescription
find_stations_near_addressFind the nearest facilities to a US street address
find_stations_near_coordinatesSame, but from a lat/lng (skips geocoding)
get_stationFull record for one facility by ID
list_stationsList/search facilities by type, state, name, or ZIP
get_jurisdictionWhich city/town (or county, if unincorporated) contains a location, and which agencies of one type likely serve it
get_state_summaryFacility 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.

License

MIT

الأسئلة الشائعة

ما هو PublicSafetyAPI؟

US police, fire, EMS and hospital locations near any address, from federal HIFLD data

كيف أثبّت PublicSafetyAPI؟

يعمل على جهازك. في Claude Code: claude mcp add publicsafetyapi -e 'PUBLICSAFETYAPI_KEY=<your publicsafetyapi_key>' -- uvx publicsafetyapi-mcp==0.1.3. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج PublicSafetyAPI إلى مفتاح API؟

نعم. يتطلب PUBLICSAFETYAPI_KEY، وتضبطها في إعداداته.

هل PublicSafetyAPI مفتوح المصدر؟

شيفرته علنية على GitHub، لكن المستودع لا يعلن ترخيصًا قياسيًا.

من يصون PublicSafetyAPI؟

ينشره public-safety-api. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.