Minecraft MCP

v1.1.1
io.github.lZiMUl/minecraft-mcp Checked 4 days ago Published 7 days ago

Simulated Minecraft worlds: read, write and fill blocks, manage entities and inventories.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

getBlock Get Block

Get the block at the given coordinates in the given dimension, including its properties (name, hardness, light level, etc.) and its block states (for example facing=south). Each dimension has its own persisted world state; unmodified coordinates return air (minecraft:air).

ParameterTypeDescription
x *integerX coordinate (-30000000 to 30000000)
y *integerY coordinate, within the dimension height range
z *integerZ coordinate (-30000000 to 30000000)
dimensionstringDimension: "overworld" (default), "the_nether" or "the_end"

setBlock Set Block

Place a block at the given coordinates in the given dimension and return the replaced block. Block states are supported: "minecraft:oak_stairs[facing=south,half=bottom]" or "oak_stairs[facing=south]". Each dimension has its own persisted world state; setting air removes the block. blockType is a block id such as "minecraft:stone" or "stone"; see the resource lzimul://minecraft/blocks for the full list.

ParameterTypeDescription
blockType *stringBlock id with optional states, such as "minecraft:stone" or "minecraft:oak_stairs[facing=south]"
x *integerX coordinate (-30000000 to 30000000)
y *integerY coordinate, within the dimension height range
z *integerZ coordinate (-30000000 to 30000000)
dimensionstringDimension: "overworld" (default), "the_nether" or "the_end"

getItem Get Item

Get the properties of a Minecraft item by id (stack size, durability, enchantment categories, etc.). See the resource lzimul://minecraft/items for the full list.

ParameterTypeDescription
item *stringItem id, such as "minecraft:diamond_sword" or "diamond_sword"

getDimension Get Dimension

Get metadata and live state for one simulated dimension: id, display name, height range, modified block count, entity count and player count. Dimensions are "overworld", "the_nether" and "the_end"; each has its own persisted world state.

ParameterTypeDescription
dimensionstringDimension: "overworld" (default), "the_nether" or "the_end"

getDimensionBlocks Get Dimension Blocks

List the placed (non-air) blocks of a dimension, sorted by coordinates. Results are paginated because a dimension can hold up to 250,000 modified blocks: use limit and offset to page through, and hasMore to continue. Unmodified coordinates are air and are not listed; use getBlock for a single coordinate. Each row contains x, y, z, block id, display name and block states.

ParameterTypeDescription
dimensionstringDimension: "overworld" (default), "the_nether" or "the_end"
limitintegerMaximum number of blocks to return (1-10000, default 1000)
offsetintegerNumber of blocks to skip, for pagination (default 0)

getBlocksInArea Get Blocks In Area

List placed (non-air) blocks inside an inclusive box in one dimension, sorted by x, y and z. Corners may be supplied in any order. An optional blockType filter matches the block id and, when states are supplied, the exact state map. Results are paginated with limit and offset. Unmodified coordinates are air and are not listed.

ParameterTypeDescription
from *object
to *object
blockTypestringOptional block filter, such as "minecraft:oak_stairs" or "oak_stairs[facing=south]"
dimensionstringDimension: "overworld" (default), "the_nether" or "the_end"
limitintegerMaximum number of matching blocks to return (1-10000, default 1000)
offsetintegerNumber of matching blocks to skip (default 0)

fillBlocks Fill Blocks

Fill an inclusive box in one dimension with one block type and optional states. Corners may be supplied in any order. By default only air coordinates are filled; set overwrite to true to replace existing blocks. Use "minecraft:air" with overwrite to clear a region. The maximum volume per request is 16,384 blocks.

ParameterTypeDescription
blockType *stringBlock id, such as "minecraft:stone" or "stone"; states are optional, for example "oak_stairs[facing=south]"
from *object
to *object
dimensionstringDimension: "overworld" (default), "the_nether" or "the_end"
overwritebooleanReplace existing non-air blocks when true; default false fills air only

getDimensionEntities Get Dimension Entities

List every entity and player in one dimension, sorted by UUID. Each row contains the entity UUID, kind, type, display name, name, position and dimension. Use getEntity or getInventory for one entity and its full inventory.

ParameterTypeDescription
dimensionstringDimension: "overworld" (default), "the_nether" or "the_end"

getDimensionRawFile Get Dimension Raw File

Return the raw JSON snapshot of one dimension, including its top-level blocks and entities arrays. The result is the on-disk JSON for file storage, or the equivalent serialized state for memory storage, and can be loaded directly by minecraft_world_viewer.html.

ParameterTypeDescription
dimensionstringDimension: "overworld" (default), "the_nether" or "the_end"

createEntity Create Entity

Create a non-player entity (mob, projectile, vehicle, etc.) in a dimension with an empty 9-slot hotbar and 27-slot backpack. Entity ids come from the generated registry; see the resource lzimul://minecraft/entities for the full list. Use createPlayer for players.

ParameterTypeDescription
type *stringEntity id, such as "minecraft:zombie" or "zombie"; see lzimul://minecraft/entities
x *integerX coordinate (-30000000 to 30000000)
y *integerY coordinate, within the dimension height range
z *integerZ coordinate (-30000000 to 30000000)
dimensionstringDimension: "overworld" (default), "the_nether" or "the_end"
namestringOptional display name; defaults to the entity type display name

getEntity Get Entity

Get an entity or player by UUID, including its type, position, dimension, creation time and full hotbar/backpack contents. Use getInventory or setInventory to change items.

ParameterTypeDescription
id *stringEntity UUID returned by createEntity or createPlayer

createPlayer Create Player

Create a uniquely named player in a dimension with an empty 9-slot hotbar and 27-slot backpack. Player names are case-insensitively unique across the whole world (all dimensions).

ParameterTypeDescription
name *stringUnique player name (letters, digits and underscores)
x *integerX coordinate (-30000000 to 30000000)
y *integerY coordinate, within the dimension height range
z *integerZ coordinate (-30000000 to 30000000)
dimensionstringDimension: "overworld" (default), "the_nether" or "the_end"

getPlayer Get Player

Get a player by name (case-insensitive), including position, dimension, creation time and full hotbar/backpack contents.

ParameterTypeDescription
name *stringUnique player name (letters, digits and underscores)

deleteEntity Delete Entity

Delete one entity or player by UUID or player name. The entity is removed from its dimension and its inventory is discarded. Player names become available again after deletion.

ParameterTypeDescription
target *stringEntity UUID or player name (player names are case-insensitive)

moveEntity Move Entity

Move one entity or player exactly one block in a fixed direction: forward (+Z, south), back (-Z, north), left (-X, west), right (+X, east), up (+Y) or down (-Y). The destination must stay inside the entity dimension.

ParameterTypeDescription
direction *stringOne-block direction: forward (+Z), back (-Z), left (-X), right (+X), up (+Y), down (-Y)
id *stringEntity UUID returned by createEntity or createPlayer

getEntityPosition Get Entity Position

Get the UUID, entity type, name and exact x/y/z position of one entity or player.

ParameterTypeDescription
id *stringEntity UUID returned by createEntity or createPlayer

setEntityPosition Set Entity Position

Set the exact x/y/z position of one entity or player. The position must stay inside the entity dimension.

ParameterTypeDescription
id *stringEntity UUID returned by createEntity or createPlayer
position *object

getInventory Get Inventory

Get the full inventory of an entity or player: the 9 hotbar slots and the 27 backpack slots, plus used-slot counts. Empty slots are null. The target is an entity UUID or a player name.

ParameterTypeDescription
target *stringEntity UUID or player name (player names are case-insensitive)

clearInventory Clear Inventory

Remove every item from the 9 hotbar slots and 27 backpack slots of one entity or player. The target is an entity UUID or a player name. The cleared slot count is returned.

ParameterTypeDescription
target *stringEntity UUID or player name (player names are case-insensitive)

swapInventorySlots Swap Inventory Slots

Swap two inventory slots of one entity or player. section is "hotbar" (slots 0-8) or "inventory" (backpack, slots 0-26). Both slots may be in the same or different sections. The target is an entity UUID or a player name.

ParameterTypeDescription
fromSection *string"hotbar" or "inventory" for the first slot
fromSlot *integerFirst slot index (hotbar 0-8, backpack 0-26)
target *stringEntity UUID or player name (player names are case-insensitive)
toSection *string"hotbar" or "inventory" for the second slot
toSlot *integerSecond slot index (hotbar 0-8, backpack 0-26)

setInventory Set Inventory

Set one inventory slot of an entity or player. section is "hotbar" (slots 0-8) or "inventory" (backpack, slots 0-26). The item is validated against the item registry and the count must fit the item stack size. Use "minecraft:air" or count 0 to clear a slot. The target is an entity UUID or a player name.

ParameterTypeDescription
item *stringItem id, such as "minecraft:diamond_sword" or "diamond_sword". Use "minecraft:air" or count 0 to clear the slot.
slot *integerSlot index within the section (hotbar 0-8, backpack 0-26)
target *stringEntity UUID or player name (player names are case-insensitive)
countintegerStack count (1 to the item stack size); 0 clears the slot
sectionstring"hotbar" for the 9 hotbar slots or "inventory" for the 27 backpack slots