resq_mcp.server
ResQ MCP Server - Model Context Protocol server for disaster response coordination. This module provides the main FastMCP server implementation for ResQ, offering:- Simulation management via resources and tools
- Drone fleet status and deployment
- Incident validation and response planning
asyncio
contextlib
logging
time
asynccontextmanager
TYPE_CHECKING
Any
FastMCP
settings
validate_environment
setup_telemetry
logger
MAX_SIMULATIONS
MAX_INCIDENTS
MAX_MISSIONS
active missions per sessionCOMPLETED_TTL_SECONDS
evict completed sims after 5 minutesFAILED_TTL_SECONDS
evict failed sims soonerINCIDENT_TTL_SECONDS
evict rejected incident records after 1 hourCONFIRMED_INCIDENT_TTL_SECONDS
confirmed incidents retained for 24hMISSION_TTL_SECONDS
evict stale mission records after 2hsimulations
incidents
missions
keyed by drone_idlifespan
- simulation_processor: Mock simulation state machine that transitions simulations from pending -> processing -> completed and sends SSE notifications to subscribed clients.
- Startup: Log initialization, create background tasks
- Running: Yield control to FastMCP server
- Shutdown: Cancel tasks, suppress CancelledError, log shutdown
server- The FastMCP server instance for notification dispatch.
None- Control returns to FastMCP for request handling.