Skip to main content
Glama

Connect to Minecraft World

minecraft_connect

Connect 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

TableJSON Schema
NameRequiredDescriptionDefault
authNo"offline" for TLauncher / cracked servers / LAN worlds (default). "microsoft" for a real Mojang account.offline
hostYesServer address, e.g. "localhost" or an IP/domain
portNoServer port (default 25565)
versionNoMinecraft protocol version, e.g. "1.20.4". Omit to auto-detect.
usernameYesBot's in-game username (offline mode: any valid name)
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses behavioral details beyond annotations: it must precede all other minecraft_* tools, returns a confirmation message with spawn position, and lists specific error conditions (connection refused, wrong port, version mismatch, auth-mode mismatch). It also explains the consequence of choosing the wrong auth mode, which is not encoded in the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core operation, followed by practical auth and LAN instructions, then a succinct return/error summary. Every sentence adds a distinct piece of information; the length is justified by the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has no output schema, but the description covers return values and common error cases. Given the complexity of authentication modes and prerequisite ordering, the description provides all necessary context for an agent to use this tool correctly and distinguish it from the many sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds contextual meaning: it maps auth='offline' to TLauncher/cracked/LAN servers and auth='microsoft' to online-mode servers, explains how to obtain host and port from a LAN world ('host="localhost"'), and notes port is shown in chat. It also clarifies that version can be omitted for auto-detection.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Connects the bot to a running Minecraft Java Edition world' and enumerates specific connection targets (server, LAN world, local server jar). This clearly differentiates it from sibling tools like minecraft_disconnect and minecraft_status, which serve different functions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states 'Must be called before any other minecraft_* tool', providing a clear prerequisite. It also gives conditional guidance on auth mode ('Use auth="offline"' for TLauncher/cracked/LAN, 'auth="microsoft"' for real accounts) and step-by-step instructions for connecting to a singleplayer world via Open to LAN.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/AhmadTariq1337/minecraft-mcp-server'

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