About Cs451 Final Project
Cs451 Final Project is an MCP server published by hargunmujral in the Other category.
Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.
Install
git clone https://github.com/hargunmujral/cs451-final-projectThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Tools (10)
analyze_route_riskAssess accident risk along a planned route
Parameters not published.
get_accident_hotspotsFind locations with highest accident frequency
Parameters not published.
get_accidents_near_locationSearch accidents within radius of GPS coordinates
Parameters not published.
get_covid_impact_analysisCompare pre/during/post COVID patterns
Parameters not published.
get_realtime_risk_score**Primary AV tool**: Combined risk score with recommendations, however not completely real time since the dataset cuts off in 2023
Parameters not published.
get_road_feature_riskAnalyze risk at junctions, crossings, etc.
Parameters not published.
get_state_statisticsComprehensive stats for any US state
Parameters not published.
get_temporal_risk_assessmentRisk analysis based on time of day/week
Parameters not published.
get_weather_risk_assessmentRisk analysis based on weather conditions
Parameters not published.
search_accident_descriptionsKeyword search in accident descriptions
Parameters not published.
Ask AI
Ask AI about Cs451 Final Project
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
5 checks have not been run yet.
README
US Accidents MCP Server
An MCP server that enables LLMs to "talk to" a US Accidents dataset. Designed for an Autonomous Vehicle Agent that can assess driving risks based on historical accident data.
Dataset
Project Overview
-
Data Science Notebook (
data-science.ipynb): Exploratory analysis revealing insights about:- Accident hotspots by state and city
- Temporal patterns (rush hour, day of week)
- Weather condition impacts
- Congestion duration analysis
-
Predictive Models: Two machine learning models trained on the dataset:
- Severity Prediction Model (
severity_model.pkl): Binary classifier predicting whether an accident will be severe. - Congestion Duration Model (
congestion_duration_model.pkl): Multi-class classifier predicting congestion duration.
- Severity Prediction Model (
-
MCP Server (
mcp_server/): Allows LLMs to query the dataset through 10 specialized tools (possibly more in the future) designed for autonomous vehicle decision-making. Find the setup instructions for the MCP server below.
MCP Tools Available
| Tool | Description |
|---|---|
get_accident_hotspots |
Find locations with highest accident frequency |
get_accidents_near_location |
Search accidents within radius of GPS coordinates |
get_temporal_risk_assessment |
Risk analysis based on time of day/week |
get_weather_risk_assessment |
Risk analysis based on weather conditions |
analyze_route_risk |
Assess accident risk along a planned route |
get_road_feature_risk |
Analyze risk at junctions, crossings, etc. |
get_state_statistics |
Comprehensive stats for any US state |
search_accident_descriptions |
Keyword search in accident descriptions |
get_covid_impact_analysis |
Compare pre/during/post COVID patterns |
get_realtime_risk_score |
Primary AV tool: Combined risk score with recommendations, however not completely real time since the dataset cuts off in 2023 |
Start
1. Install Dependencies
cd mcp_server
pip install -e .
Or install the MCP library directly:
pip install "mcp[cli]"
2. Build the Database
Convert the CSV to an optimized SQLite database:
# Make sure US_Accidents_March23.csv is downloaded from Kaggle and extracted from zip in the project root
python -m mcp_server.build_database
This creates mcp_server/accidents.db (~3.2GB).
3. Test the Server
# Test that the server starts correctly
python -m mcp_server.server
4. Connect to Claude Desktop
Copy the configuration to Claude Desktop's config:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
or directly edit in the Claude Desktop App settings.
{
"mcpServers": {
"us-accidents": {
"command": "python", // or full path to python executable
"args": ["-m", "mcp_server.server"],
"cwd": "/path/to/cs451-final-project"
}
}
}
Tools will be available once Claude Desktop is restarted.
Example Conversations
Autonomous Vehicle Route Planning
You: I'm planning a route from San Francisco to Los Angeles. It's currently 5pm on a Friday and it's raining. What should my AV be aware of?
Claude can call multiple tools:
analyze_route_riskwith waypointsget_realtime_risk_scorefor SF and LAget_weather_risk_assessmentfor rain conditionsget_temporal_risk_assessmentfor Friday rush hour
More examples
What's the safest time to drive through Miami? How did COVID affect accident rates in California?
Demo Recordings
The demo recordings can be found in the recordings/ directory. One video goes over simple questions with one tool called each, and the other video goes over a scenario where multiple tools are called in sequence to help an autonomous vehicle plan a safe route.
Authors
- Hargun Singh Mujral
- Kushal Mujral
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.