slabcalc-mcp
by andronaft
README.md
# slabcalc-mcp
Concrete calculator as an MCP server: how many cubic yards (or cubic metres) of concrete a slab, patio, driveway,
footing, Sonotube column, fence post hole, wall or set of steps takes with waste, the ready-mix order rounded up the
way plants load, and how many 80, 60 or 40 lb (or 25, 30 kg) bags of concrete mix. Also the rebar grid for a slab
(bars each way, 20 ft sticks to buy, laps, weight) and a feet-inch-fraction tape calculator. Five read-only tools, no
sign-in, nothing stored.
It is the calculator of the **[SlabCalc](https://zhukovskyi.space/apps/slabcalc/)** app by Dre Dev, ported from
Dart to Python and checked against the app's own test values. The same calculator runs in the browser:
[concrete slab calculator](https://zhukovskyi.space/calculators/concrete/concrete-slab-calculator.html).
- App: [zhukovskyi.space/apps/slabcalc](https://zhukovskyi.space/apps/slabcalc/)
- Server: `https://mcp.zhukovskyi.space/slabcalc/mcp` (streamable HTTP)
## Tools
| Tool | Gives |
|---|---|
| `estimate_concrete_slab` | Volume of a rectangular, L/T-shaped (up to 6 rectangles), round or known-area slab, with an optional thickened (turned-down) edge and waste %; ready-mix order to the ¼ yd³ / 0.25 m³; bags of each size, their weight and mixer batches; how much more a slab ½ in (1 cm) thicker takes |
| `estimate_concrete_footing_column_post` | The same answer for strip footings, square pads, round columns (form tubes, piers), square columns, fence or deck post holes (with bags per hole) and walls (with 4×8 plywood sheets for the forms) |
| `estimate_concrete_stairs` | Concrete for solid steps on grade, with an optional landing on top |
| `estimate_rebar_grid` | Bars along and across a slab at a spacing with edge cover, sticks to buy (10/20/40 ft or 6/12 m) with lap splices, total length and weight (ASTM A615 #3–#8, EN 10080 Ø8–Ø16, CSA 10M–20M), a cut list, and the grid at 12/16/18/24 in (15–30 cm) to compare |
| `calculate_tape_measure` | Adds and subtracts tape readings (12' 6 1/2", 12'-6½", 150", 5/8"), multiplies or divides by a count; total to the nearest ⅛ (or 1/16) in, in decimal feet, inches, metres and cm |
Imperial (feet, inches, yd³, lb) or metric (m, cm, m³, kg) on every tool. Field names carry the unit:
`length_ft_or_m`, `thickness_in_or_cm`. All tools: `readOnlyHint: true`, `destructiveHint: false`,
`openWorldHint: false`.
## Connect
**Claude (claude.ai, Desktop), ChatGPT (developer mode), Cursor, VS Code** — add a remote MCP server with the URL
`https://mcp.zhukovskyi.space/slabcalc/mcp`, no authentication.
**Local (stdio):**
```bash
git clone https://github.com/andronaft/slabcalc-mcp && cd slabcalc-mcp
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
```
```json
{ "mcpServers": { "slabcalc": { "command": "/path/to/slabcalc-mcp/.venv/bin/python",
"args": ["/path/to/slabcalc-mcp/server.py", "--stdio"] } } }
```
Ask, for example: *"How many yards of concrete and how many 80 lb bags for a 24 × 24 ft garage slab, 4 inches, with
a 12 × 12 in thickened edge?"* or *"Rebar for a 20 × 12 ft patio, #4 at 16 inches on centre: how many 20 ft sticks?"*
## Method
- Volume = area × thickness × (1 + waste %), the app's default waste 10 % (walls 5 %). Thickened edge: the band
just inside the outline, only the depth below the slab counted, corners once. Round columns π × d² ÷ 4 × h. Steps:
V = width × rise × (run × n(n−1)/2 + top × n), top = landing depth when given. Post holes (Quikrete 1101 method):
hole filled around the post with 6 in of concrete under it, so the post displaces concrete only above that base.
- Ready-mix rounds up to ¼ yd³ (US) or 0.25 m³. Under 1 yd³ (0.76 m³) the answer leads with bags.
- Bag yields: QUIKRETE Concrete Mix 1101 data sheet, 0.60 / 0.45 / 0.30 ft³ for 80 / 60 / 40 lb (45 × 80 lb bags
= 1 yd³); SAKRET Premium-Beton 25 kg at 11.5 L (lower bound, so the count errs high); SAKRETE Concrete Mix
30 kg at 14 L. Your own bag can be given by weight and yield from its label. Mixer batches assume 2 bags a batch.
- Rebar: bars per direction = ceil((span − 2 × cover) ÷ spacing) + 1, so no gap exceeds the spacing. Bars longer
than a stick are lapped (default 40 bar diameters, a rule of thumb: #4 → 20 in; the engineer's figure wins); short
bars are cut several to a stick. Weights from ASTM A615 Table 1 (#4 0.668 lb/ft), EN 10080 (7850 kg/m³ × area)
and CSA G30.18 (20M 2.355 kg/m).
- Tape: worked left to right like a construction calculator, rounded to the nearest ⅛ in as the app does.
- Checked against the app's own tests (`test/calc_test.dart`): 10 × 10 ft × 4 in = 1.23 yd³; 1 yd³ = 45 × 80 lb;
1 m³ = 87 × 25 kg; a 6 × 4 m slab at 10 cm with 10 % orders 2.75 m³ or 230 × 25 kg; 20 × 12 ft, #4 at 16 in,
3 in cover → 10 + 16 bars, 26 sticks of 20 ft; a 40 × 4 ft wall → 10 plywood sheets;
12' 6½" + 4' 3¾" − 8⅜" × 3 = 48' 5⅝". See `tests/test_server.py`.
- Not here: the app's ready-mix cost with delivery and short-load fees, welded wire mesh, edge forms, the gravel base
and the pour sheet.
These are estimates for ordering, not an engineered design: the ready-mix plant, your engineer and the local code
decide the mix, thickness, reinforcement and joints. Measure the forms, not the plan: subgrade is rarely flat.
## Run and test
```bash
pip install -r requirements.txt
python server.py # http://127.0.0.1:8000/mcp
python server.py --stdio
python -m unittest discover tests # 15 tests
```
Hosted with the other Dre Dev MCP servers in one process; `build_app()` is mounted at `/slabcalc`.
## Licence
MIT for the code. Bag yields and bar weights: the manufacturers' data sheets and standards named above. Made by
Andrii Zhukovskyi ([Dre Dev](https://zhukovskyi.space/)).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues