Install¶
Pick one of the four paths below. All produce the same spatial-cluster
binary speaking MCP over stdio.
Option 1 — Nix (recommended)¶
The flake provisions Go, GEOS, pkg-config and the static toolchain deterministically. This is what CI uses.
git clone https://github.com/kartoza/kartoza-mcp.git
cd kartoza-mcp
nix develop # drops you into a shell with everything wired up
nix run .#build # produces ./spatial-cluster-static
You can also build for Linux explicitly:
Option 2 — go install¶
If you already have Go 1.25+ and GEOS on your PKG_CONFIG_PATH, you can pull
the latest tagged release straight into your GOBIN:
The binary is named spatial-cluster and runs on stdio out of the box.
Option 3 — Prebuilt static binary¶
Every GitHub release ships a static Linux binary built with musl. No shared
libraries needed.
curl -fsSL https://github.com/kartoza/kartoza-mcp/releases/latest/download/spatial-cluster-linux-amd64 \
-o spatial-cluster
chmod +x spatial-cluster
./spatial-cluster --help
See DevOps Deployment for distro-aware install patterns.
Option 4 — Container image¶
For Docker, Podman or Kubernetes deployments:
docker pull ghcr.io/kartoza/kartoza-mcp:latest
docker run --rm -i ghcr.io/kartoza/kartoza-mcp:latest < test.json
The image is FROM scratch plus the static binary — under 10 MB.
Verify the install¶
You should see a GeoJSON FeatureCollection printed to stdout. If you do —
you're ready for your first cluster.
GEOS at runtime
The static binary embeds GEOS — you do not need a system libgeos.
If you build dynamically (e.g. go build outside the flake) you'll need
GEOS available via pkg-config. See Developers
Project structure.