# Fence calculator

> How many posts, rails and boards does your fence take? Give it a length, a height and a gate, and take the count to the store.

Page: https://hauscraft.app/calculators/fence-calculator/

Run it through HausCraft's MCP server (https://hauscraft.app/mcp, streamable HTTP, no key): call `calculate` with

```json
{
  "calculator": "fence-calculator",
  "values": {
    "length": 48,
    "height": 72,
    "gate": 4
  }
}
```

A value left out is its start. It answers with every piece and its size, and a 3D view where the client shows one.

| Key | What | Takes | Start |
|---|---|---|---|
| `length` | Fence length | 4–120 ft | 48 |
| `height` | Height | 48 = 4 ft; 60 = 5 ft; 72 = 6 ft; 96 = 8 ft | 72 |
| `gate` | Gate | 0 = None; 3 = 3 ft wide; 4 = 4 ft wide; 5 = 5 ft wide | 4 |

## How it is worked out

- Posts stand at most 8 ft apart, evenly spaced along each stretch, with one at each end.
- Two rails run between the posts, one near the top and one near the bottom.
- Boards stand side by side, one every 6 in.
- A gate hangs between two of the fence’s posts, on two rails of its own with a brace across its back from corner to corner.
- A post’s length here is what shows above the ground. Add what you set in the ground, commonly a third of the post’s height.

We lay out and count the sizes you pick, close enough to plan a weekend and price the lumber. Span tables, your local code and, on a bigger job, an engineer settle what size each board has to be.

## Questions

**How many fence posts do I need?** One at each end and one every 8 ft or less between, with one each side of a gate. The list counts them.

**How many boards for a fence?** Two for every foot of fence, with 5½ in boards set 6 in on centre.

**How deep do the posts go?** Your ground and your frost line decide. The lengths here are what stands above the ground.

## The MCP server

https://hauscraft.app/mcp: streamable HTTP, open, no key. It answers with every piece and its size, or why it can't be built; nothing is stored, and nothing is sized structurally.

Tools: `guide`, `list_calculators`, `calculate`, `build`.

An owner's own properties are there too, once they sign in to HausCraft on a monthly plan and allow the client (OAuth, asked for the first time one is needed): `list_properties`, `new_property`, `show_property` (the property in 3D as it stands), and each of a property's tools, `get_buildings` first, taking its id. A change is kept, and shown in the editor as it is made.

Claude Code: `claude mcp add --transport http hauscraft https://hauscraft.app/mcp`. Claude, ChatGPT and other clients: add it as a remote (custom) connector at that address.
