Skip to content

Configure Claude Desktop

Once Claude Desktop sees kartoza-mcp, it can call cluster_points exactly like any other tool — your model will reach for it whenever you ask spatial-density questions.

1. Find the config file

Platform Path
macOS ~/Library/Application Support/Claude/claude_desktop_config.json
Linux ~/.config/Claude/claude_desktop_config.json
Windows %APPDATA%\Claude\claude_desktop_config.json

2. Register the server

{
  "mcpServers": {
    "kartoza-mcp": {
      "command": "nix",
      "args": ["run", "github:kartoza/kartoza-mcp#run"]
    }
  }
}
{
  "mcpServers": {
    "kartoza-mcp": {
      "command": "/usr/local/bin/spatial-cluster"
    }
  }
}
{
  "mcpServers": {
    "kartoza-mcp": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "ghcr.io/kartoza/kartoza-mcp:latest"]
    }
  }
}

3. Restart Claude Desktop

Fully quit and relaunch — Claude Desktop only re-reads its config at startup.

4. Sanity check

Open a new conversation and ask:

"What MCP tools do you have available?"

You should see cluster_points from kartoza-mcp listed.

5. Use it

Try a prompt like:

"Here's a GeoJSON FeatureCollection of bee sightings — please cluster them with eps 2000 m and minPts 5, and explain what each cluster represents."

Claude will hand the GeoJSON to cluster_points and reason about the resulting circles.

Gemini CLI

The same server works under gemini:

gemini mcp add kartoza-mcp --command "nix run github:kartoza/kartoza-mcp#run"

Why a separate process?

MCP servers run as child processes communicating over stdio. That means the spatial heavy-lifting happens inside our highly-optimised Go binary, not inside your LLM client — keeping memory pressure low and latency predictable.