Construction-Hazard-Detection
Enhances construction site safety using YOLO for object detection, identifying hazards like workers without helmets or safety vests, and proximity to machinery or vehicles. HDBSCAN clusters safety cone coordinates to create monitored zones. Post-processing algorithms improve detection accuracy.
claude mcp add --transport stdio yihong1120-construction-hazard-detection python -m examples.mcp_server.main
How to use
This MCP server exposes a suite of agent-ready tools designed to monitor and manage construction-hazard detection workflows. Built on FastMCP, it provides capabilities for real-time inference, hazard analysis, notification delivery, violation record management, streaming control, and model management. Key entry points include inference.detect_frame for frame-wise detection, hazard.detect_violations for analyzing detected hazards, and violations-related endpoints (search, get, get_image, my_sites) for auditing safety events. It also supports notification channels via notify.line_push, telegram_send, and broadcast_send, along with record operations like send_violation, batch_send_violations, and sync_pending. For model lifecycle, model.fetch/update/list_available/get_local is available, plus geometry utilities for spatial reasoning. The server can transport data over stdio, SSE, or streamable-HTTP, with HTTP as the default transport for typical usage. To get started, run the server in HTTP mode and interact with its MCP endpoints to perform detection, analyze hazards, push alerts, and manage records in real time.
How to install
Prerequisites:
- Python 3.12.x installed (the project targets Python 3.12.x as shown by the supported badges).
- Redis server available if you plan to store streams or results in Redis (recommended for multi-stream management).
- Optional: Docker, if you prefer running auxiliary services (e.g., Redis) via containers.
Step-by-step installation:
-
Create and activate a Python virtual environment
- macOS/Linux: python3 -m venv venv source venv/bin/activate
- Windows: python -m venv venv venv\Scripts\activate
-
Install required Python dependencies
- Ensure you are in the project root or navigate to examples/mcp_server as needed
- Install via pip (requirements are typically listed in the project, e.g. pip install -r requirements.txt or pip install fastmcp redis ultralytics etc.)
-
Verify Python environment and package availability
- python --version should show 3.12.x
- pip install fastmcp redis ultralytics
-
Run the MCP server (HTTP transport by default)
- python -m examples.mcp_server.main
-
Optional: run with stdio transport for debugging
- MCP_TRANSPORT=stdio python -m examples.mcp_server.main
If you prefer an isolated containerized setup, you can run a Redis instance via Docker and then start the MCP server with the appropriate environment variables configured for your setup.
Additional notes
Notes and tips:
- The MCP server exposes multiple tools via a single HTTP/streaming interface; explore endpoints such as inference.detect_frame and hazard.detect_violations to perform real-time analysis.
- If using Redis for stream storage, ensure Redis is reachable from the MCP server and that the appropriate keys/data structures are configured.
- For multi-language notifications, ensure tokens/credentials for LINE, Telegram, WeChat, etc., are configured in the environment or the server configuration as described in the MCP docs.
- When testing, you can run in stdio mode to simplify input/output during development and debugging; switch back to HTTP transport for production usage.
- Review the provided Quick Start JSON example to understand how streams and detections are configured and stored; adapt it to your site and model_key as needed.
Related MCP Servers
ai-guide
程序员鱼皮的 AI 资源大全 + Vibe Coding 零基础教程,分享大模型选择指南(DeepSeek / GPT / Gemini / Claude)、最新 AI 资讯、Prompt 提示词大全、AI 知识百科(RAG / MCP / A2A)、AI 编程教程、AI 工具用法(Cursor / Claude Code / OpenClaw / TRAE / Lovable / Agent Skills)、AI 开发框架教程(Spring AI / LangChain)、AI 产品变现指南,帮你快速掌握 AI 技术,走在时代前沿。本项目为开源文档版本,已升级为鱼皮 AI 导航网站
ScreenMonitorMCP
A REVOLUTIONARY Model Context Protocol (MCP) server! Gives AI real-time vision capabilities and enhanced UI intelligence power. This isn't just screen capture - it gives AI the power to truly "see" and understand your digital world!
supermcp
🚀 SuperMCP - Create multiple isolated MCP servers using a single connector. Build powerful Model Context Protocol integrations for databases (PostgreSQL, MSSQL) with FastAPI backend, React dashboard, and token-based auth. Perfect for multi-tenant apps and AI assistants.
dynamic-fastmcp
Dynamic FastMCP extends the Model Context Protocol Python server with context-aware tools that adapt their behavior and descriptions based on user, tenant, and request context.
omni-lpr
A multi-interface (REST and MCP) server for automatic license plate recognition 🚗
mcp -template
Cookiecutter template for MCP servers with one-click Render.com deployment - Generate production-ready API integration servers in minutes