# MapSmith MCP server

> Performs deterministic GIS geoprocessing with verifiable provenance and automated analysis planning for spatial datasets.

- Repository: https://github.com/mapsmith-ai/MapSmith
- Page: https://hostedmcp.org/servers/mapsmith-ai/mapsmith
- Transport: stdio
- Stars: 2
- License: AGPL-3.0
- Latest version: 0.12.2

## Install

### Claude Code

```sh
claude mcp add mapsmith -- uvx mapsmith
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "mapsmith": {
      "command": "uvx",
      "args": [
        "mapsmith"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "mapsmith": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mapsmith"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"mapsmith","type":"stdio","command":"uvx","args":["mapsmith"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "mapsmith": {
      "command": "uvx",
      "args": [
        "mapsmith"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add mapsmith -- uvx mapsmith
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.mapsmith]
command = "uvx"
args = ["mapsmith"]
```

### Gemini CLI

```sh
gemini mcp add -s user mapsmith uvx -- mapsmith
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "mapsmith": {
      "command": "uvx",
      "args": [
        "mapsmith"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `MAPSMITH_DISCOVERY_LOG` | no | no |  |
| `MAPSMITH_WORKSPACE` | no | no | Confine all reads/writes to this directory (path jail + sandboxed SQL engine) |
| `MAPSMITH_WORKSPACE` | no | no | Confine all reads/writes to this directory (path jail + sandboxed SQL engine) |

## Tools (29)

- `describe_dataset`
- `buffer_layer`
- `clip_layer`
- `overlay_layers`
- `dissolve_layer`
- `nearest_join`
- `explode_layer`
- `measure_area`
- `merge_layers`
- `simplify_layer`
- `centroid_layer`
- `convert_format`
- `reproject_layer`
- `spatial_join`
- `run_sql`
- `zonal_statistics`
- `hillshade`
- `slope`
- `aspect`
- `flow_accumulation`
- `watershed`
- `preview_map`
- `validate_plan`
- `brief_plan`
- `execute_plan`
- `get_provenance`
- `list_operations`
- `run_operation`
- `server_info`

## FAQ

### How does MapSmith ensure the accuracy of its analysis?

MapSmith validates the analysis plan before execution and generates a lineage manifest containing input checksums, parameters, CRS decisions, and deterministic checks.

### What engines are used to execute GIS operations?

The operations are performed by GeoPandas, DuckDB Spatial, exactextract, and Whitebox Workflows.

### Can MapSmith handle conflicting georeferencing data?

MapSmith will refuse to answer if a file is georeferenced twice (e.g., via internal tags and a sidecar file) to prevent reporting incorrect numbers without a clear record.
