home / mcp / construction cost calculator mcp server
Provides item data and cost calculations from a public Google Sheet for estimating construction project costs.
Configuration
View docs{
"mcpServers": {
"abhigit-trimble-construct-cost-mcp": {
"command": "python",
"args": [
"server.py"
],
"env": {
"SHEET_GID": "0",
"GOOGLE_SHEET_ID": "1laH5l1FjwWC5HXLp8xkG1eolwScKHIlxB6PohBWQjh0",
"CACHE_TTL_SECONDS": "300",
"DEFAULT_LABOR_RATE": "75.0"
}
}
}
}You have a Python-based MCP server that exposes construction cost estimation tools using data drawn from a public Google Sheet. You can query items, filter by category, search by keyword, list all items, and calculate total project costs with quantities and a labor rate. This server runs locally and is designed to be connected by an MCP client to perform practical cost-estimation tasks for construction projects.
Connect to the MCP server using your MCP client. You will access five tools that are available from the server. You can: 1) list all items, 2) get details for a specific item by its code, 3) search items by a keyword, 4) filter items by category, and 5) calculate the total project cost by supplying item quantities and an optional labor rate. The data comes from a publicly accessible Google Sheet, so you can rely on up-to-date information without requiring authentication.
Practical usage patterns include: fetching the complete item catalog to understand what’s available, drilling into a particular item to see its specs, narrowing results by category such as concrete or finishes, and performing a cost estimate for a defined bill of quantities. When you run calculate_cost, you provide a list of items with their codes and quantities, and you can override the labor rate if needed. The server will return a total cost based on materials plus labor.
Prerequisites: Python 3.11+ and pip.
Step 1. Clone the repository.
cd construct_cost_calcStep 2. Create a virtual environment.
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activateStep 3. Install dependencies.
pip install -r requirements.txtStep 4. Run the MCP server.
python server.pyThe server reads settings from environment variables. You can customize the Google Sheet source and runtime behavior with the following variables.
GOOGLE_SHEET_ID: Google Sheet ID that contains the cost data. Default shown is 1laH5l1FjwWC5HXLp8xkG1eolwScKHIlxB6PohBWQjh0.
SHEET_GID: Sheet tab GID. Default is 0.
CACHE_TTL_SECONDS: Cache duration in seconds. Default is 300 (5 minutes).
DEFAULT_LABOR_RATE: Default labor rate in $/hour. Default is 75.0.
Retrieve a list of all construction items available in the data source.
Fetch detailed information for a specific item by its code.
Search items by a keyword or phrase to find matching items.
Filter items by a specified category to narrow results.
Compute the total project cost using item quantities and labor rate.