README.md

June 4, 2026 ยท View on GitHub

Unity AI Terrain

MCP OpenUPM Unity Editor r
Discord Stars License Stand With Ukraine

Terrain

AI-powered tools for the Unity Terrain workflow. Create Terrain GameObjects backed by new TerrainData, set heightmap resolution and world size, sculpt and sample heights over a region or the whole terrain, manage TerrainLayers, paint texture layers onto the alphamap, configure detail and tree prototypes, scatter trees, stitch neighbor terrains, and modify any terrain component field directly through natural language commands โ€” no manual inspector navigation. Wraps Unity's built-in Terrain modules (com.unity.modules.terrain + com.unity.modules.terrainphysics). Ideal for rapid greyboxing, procedural landscape generation, and terrain authoring. Built on top of the AI Game Developer platform.

How to use

DOWNLOAD INSTALLER

Stability status

Unity VersionEditmodePlaymodeStandalone
2022.3.62f3rrr
2023.2.22f1rrr
6000.3.1f1rrr

AI Terrain Tools

16 tools, grouped by purpose:

Terrain lifecycle

  • terrain-create - Create a Terrain GameObject backed by a new TerrainData asset (heightmap resolution + size)
  • terrain-list - List all Terrains in the active scene (name, size, heightmap resolution, layer count)
  • terrain-get - Get a Terrain's data (size, resolutions, layers, prototypes, tree count, neighbors)

Shape & heightmap

  • terrain-set-heightmap-resolution - Set the heightmap resolution (rounded to a valid 2^n + 1)
  • terrain-set-size - Set the terrain world size (width / height / length)
  • terrain-set-heights - Set heightmap values over a region (or whole terrain): uniform fill or explicit 2D array
  • terrain-sample-heights - Read heightmap values over a region (or whole terrain) with min/max/average stats

Layers & painting

  • terrain-add-layer - Add a TerrainLayer (from an existing asset or a new layer built from a texture)
  • terrain-remove-layer - Remove a TerrainLayer by index
  • terrain-paint-layer - Paint a layer over a region by writing the alphamap (splatmap)

Detail, trees & tiling

  • terrain-set-detail-prototypes - Replace the detail prototypes (grass / detail meshes) from textures / prefabs
  • terrain-set-tree-prototypes - Replace the tree prototypes from prefabs
  • terrain-place-trees - Place trees: random scatter (count) or explicit normalized positions
  • terrain-set-neighbors - Set the left / top / right / bottom neighbor Terrains so Unity blends seams

Generic

  • terrain-get-component - Generic read: serialize a Terrain / TerrainCollider component via ReflectorNet
  • terrain-modify-component - Generic write: apply a SerializedMember diff to a terrain component via ReflectorNet (escape hatch for fields not covered by the dedicated tools)

Installation

Option 1 - Installer

  • Download Installer
  • Import installer into Unity project
    • You can double-click on the file - Unity will open it automatically
    • OR: Open Unity Editor first, then click on Assets/Import Package/Custom Package, and choose the file

Option 2 - OpenUPM-CLI

openupm add com.ivanmurzak.unity.mcp.terrain