construction-safety-inspector
Click on "Deploy 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., "@construction-safety-inspectoranalyze this photo for safety hazards"
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.
# Construction Site Safety Inspector
An LLM-powered system for automated construction site hazard detection and incident analysis.
## Overview
This system analyzes construction site photos and incident PDF reports to detect safety hazards, retrieve similar past accidents from a KOSHA database, and generate professional bilingual safety reports with citations.
Built as a final project for LLM-AE-AI course at Kyung Hee University.
## Features
- Vision Hazard Detection: Claude analyzes site photos and identifies safety violations with severity levels
- PDF Incident Analysis: Extracts and analyzes construction accident report PDFs
- RAG Pipeline: Searches 37 real KOSHA accident cases using hybrid BM25 and VoyageAI search
- Tool Use: classify_hazard() function assigns hazard type and KOSHA regulation codes
- Bilingual Reports: Professional safety reports in Korean and English with citations
- Urgent Prevention Alerts: Automatically fires alerts when HIGH severity hazards are detected
- 2D Hazard Visualization: Draws colored bounding boxes on site photos
- YOLO vs Claude Comparison: Side by side comparison showing why Claude beats YOLO
- Weekly Safety Summary: Management level weekly report of all inspections and alerts
- MCP Server: Exposes all tools via FastMCP for Claude Desktop integration
- PDF Report Generation: Professional PDF reports with metrics, images, and hazard cards
## Technology Stack
W1 - Prompt Engineering: Domain safety inspection system prompt
W2 - Claude API: Core backend for all AI operations
W3 - LLM-as-Judge: Evaluates report quality automatically
W4 - Tool Use: classify_hazard() function
W5 - RAG Pipeline: VoyageAI + BM25 + RRF on KOSHA PDFs
W6 - Vision, PDF, Citations, Caching: Photo analysis, document reading, cited output
W7 - MCP Server via FastMCP: Claude Desktop integration
## Project Structure
safety-inspector/
  app.py Streamlit web interface
  inspector.py Core AI pipeline
  rag_builder.py Builds RAG index from KOSHA PDFs
  yolo_compare.py YOLO vs Claude comparison
  mcp_server.py MCP server
  pdf_generator.py PDF report generation
  data/pdfs/ KOSHA accident PDFs
  outputs/ Generated reports and alerts
## Setup
1. Clone the repository
2. Create virtual environment: python -m venv venv
3. Activate: venv\Scripts\activate
4. Install dependencies: pip install -r requirements.txt
5. Create .env file with your API keys:
  ANTHROPIC_API_KEY=your_key_here
  VOYAGE_API_KEY=your_key_here
6. Download KOSHA PDFs into data/pdfs/
7. Build RAG index: python rag_builder.py
8. Run the app: streamlit run app.py
## Demo
Streamlit Web App:
streamlit run app.py
MCP Server:
npx @modelcontextprotocol/inspector python mcp_server.py
## Data Source
KOSHA construction accident case reports:
## Developer
Muhammad Ali
Student ID: 2026311007
Course: LLM-AE-AI
Professor: 백장운
Kyung Hee University
Graduate School of Architecture Engineering
This server cannot be deployed
Maintenance
Related MCP Connectors
Connects AI assistants to QCDatabase.AI for everyday construction quality-control work.
- platform7nOAuthtech.p7n
Connect Claude to your Platform7n workspaces — chat, links, and tasks. One-click OAuth.
AI Visibility and Content Intelligence tools for Claude and MCP-compatible agents.
AI-powered corporate learning platform — manage courses, users, and insights via Claude.
Related MCP Servers
- AlicenseCqualityCmaintenanceEnables AI-powered automated testing, security scanning, code review, and maintenance tasks directly within Claude Code or desktop.124MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to autonomously analyze camera images for occupational safety violations, generate risk reports per ISG regulations, and log violations to a database.1-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to query workplace incident data using RAG, providing search, analysis, and corrective action plans.1MIT
- FlicenseNot gradedqualityDmaintenanceEnables users to interact with professional digital twin data via Claude Desktop, including searching experience, managing contact and scheduling, and generating introductions and project showcases.-