Skip to main content
Glama
zeeweebee

Minecraft MCP Server

by zeeweebee

move-to-position

Teleport a Minecraft bot to specified coordinates with adjustable arrival precision. Use this tool to position characters at exact X, Y, Z locations for navigation, building, or exploration tasks.

Instructions

Move the bot to a specific position

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesX coordinate
yYesY coordinate
zYesZ coordinate
rangeNoHow close to get to the target (default: 1)

Implementation Reference

  • The handler function for the 'move-to-position' tool. It creates a pathfinder GoalNear to the specified (x,y,z) within the given range and executes bot.pathfinder.goto(goal).
    async ({ x, y, z, range = 1 }): Promise<McpResponse> => {
      try {
        const goal = new goals.GoalNear(x, y, z, range);
        await bot.pathfinder.goto(goal);
    
        return createResponse(`Successfully moved to position near (${x}, ${y}, ${z})`);
      } catch (error) {
        return createErrorResponse(error as Error);
      }
    }
  • Zod input schema for the 'move-to-position' tool parameters: x, y, z (required numbers), range (optional number).
    {
      x: z.number().describe("X coordinate"),
      y: z.number().describe("Y coordinate"),
      z: z.number().describe("Z coordinate"),
      range: z.number().optional().describe("How close to get to the target (default: 1)")
    },
  • src/bot.ts:174-193 (registration)
    Registration of the 'move-to-position' tool using McpServer.tool(), within the registerPositionTools function.
    server.tool(
      "move-to-position",
      "Move the bot to a specific position",
      {
        x: z.number().describe("X coordinate"),
        y: z.number().describe("Y coordinate"),
        z: z.number().describe("Z coordinate"),
        range: z.number().optional().describe("How close to get to the target (default: 1)")
      },
      async ({ x, y, z, range = 1 }): Promise<McpResponse> => {
        try {
          const goal = new goals.GoalNear(x, y, z, range);
          await bot.pathfinder.goto(goal);
    
          return createResponse(`Successfully moved to position near (${x}, ${y}, ${z})`);
        } catch (error) {
          return createErrorResponse(error as Error);
        }
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zeeweebee/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server