minecraft-ai-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@minecraft-ai-mcp Find and mine diamond ore"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🎮 Minecraft MCP Server
An MCP (Model Context Protocol) server that allows AI agents to play Minecraft! Built with Mineflayer and the official MCP TypeScript SDK.
🚀 Features
Connection Management
Connect/disconnect to any Minecraft server
Support for offline and Microsoft authentication
Automatic version detection
Movement & Navigation
Pathfinding: Navigate to any coordinates using A* pathfinding
Follow players: Dynamically follow other players
Look at: Point the bot's view at specific coordinates
Jump: Make the bot jump
Block Interaction
Dig blocks: Break blocks at specific coordinates
Place blocks: Place blocks from inventory
Find blocks: Search for specific block types nearby
Activate blocks: Interact with chests, buttons, doors, etc.
Collect blocks: Navigate to and mine specific blocks
Inventory Management
View inventory: See all items in inventory
Equip items: Equip items to hand, off-hand, or armor slots
Drop items: Discard items from inventory
Crafting
Craft items: Automatically craft items with available recipes
Get recipes: Query available recipes for any item
Combat
Attack entities: Attack mobs or players
Stop attacking: Cease combat
Get nearby entities: List all entities within range
Chat & Communication
Send chat: Send public chat messages
Whisper: Send private messages to players
Get players: List all players on the server
Survival Features
Auto-eat: Automatic food consumption when hungry
Eat: Manually eat specific food items
Sleep: Find and sleep in nearby beds
Get status: Full status report (health, hunger, position, etc.)
Related MCP server: mcp-taskflow
📦 Installation
Quick Start (Recommended)
Run directly with npx - no installation required:
npx -y minecraft-ai-mcpGlobal Installation
npm install -g minecraft-ai-mcp
minecraft-ai-mcpFrom Source
# Clone the repository
git clone https://github.com/harjjotsinghh/minecraft-mcp.git
cd minecraft-mcp
# Install dependencies
npm install
# Build the project
npm run build
# Run the server
npm start🔧 Configuration
Claude Desktop Configuration
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"minecraft": {
"command": "npx",
"args": ["-y", "minecraft-ai-mcp"]
}
}
}Cursor Configuration
Add to your .cursor/mcp.json file:
{
"mcpServers": {
"minecraft": {
"command": "npx",
"args": ["-y", "minecraft-ai-mcp"]
}
}
}Alternative: Using Global Installation
If you installed globally, you can use the command directly:
{
"mcpServers": {
"minecraft": {
"command": "minecraft-ai-mcp"
}
}
}🎯 Available Tools
Tool | Description |
| Connect to a Minecraft server |
| Disconnect from the server |
| Get bot's current status |
| Navigate to coordinates |
| Follow a specific player |
| Stop all movement |
| Make the bot jump |
| Look at coordinates |
| Break a block |
| Place a block |
| Get info about a block |
| Find nearby blocks |
| View inventory contents |
| Equip an item |
| Drop items |
| Craft an item |
| Get crafting recipes |
| Attack an entity |
| Stop attacking |
| List nearby entities |
| Send chat message |
| Private message a player |
| List online players |
| Use held item |
| Eat food |
| Sleep in a bed |
| Wake up |
| Collect specific blocks |
| Interact with a block |
💡 Example Usage
Connecting to a Server
Connect to my local Minecraft server at localhost:25565 with username "AIBot"Mining Diamonds
Find diamond ore near me and navigate to collect itBuilding
Build a 3x3 cobblestone platform at my current positionCombat
Find and attack any zombies within 20 blocksCrafting
Craft a wooden pickaxe using the wood in my inventory🏗️ Development
# Run in development mode with auto-reload
npm run dev
# Build for production
npm run build
# Start the built server
npm start🔐 Authentication
Offline Mode (Default)
For servers with online-mode=false:
Connect with auth: "offline"Microsoft Account
For online servers (requires Microsoft account):
Connect with auth: "microsoft"Note: Microsoft authentication will open a browser window for login.
⚠️ Known Limitations
No GUI: The bot operates headlessly - no game window is displayed
Server Compatibility: Works best with vanilla Minecraft servers
Version Support: Supports Minecraft 1.8 through 1.21+
Single Bot: Currently supports one bot connection at a time
🤝 Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
📄 License
MIT License - feel free to use this in your own projects!
🙏 Credits
Mineflayer - The amazing Minecraft bot framework
PrismarineJS - For all the Minecraft tooling
Anthropic - For the MCP specification
Built with ❤️ by Harjot Singh Rana for the AI gaming revolution
Available Tools
29 toolsactivate_blockA
Activate/interact with a block (like opening a chest, pressing a button)
Inputs: x (required), y (required), z (required).
attack_entityC
Attack a nearby entity
Inputs: entityType (required).
collect_blockB
Navigate to and collect a specific block type
Inputs: blockName (required), count.
connectB
Connect the bot to a Minecraft server
Inputs: host (required), username (required), auth, port, +1 more.
craft_itemB
Craft an item using available materials
Inputs: itemName (required), count.
dig_blockA
Dig/break a block at specific coordinates
Inputs: x (required), y (required), z (required).
disconnectA
Disconnect the bot from the current server
Inputs: no named parameters.
drop_itemB
Drop items from inventory
Inputs: itemName (required), count.
eatB
Eat a specific food item
Inputs: foodName.
equip_itemB
Equip an item from inventory
Inputs: itemName (required), destination.
find_blocksA
Find blocks of a specific type near the bot
Inputs: blockName (required), count, maxDistance.
follow_playerC
Follow a specific player
Inputs: playerName (required), distance.
get_block_infoA
Get information about a block at specific coordinates
Inputs: x (required), y (required), z (required).
get_inventoryA
Get the current inventory contents
Inputs: no named parameters.
get_nearby_entitiesC
Get a list of nearby entities
Inputs: maxDistance.
get_playersA
Get a list of all players on the server
Inputs: no named parameters.
get_recipesA
Get available crafting recipes for an item
Inputs: itemName (required).
get_statusA
Get the current status of the bot including health, hunger, position, etc.
Inputs: no named parameters.
gotoA
Navigate the bot to specific coordinates using pathfinding
Inputs: x (required), y (required), z (required).
jumpB
Make the bot jump
Inputs: no named parameters.
look_atB
Make the bot look at specific coordinates
Inputs: x (required), y (required), z (required).
place_blockB
Place a block from inventory at specific coordinates
Inputs: x (required), y (required), z (required), blockName (required).
send_chatC
Send a chat message in the game
Inputs: message (required).
sleepA
Sleep in a nearby bed
Inputs: no named parameters.
stop_attackA
Stop attacking the current target
Inputs: no named parameters.
stop_movementA
Stop all movement and pathfinding
Inputs: no named parameters.
use_itemA
Use/activate the currently held item (right-click action)
Inputs: no named parameters.
wakeB
Wake up from sleeping
Inputs: no named parameters.
whisperA
Send a private message to a player
Inputs: message (required), playerName (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 29 tools
Most tools have distinct purposes with clear descriptions, though some overlap exists between actions like 'collect_block' (navigate+dig) and coordinates, and 'use_item' vs 'activate_block'. Overall, an agent can usually tell tools apart.
Tool names mostly follow a snake_case verb_noun pattern (e.g., get_inventory, place_block), but some are single-word verbs (connect, jump, eat, sleep, wake), creating a slight inconsistency. The pattern is still predictable and readable.
At 29 tools, the server exceeds the 25+ threshold and feels heavy for an agent to parse. While each tool serves a specific Minecraft action, the large number introduces unnecessary selection complexity.
The tool set covers core Minecraft operations: movement, combat, inventory, crafting, chat, and block interaction. Missing features include targeted combat or advanced inventory management, but these are minor gaps for a general-purpose bot.
Maintenance
Related MCP Connectors
An MCP server that integrates with Discord to provide AI-powered features.
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Official MCP server for Agentwork — delegate tasks to AI agents with human-in-the-loop
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to automatically discover, install, and learn to use new tools without manual configuration.69 npm19MIT
- AlicenseBqualityDmaintenanceA local MCP server that gives AI agents structured task planning, execution tracking, and guided research workflows.1610 npmMIT
- AlicenseAqualityCmaintenanceAn MCP server that empowers AI coding agents to work effectively with Minecraft mod development, providing static analysis of decompiled source code and runtime interaction with a running Minecraft instance.3168 npm18MIT
- AlicenseNot gradedqualityDmaintenanceA local MCP server that gives AI coding agents persistent memory and context across sessions.4 npmMIT