Connect to Minecraft World
minecraft_connectConnect a bot to a running Minecraft Java Edition world (server, LAN, or local) by providing host, port, and auth mode. Essential first step for controlling the bot with other Minecraft tools.
Instructions
Connects the bot to a running Minecraft Java Edition world (server, LAN world, or local server jar).
For TLauncher: TLauncher accounts are typically NOT Microsoft-authenticated, so use auth="offline" (this is also correct for cracked/offline-mode servers and singleplayer worlds opened via "Open to LAN"). Use auth="microsoft" only for a real Mojang/Microsoft account joining an online-mode server.
To connect to your own singleplayer world: open the world in Minecraft, press Escape -> "Open to LAN", note the port shown in chat, then call this tool with host="localhost" (or "127.0.0.1") and that port.
Must be called before any other minecraft_* tool.
Returns: { message: string } confirming connection and spawn position. Errors: connection refused, wrong port, version mismatch, or auth-mode mismatch (offline bot hitting an online-mode server, or vice versa).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auth | No | "offline" for TLauncher / cracked servers / LAN worlds (default). "microsoft" for a real Mojang account. | offline |
| host | Yes | Server address, e.g. "localhost" or an IP/domain | |
| port | No | Server port (default 25565) | |
| version | No | Minecraft protocol version, e.g. "1.20.4". Omit to auto-detect. | |
| username | Yes | Bot's in-game username (offline mode: any valid name) |