联邦城市搜救(USAR)MCP服务器
一个全面的模型上下文协议(MCP)服务器,在应急响应行动期间为所有28个联邦USAR任务组提供专门的数字工具。该服务器为1型USAR特遣部队中的70个人员职位中的每一个实施了特定领域的工具,提高了救灾任务期间的作战效率、安全性和协调性。
🚀 特性
35+专用工具 按职能组组织:
- 命令工具:工作队队长仪表板、安全干事监测、人员问责制
- 搜索工具:受害者追踪、技术搜索设备、警犬队部署
- 救援工具:小队行动、受害者提取计划、重型设备行动
- 医疗工具:患者护理跟踪、医疗用品库存、分诊协调
- 规划工具:态势感知(SITL)、资源跟踪(RESL)、文档自动化
- 物流工具:供应链管理、设施协调、地面支持跟踪
- 技术专家工具:结构评估、危险品监测、通信管理
联邦一体化
- 联邦IRIS(事故资源清单系统)集成
- NIMS/ICS协议合规性和自动化
- 联邦资产跟踪系统接口
- 多频段无线电和卫星通信支持
现场优化设计
- 具有离线功能的72-96小时自给自足支持
- 实时设备责任(16400+项)
- 对所有70个工作队职位的人员进行跟踪
- 坚固的硬件兼容性和移动优化
📋 需求
系统要求
- Python 3.11或更高版本
- FastMCP 2.11.3或更高版本
- 建议全面部署4GB+RAM
- 网络连接(具有离线回退功能)
可选依赖关系
- 高级分析:
numpy,scipy,pandas,scikit-learn - 可视化:
matplotlib,plotly,folium,dash - 集成:
boto3,redis,celery,pika
🛠️ 安装
基本安装
# Clone the repository
git clone https://github.com/fema/fema-usar-mcp.git
cd fema-usar-mcp
# Install base dependencies
pip install -e .
# Or install with all features
pip install -e .[dev,advanced,visualization,integration]开发安装
# Install with development tools
pip install -e .[dev]
# Set up pre-commit hooks (optional)
pre-commit install🚀 运行服务器
MCP服务器(主接口)
# Start the FastMCP server
fema-usar-mcp
# Or run directly
python -m fema_usar_mcp.fastmcp_serverHTTP API服务器(可选)
# Start the HTTP API server
fema-usar-http
# Or run directly
python -m app.mainHTTP API将在 http://localhost:8000 具有以下端点:
📡 API终点
健康和状态
GET /health–系统健康检查GET /status–全面的系统状态GET /capabilities–可用的工具和集成
USAR操作
POST /usar/status–获取工作组运行状态POST /usar/deploy–启动工作组部署
ICS表格和资源
GET /ics_forms–列出可用的ICS表格GET /ics_forms/{id}–获取特定的ICS表格详细信息GET /ics_forms/{id}/content–下载ICS表格文件GET /datasets–列出可用的开放数据集GET /documents–列出可用的参考文件
🔧 MCP工具
命令组工具
# Task Force Leader Dashboard
task_force_leader_dashboard(task_force_id="CA-TF1", include_personnel=True)
# Safety Officer Monitoring
safety_officer_monitor(monitoring_mode="real_time")
# Personnel Accountability
personnel_accountability(accountability_type="full")搜索组工具
# Victim Location Tracking
victim_location_tracker(search_area_id="AREA-A1", victim_status="confirmed")
# Technical Search Equipment
technical_search_equipment(equipment_type="delsar", operation_mode="active")
# Canine Team Deployment
canine_team_deployment(search_type="live_find", deployment_status=True)工具使用示例
from fema_usar_mcp.tools.command import task_force_leader_dashboard
# Get comprehensive dashboard for CA-TF1
result = task_force_leader_dashboard(
task_force_id="CA-TF1",
include_personnel=True,
include_equipment=True,
include_missions=True
)
print(result) # Returns JSON with complete situational awareness🧪 测试
运行测试
# Run all tests
pytest
# Run unit tests only
pytest -m unit
# Run with coverage
pytest --cov=fema_usar_mcp
# Run specific test categories
pytest -m integration
pytest -m slow测试类别
unit:快速单元测试integration:与外部系统的集成测试slow:性能和负载测试requires_network:需要网络访问的测试
📁 项目结构
fema-usar-mcp/
├── pyproject.toml # Project configuration and dependencies
├── README.md # This file
├── LICENSE # MIT license
│
├── fema_usar_mcp/ # Main package
│ ├── __init__.py # Package initialization
│ ├── fastmcp_server.py # FastMCP server implementation
│ ├── core.py # Core business logic and models
│ │
│ ├── tools/ # MCP tools organized by function
│ │ ├── command.py # Command group tools
│ │ ├── search.py # Search team tools
│ │ ├── rescue.py # Rescue team tools
│ │ ├── medical.py # Medical team tools
│ │ ├── planning.py # Planning section tools
│ │ ├── logistics.py # Logistics section tools
│ │ └── technical.py # Technical specialist tools
│ │
│ ├── models/ # Pydantic data models
│ │ ├── personnel.py # Personnel and position models
│ │ ├── equipment.py # Equipment and inventory models
│ │ └── operations.py # Mission and operation models
│ │
│ └── integrations/ # External system integrations
│ ├── fema_systems.py # Federal IRIS, NIMS ICT integration
│ ├── equipment.py # Equipment tracking systems
│ └── communications.py # Communication system interfaces
│
├── app/ # Optional HTTP API
│ ├── __init__.py
│ └── main.py # FastAPI application
│
├── tests/ # Comprehensive test suite
│ ├── conftest.py # Test configuration
│ ├── test_fastmcp.py # FastMCP server tests
│ └── test_http_api.py # HTTP API tests
│
├── resources/ # Static resources
│ ├── ics_forms.json # ICS form catalog
│ ├── documents.json # Document catalog
│ ├── forms/ # ICS form files
│ └── documents/ # Reference documents
│
└── docs/ # Additional documentation
├── ARCHITECTURE.md # System architecture
├── DEPLOYMENT.md # Deployment guide
└── API.md # API reference🔒 安全与合规
联邦安全标准
- FISMA合规性:遵循《联邦信息安全管理法》的要求
- FedRAMP就绪:专为FedRAMP授权流程而设计
- NIST网络安全框架:实施NIST安全控制
- PIV卡集成:支持个人身份验证卡身份验证
数据保护
- 加密:对静态和传输中的数据进行AES-256加密
- 访问控制:基于角色的访问控制与ICS职位相一致
- 审计日志:所有系统活动的全面审计跟踪
- 隐私合规:遵守《隐私法》对个人身份信息保护的要求
🌐 整合
MCP客户端配置
{
"mcpServers": {
"fema-usar": {
"command": "fema-usar-mcp",
"args": []
}
}
}环境配置
# Production settings
export UVICORN_HOST=0.0.0.0
export UVICORN_PORT=8080
export UVICORN_WORKERS=4
export CORS_ORIGINS=https://yourdomain.com
# Development settings
export UVICORN_RELOAD=true
export UVICORN_LOG_LEVEL=debug📊 性能指标
目标绩效
- 部署时间:\<5.1小时(比6小时目标提高15%)
- 设备责任:准确率99.5%
- 信息处理:处理时间减少40%
- 文档自动化:80%的ICS表单自动化
- 系统正常运行时间:运营期间99.9%的可用性
运营能力
- 人员职位每个工作队跟踪70个职位
- 设备项目:每个工作队管理16400多个项目
- 工作队:28个联邦工作队在全国范围内得到支持
- 自给自足:72-96小时离线操作能力
🤝 贡献
开发工作流程
- 分叉存储库
- 创建要素分支(
git checkout -b feature/amazing-feature) - 按照编码标准进行更改
- 添加新功能的测试
- 运行测试套件(
pytest) - 提交更改(
git commit -m 'Add amazing feature') - 推送到分支(
git push origin feature/amazing-feature) - 打开拉取请求
编码标准
- 遵循PEP 8风格指南
- 对所有函数签名使用类型提示
- 编写全面的文档字符串
- 保持测试覆盖率在90%以上
- 对版本使用语义版本控制
📝 文档
额外资源
- 产品要求文件(PRD) -综合要求
- 开发标准 -实施指南
- 架构文档 -系统设计
- api参考 -完整的API文件
- 部署指导 -生产部署
培训材料
- 联邦USAR人员培训模块
- 系统管理员指南
- 外部系统的集成文档
- 故障排除和维护程序
🆘 支持
获取帮助
- 问题:报告错误
- 文档:参见 docs/ 目录
- 训练:联系联邦USAR项目办公室
- 紧急支援:在主动部署期间提供全天候支持
系统状态
- 服务状态: 美国妇女地位委员会
- 维护窗口:通过联邦渠道宣布
- 版本更新:在维护窗口期间自动
📄 许可证
此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。
🏛️ 致谢
- 联邦城市搜救计划办公室 -项目监督和要求
- 28个联邦USAR特遣部队 -操作要求和测试
- 美国国家标准与技术研究院(NIST) -网络安全框架
- 国土安全部(DHS) -安全和合规指导
______________________________________________________________________
有关联邦USAR官方信息,请访问: https://www.fema.gov/emergency-managers/practitioners/urban-search-rescue
应急响应: 该系统旨在支持救生行动。对于实际紧急情况,请立即联系当地应急服务部门。
