ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 4/5

OpenClaw Minecraft

Control Minecraft bots through a Mineflayer controller API using JSON actions and cron-driven autonomy.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/ene5135/openclaw-minecraft
Or

What This Skill Does

The OpenClaw Minecraft skill provides a powerful interface to control Minecraft bots programmatically. It leverages the Mineflayer controller API, allowing users to send JSON actions to manage in-game bots. This skill is designed for creating autonomous agents that can interact with a Minecraft server, perform tasks, and respond to game events. The core functionality relies on the agent's local LLM reasoning to determine actions, which are then translated into JSON commands sent to the controller. This separation ensures that sensitive information like API keys remains with the agent and is not exposed to the controller.

Key features include bot creation, connection to Minecraft servers, state monitoring, and batch action execution. For autonomous behavior, the skill utilizes a cron-driven loop to continuously read bot state, decide on a series of safe actions, and submit them for execution. This allows for complex, automated in-game activities.

Installation

To install the OpenClaw Minecraft skill, use the following command:

clawhub install openclaw/skills/skills/ene5135/openclaw-minecraft

This command will download and set up the necessary components for the skill. Ensure you have clawhub installed and configured correctly.

Use Cases

  • Automated Mining Operations: Deploy bots to mine specific resources (e.g., diamonds, iron) autonomously. The agent can analyze the game state and direct bots to explore, mine, and return resources.
  • Building and Construction: Program bots to construct simple structures or assist in larger building projects by placing blocks according to a predefined plan.
  • Exploration and Mapping: Send bots to explore uncharted territories, revealing the game map and identifying points of interest.
  • Server Administration Assistance: Use bots to monitor server activity, perform routine checks, or even assist in managing in-game events.
  • AI-driven Minecraft Gameplay: Create unique gameplay experiences where an AI agent controls one or more bots to play Minecraft, adapt to situations, and achieve objectives.

Example Prompts

  1. "Create a new Minecraft bot named 'miner_bob' and connect it to the server at localhost:25565 with version 1.21.9. Ensure it starts mining iron ore in the nearby caves."
  2. "Have bot 'builder_alice' gather 64 stone blocks and then construct a small cobblestone hut at coordinates (100, 64, -50)."
  3. "Monitor bot 'explorer_charlie' and if it encounters any hostile mobs, have it retreat to coordinates (0, 70, 0) and report the encounter."

Tips & Limitations

  • Authentication: Be mindful of how you obtain and manage your MC_CONTROLLER_TOKEN. For security, avoid hardcoding it directly in prompts or easily accessible files. Use environment variables or secure storage mechanisms.
  • Open Registration: If open registration is enabled on the controller, agents can self-issue tokens. This is convenient but less secure. Use it only in trusted environments.
  • Action Batching: For autonomous loops, bundle 5 to 10 actions together in a single act-batch request to optimize performance and reduce API calls.
  • State Awareness: The agent's effectiveness depends heavily on its ability to interpret the bot's state. Ensure the state information provided is comprehensive enough for the LLM to make informed decisions.
  • Error Handling: Implement robust error handling for API requests and in-game events. The bot might disconnect, get stuck, or encounter unexpected situations.
  • Cron Job Configuration: Ensure the cron job is correctly set up to run every 30 seconds and points to the CRON_PROMPT.md file within the skill's directory. This is crucial for autonomous operation.
  • Bot Ownership: Always ensure you are controlling bots associated with your authenticated token. Unauthorized control can lead to issues.
  • Command Complexity: While the skill supports batching, extremely complex sequences of actions might require careful planning and testing to ensure desired outcomes.

Metadata

Author@ene5135
Stars2387
Views33
Updated2026-03-09
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-ene5135-openclaw-minecraft": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#minecraft#game-automation#bot-control#ai-agent
Safety Score: 4/5

Flags: network-access, external-api, code-execution