Skip to main content
Glama

Minecraft MCP-Server


[!IMPORTANT] Unterstützt derzeit die Minecraft-Version 1.21.11. Neuere Versionen funktionieren möglicherweise nicht mit diesem MCP-Server, aber wir werden den Support so schnell wie möglich hinzufügen.

https://github.com/user-attachments/assets/6f17f329-3991-4bc7-badd-7cde9aacb92f

Ein Minecraft-Bot, der von großen Sprachmodellen und der Mineflayer-API angetrieben wird. Dieser Bot nutzt das Model Context Protocol (MCP), damit Claude und andere unterstützte Modelle einen Minecraft-Charakter steuern können.

Voraussetzungen

  • Git

  • Node.js (>= 20.10.0)

  • Ein laufendes Minecraft-Spiel (das unten beschriebene Setup wurde mit der Minecraft 1.21.8 Java Edition getestet, die im Microsoft Game Pass enthalten ist)

  • Ein MCP-kompatibler Client. Claude Desktop wird als Beispiel verwendet, aber andere MCP-Clients werden ebenfalls unterstützt.

Related MCP server: ainpcengine

Erste Schritte

Dieser Bot ist für die Verwendung mit Claude Desktop über das Model Context Protocol (MCP) konzipiert.

Minecraft ausführen

Erstelle eine Einzelspieler-Welt und öffne sie für LAN (ESC -> Im LAN öffnen). Der Bot versucht, sich über den Port 25565 und den Hostnamen localhost zu verbinden. Diese Parameter können im nächsten Schritt in der claude_desktop_config.json konfiguriert werden.

MCP-Konfiguration

Stelle sicher, dass Claude Desktop installiert ist. Öffne File -> Settings -> Developer -> Edit Config. Dies sollte das Installationsverzeichnis öffnen. Suche die Datei mit dem Namen claude_desktop_config.json und füge den folgenden Code ein:

{
  "mcpServers": {
    "minecraft": {
      "command": "npx",
      "args": [
        "-y",
        "github:yuniko-software/minecraft-mcp-server",
        "--host",
        "localhost",
        "--port",
        "25565",
        "--username",
        "ClaudeBot"
      ]
    }
  }
}

Überprüfe noch einmal, ob die richtigen --port- und --host-Parameter verwendet wurden. Stelle sicher, dass die Claude Desktop-Anwendung vollständig neu gestartet wird (sie sollte im System-Tray geschlossen werden).

Ausführung

Stelle sicher, dass das Minecraft-Spiel läuft und die Welt für LAN geöffnet ist. Starte dann die Claude Desktop-Anwendung, und der Bot sollte dem Spiel beitreten.

Es kann einige Zeit dauern, bis Claude Desktop den MCP-Server gestartet hat. Das Zeichen dafür, dass der Server erfolgreich gestartet wurde:

Du kannst dem Bot über jeden aktiven Claude Desktop-Chat Befehle geben. Du kannst auch Bilder von Gebäuden hochladen und den Bot bitten, diese zu bauen 😁

Vergiss nicht, in deinem Prompt zu erwähnen, dass der Bot etwas in Minecraft tun soll. Denn dies ist der Auslöser, um den MCP-Server zu starten. Er wird dich um deine Erlaubnis bitten.

Die Verwendung von Claude Sonnet kann zu interessanten Ergebnissen führen. Der Bot-Agent wird wirklich intelligent sein 🫡

Beispiel für die Verwendung: geteilter Claude-Chat

Verfügbare Befehle

Sobald Claude mit einem Minecraft-Server verbunden ist, kann er diese Befehle verwenden:

Bewegung

  • get-position - Aktuelle Position des Bots abrufen

  • move-to-position - Zu bestimmten Koordinaten bewegen

  • look-at - Den Bot dazu bringen, auf bestimmte Koordinaten zu schauen

  • jump - Den Bot springen lassen

  • move-in-direction - Für eine bestimmte Dauer in eine bestimmte Richtung bewegen

Flug

  • fly-to - Den Bot direkt zu bestimmten Koordinaten fliegen lassen

Inventar

  • list-inventory - Alle Gegenstände im Inventar des Bots auflisten

  • find-item - Einen bestimmten Gegenstand im Inventar finden

  • equip-item - Einen bestimmten Gegenstand ausrüsten

Block-Interaktion

  • place-block - Einen Block an den angegebenen Koordinaten platzieren

  • dig-block - Einen Block an den angegebenen Koordinaten abbauen

  • get-block-info - Informationen über einen Block abrufen

  • find-blocks - Einen oder mehrere Blöcke eines bestimmten Typs in der Nähe finden

Ofen

  • smelt-item - Gegenstände mit einem ofenartigen Block schmelzen

Entitäts-Interaktion

  • find-entity - Die nächste Entität eines bestimmten Typs finden

Kommunikation

  • send-chat - Eine Chat-Nachricht im Spiel senden

  • read-chat - Aktuelle Chat-Nachrichten von Spielern abrufen

Spielstatus

  • detect-gamemode - Den Spielmodus im Spiel erkennen

Mitwirken

Fühle dich frei, Pull Requests einzureichen oder Issues für Verbesserungen zu öffnen. Alle Refactoring-Commits, funktionale und Test-Beiträge, Issues und Diskussionen sind sehr willkommen!

Um mit dem Mitwirken zu beginnen, lies bitte CONTRIBUTING.md.


⭐ Wenn du dieses Projekt nützlich findest, gib ihm bitte einen Stern auf GitHub! ⭐

Deine Unterstützung hilft dabei, dieses Projekt für andere Leute sichtbarer zu machen, die davon profitieren könnten.

Available Tools

22 tools
can-craftA

Check if the bot can craft a specific item with current inventory

Inputs: itemName (required).

craft-itemC

Craft an item using a crafting recipe

Inputs: outputItem (required), amount.

detect-gamemodeB

Detect the gamemode on game

Inputs: no named parameters.

dig-blockB

Dig a block at the specified position

Inputs: x (required), y (required), z (required).

equip-itemC

Equip a specific item

Inputs: itemName (required), destination.

find-blocksA

Find one or more nearby blocks of a specific type

Inputs: blockType (required), maxDistance, count.

find-entityB

Find the nearest entity of a specific type

Inputs: type, maxDistance.

find-itemB

Find a specific item in the bot's inventory

Inputs: nameOrType (required).

fly-toC

Make the bot fly to a specific position

Inputs: x (required), y (required), z (required).

get-block-infoB

Get information about a block at the specified position

Inputs: x (required), y (required), z (required).

get-positionA

Get the current position of the bot

Inputs: no named parameters.

get-recipeB

Get detailed information about a specific recipe

Inputs: itemName (required).

jumpB

Make the bot jump

Inputs: no named parameters.

list-inventoryA

List all items in the bot's inventory

Inputs: no named parameters.

list-recipesA

List all available crafting recipes the bot can make with current inventory

Inputs: outputItem.

look-atB

Make the bot look at a specific position

Inputs: x (required), y (required), z (required).

move-in-directionB

Move the bot in a specific direction for a duration

Inputs: direction (required), duration.

move-to-positionC

Move the bot to a specific position

Inputs: x (required), y (required), z (required), range, +1 more.

place-blockB

Place a block at the specified position

Inputs: x (required), y (required), z (required), faceDirection.

read-chatB

Get recent chat messages from players

Inputs: count.

send-chatB

Send a chat message in-game

Inputs: message (required).

smelt-itemB

Smelt items using a furnace-like block

Inputs: x (required), y (required), z (required), inputItem (required), +5 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 22 tools

    Disambiguation5/5

    Each tool targets a distinct action or query, with clear boundaries between checking and performing (e.g., can-craft vs craft-item, list-recipes vs get-recipe). Movement tools are differentiated by mode (fly vs walk).

    Naming Consistency5/5

    All tools follow a consistent verb-noun pattern with hyphens, using imperative verbs like 'dig', 'place', 'find', 'list', 'craft'. No mixing of conventions or vague names.

    Tool Count5/5

    22 tools cover a broad range of Minecraft bot operations without being overwhelming. Each tool serves a distinct purpose, and the count aligns well with the domain's complexity.

    Completeness4/5

    Covers core workflows: movement, block manipulation, inventory management, crafting, smelting, chat, and entity detection. Missing actions like attacking or dropping items are minor gaps that don't severely hinder typical tasks.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that lets Claude control a Minecraft bot with 40+ actions including movement, combat, crafting, and inventory management. Built on Mineflayer, it supports Microsoft authentication, pathfinding, and auto-reconnect.
      3
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      MCP server for creating, managing, and interacting with AI-powered NPCs with persistent memory, supporting dialogue, game events, and persona generation for coding agents.
      49 npm
      1
      -
    • A
      license
      A
      quality
      D
      maintenance
      A local MCP server that lets AI assistants control a Minecraft player on a local Paper server, enabling movement, block breaking/placing, combat, inventory management, chat, and op-level commands like teleport, gamemode, and summoning.
      27
      MIT