MCP server
Clearance numbers are exactly the kind of thing a language model will recall confidently and get wrong — the plausible answer (“five feet from the house”) is right in some jurisdictions, wrong in others, and depends on which manufacturer’s listing applies. This server gives an agent the real figures, reconciled, with the source sentence attached.
Setup
Clone the repository and point your client at the server. It runs over stdio and does the reconciliation in-process — no network call, no API key.
{
"mcpServers": {
"setbackcalc": {
"command": "npx",
"args": ["-y", "tsx", "/path/to/setbackcalc/mcp/server.ts"]
}
}
}Or run it directly to check it starts:
npm run mcpTools
check_generator_placement
Returns, for each face of the enclosure, the most restrictive of the manufacturer’s listed clearance, NFPA 37 and the local ordinance — plus every figure that was considered and beaten, each with its verbatim source quote. Optionally takes proposed distances in inches for a pass/fail check.
get_placement_schedule
The same reconciliation rendered as the formatted text schedule, ready to paste into a permit pack. Same parameters.
get_clearance_reference
The entire dataset with citations and an explicit coverage statement. Useful for an agent to check whether a manufacturer or jurisdiction is covered before it calculates, rather than discovering it afterwards.
What to tell your agent
Coverage is deliberately narrow: 3 manufacturer families and 4 jurisdictions. The tool descriptions say so, and a result with no jurisdiction applied carries an explicit incompleteness warning in advisories.
An agent should surface that warning rather than swallowing it. A confident-sounding clearance for an uncovered county is precisely the failure this server exists to prevent — and passing an unknown jurisdictionId returns an error naming the field, never a nearest-match guess.
Example
Asked “we’re putting a Generac in Leon County, Florida — how far from the kitchen window?”, an agent with this server answers 10 ft, cites FBC Residential §M1905.2.5, and can add that the manufacturer diagram and NFPA 37 both say 5 ft but are superseded here — and that 5 ft becomes available only if the CO-alarm conditions in the exception are met. Without the server, the confident answer is 5 ft, and the pad gets poured in the wrong place.
{
"familyId": "generac-air-cooled",
"fuel": "natural-gas",
"mounting": "ground",
"jurisdictionId": "leon-county-fl"
}The same engine is available over HTTP — see the JSON API documentation. Agent-readable overview at https://setbackcalc.vercel.app/llms.txt.