RESTful MCP server for HCM Chapter 15 two-lane analysis with function calling and doc query capabilities.
Configuration
View docs{
"mcpServers": {
"crosstraffic-highway-capacity-manual-mcp": {
"url": "https://api.hcm-calculator.com/mcp",
"headers": {
"HOST": "127.0.0.1",
"PORT": "8000",
"DB_MODE": "local",
"LOG_LEVEL": "INFO",
"CHROMA_DB_PATH": "./chroma_db",
"ALLOWED_ORIGINS": "http://localhost:3000,http://localhost:3001",
"PUBLIC_SUPABASE_API": "your-anon-key / service-role-key",
"PUBLIC_SUPABASE_URL": "https://"
}
}
}
}You can run and connect to an MCP server that specializes in Highway Capacity Manual (HCM) analysis, enabling AI assistants and code editors to perform detailed two-lane highway analyses and access HCM documentation through a RESTful interface and dynamic function calling.
Connect your MCP client to either the remote server or a local development instance to perform HCM Chapter 15 analyses and to query HCM content. Use the function calling interface to run the registered transportation analysis functions, and use the query tools to fetch relevant HCM sections or summaries. The server exposes endpoints for complete Chapter 15 analysis, individual function calls, and registry queries, and it supports AI assistants like Claude and Copilot through standard MCP protocols.
Prerequisites: you need Python and a working network connection. You will set up a virtual environment, install the package, initialize the database with HCM docs, and start the FastAPI server.
uv venv
# Windows
.venv\Scripts\activate
# Linux
source .venv/bin/activate
uv pip install .You can connect to the MCP server remotely or run it locally for development and testing. For remote usage, point your MCP client to the remote URL shown in the configuration examples. For local usage, run the local server and point your client to the local endpoint at the specified port.
If you enable remote access, ensure your server is protected behind appropriate authentication and network controls. When running locally, configure environment variables to control database paths, host/port, allowed origins, and access keys as needed.
After starting the local server, import HCM documentation to prepare the knowledge base, and then you can begin performing complete Chapter 15 analyses or individual function calls. You can also connect AI assistants to the server for automated reasoning and documentation retrieval.
Identify vertical alignment class range for a segment in Chapter 15 two-lane highway analysis.
Calculate demand flow rates and capacity for a highway segment.
Determine vertical alignment classification for a segment.
Calculate free flow speed for a segment.
Estimate average travel speed across segments.
Estimate percentage of following vehicles.
Determine follower density for passing lanes (PL).
Determine follower density for PC/PZ segments.
Calculate segment Level of Service.
Calculate facility Level of Service.
Run the complete HCM Chapter 15 procedure.
Query HCM documentation database.