Generate 3D-printable topographic shadow boxes from real terrain data
npx claudepluginhub huslage/topo-shadow-boxGenerate 3D-printable topographic shadow boxes
An MCP (Model Context Protocol) server that generates 3D-printable topographic shadow boxes. Given a geographic area, it fetches real elevation data and OpenStreetMap features, then produces multi-material 3MF files ready for slicing and printing.
.scad, or SVG map insertDownload a prebuilt binary from GitHub Releases, or build from source with Go:
cd go
go build -o /usr/local/bin/topo-shadow-box ./cmd/topo-shadow-box
/plugin marketplace add huslage/topo-shadow-box
/plugin install topo-shadow-box@topo-shadow-box
The MCP server starts automatically when you install the plugin.
Add this to ~/.codex/config.toml:
[mcp_servers.topo-shadow-box]
command = "topo-shadow-box"
args = ["serve"]
Then restart Codex.
The first time Claude calls each tool, it will ask for permission. Click "Allow always" (not "Allow") so the approval is saved and you won't be asked again.
If you'd rather pre-approve everything upfront, add this to your ~/.claude/settings.json:
{
"permissions": {
"allow": ["mcp__plugin_topo-shadow-box_topo-shadow-box__*"]
}
}
The Go binary supports two modes:
topo-shadow-box serve starts the MCP server (Claude Code plugin mode).topo-shadow-box [flags] runs one-shot CLI generation and writes an output file.cd go
go build -o /usr/local/bin/topo-shadow-box ./cmd/topo-shadow-box
# Circle area -> 3MF
topo-shadow-box --lat 35.99 --lon -78.90 --radius 5000 --output durham.3mf
# Bounding box -> OpenSCAD
topo-shadow-box --north 36.1 --south 35.9 --east -78.8 --west -79.0 --output area.scad
# GPX track area -> SVG
topo-shadow-box --gpx /path/to/ride.gpx --output ride.svg
# Custom model options + subset of map features
topo-shadow-box \
--lat 35.99 --lon -78.90 --radius 5000 \
--output model.3mf \
--width 150 \
--vertical-scale 2.0 \
--base-height 8 \
--shape circle \
--resolution 250 \
--features roads,water \
--color-terrain "#8B7355" \
--color-water "#4A90D9"
| Flag | Default | Description |
|---|---|---|
--lat, --lon, --radius | — | Circular area input (radius in meters) |
--north, --south, --east, --west | — | Explicit bounding box input |
--gpx | — | GPX file path (uses GPX bounds + default padding) |
--output, -o | — | Output path; extension selects format (.3mf, .scad, .svg) |
--width | 200 | Model width in mm |
--vertical-scale | 1.5 | Elevation exaggeration multiplier |
--base-height | 10 | Solid base thickness in mm |
--shape | square | square, circle, hexagon, rectangle |
--resolution | 200 | Elevation grid resolution per axis |
--features | roads,water,buildings | CSV feature list; use empty string to skip features |
--color-terrain | #C8A882 | Terrain color |
--color-roads | #D4C5A9 | Roads color |
--color-water | #4682B4 | Water color |
--color-buildings | #E8D5B7 | Buildings color |
--color-gpx-track | #FF0000 | GPX track color |
--lat + --lon + --radius--north + --south + --east + --west--gpx--output is required.--shape must be one of square, circle, hexagon, rectangle.#RRGGBB.topo-shadow-box serve
error: --output is required
--output <path> (or -o <path>). The extension must be .3mf, .scad, or .svg.one of --lat/--lon/--radius, --north/--south/--east/--west, or --gpx is required
--lat/--lon/--radius ... are mutually exclusive (or bbox/GPX equivalent)
cannot infer output format from extension ...
.3mf, .scad, or .svg.invalid --shape ...
square, circle, hexagon, rectangle.Color format errors (must be in #RRGGBB format)
#, e.g. #C8A882.