MCP cover image
See in Github
2025-03-19

1

Github Watches

6

Github Forks

66

Github Stars

Minecraft MCP Integration

A Model Context Protocol (MCP) integration for Minecraft that enables AI assistants to interact with a Minecraft server. This integration allows AI models to observe and interact with the Minecraft world through a bot.

Screenshot

Prerequisites

  1. Minecraft Launcher
  2. Node.js 18 or higher
  3. Claude Desktop App
  4. Java 21.0.5 (recommended)

⚠️ Note: Currently only tested on macOS/Linux. Windows compatibility is not guaranteed.

Important Note

  1. Use the F3+P Shortcut: Press F3 + P together. This toggles the "Pause on Lost Focus" feature. Once turned off, you can switch to claude desktop and Minecraft will continue running without pausing.

Focus Settings

  1. Connection Issues on Claude Restart: If you restart Claude while the Minecraft server is running, you may experience MCP connection issues on the next claude launch due to lingering java process. See Troubleshooting: MCP Connection Failed for resolution steps.

Installation Steps

  1. Download and Setup Minecraft Server

    • Download Minecraft server v1.21 from mcversions.net/1.21
    • Install Java 21.0.5 if not already installed (other versions are untested)
    • Create a dedicated directory (e.g., ~/minecraft-server/)
    • Place the downloaded server.jar file in this directory
    • Note down the absolute path to your server.jar file
  2. Install and Configure MCP Integration

    Quick Install (Recommended):

    npx -y @smithery/cli install mcp-minecraft --client claude
    

    Follow the CLI prompts to complete the setup.

    Or Manual Setup:

    • Navigate to ~/Library/Application Support/Claude/claude_desktop_config.json
    • Add the MCP server configuration:
    {
      "mcpServers": {
        "mcp-minecraft": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-minecraft@latest",
            "--server-jar",
            "/absolute/path/to/minecraft-server/server.jar"
          ]
        }
      }
    }   
    

    ⚠️ Replace /absolute/path/to/minecraft-server/server.jar with your actual server.jar path

  3. Launch Claude Desktop

    • Start Claude Desktop after completing the configuration
  4. Connect to Server

    • Open Minecraft Launcher
    • Install and launch Minecraft Java Edition v1.21
    • Click "Play" and Select "Multiplayer"
    • Click "Add Server"
    • Enter server details:
      • Server Name: Minecraft Server
      • Server Address: localhost:25565
    • Click "Done"

Features

Resources

The integration exposes these MCP resources:

  • minecraft://bot/location - Current bot position in the world
  • minecraft://bot/status - Bot connection status

Tools

Available MCP tools:

  • chat - Send chat messages to the server
  • jump - Make the bot jump
  • moveForward - Make the bot move forward
  • moveBack - Make the bot move backward
  • turnLeft - Make the bot turn left
  • turnRight - Make the bot turn right
  • placeBlock - Place a block at specified coordinates
  • digBlock - Break a block at specified coordinates
  • getBlockInfo - Get information about a block at specified coordinates
  • selectSlot - Select a hotbar slot (0-8)
  • getInventory - Get contents of bot's inventory
  • equipItem - Equip an item by name to specified destination
  • getStatus - Get bot's current status (health, food, position, etc.)
  • getNearbyEntities - Get list of nearby entities within range
  • attack - Attack a nearby entity by name
  • useItem - Use/activate the currently held item
  • stopUsingItem - Stop using/deactivate the current item
  • lookAt - Make the bot look at specific coordinates
  • followPlayer - Follow a specific player
  • stopFollowing - Stop following current target
  • goToPosition - Navigate to specific coordinates

Technical Details

  • Server runs in offline mode for local development
  • Default memory allocation: 2GB
  • Default port: 25565
  • Bot username: MCPBot

Troubleshooting

Common Issues

  1. MCP Connection Failed

    • Look for lingering Java processes
    • Terminate them manually:
      • Windows: Use Task Manager (untested)
      • Mac/Linux:
        • Go to 'Activity Monitor' and 'Force Quit' java
    • Restart computer if process termination fails
    • Note: Latest version should auto-resolve these issues
  2. Server Won't Start

    • Verify Java is installed
    • Check server.jar path is correct
    • Ensure port 25565 is available
  3. Can't Connect to Server

    • Verify server is running (check logs)
    • Confirm you're using "localhost" as server address
    • Check firewall settings

Logs Location

  • Minecraft Server logs: Check the minecraft-server directory
  • Claude Desktop logs: ~/Library/Logs/Claude/mcp*.log

Contributing

Contributions, big or small, are welcome!

License

This project is licensed under the MIT License - see the LICENSE file for details.

相关推荐

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • Lists Tailwind CSS classes in monospaced font

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

    Reviews

    3 (1)
    Avatar
    user_cmn8cwAo
    2025-04-18

    MCP-Minecraft by arjunkmrm is an exceptional tool for any serious Minecraft modder. The integration and ease of use it brings to the table are unparalleled. The project, available on GitHub, showcases excellent documentation and continuous updates. Whether you're a beginner or a seasoned developer, you'll find this tool incredibly valuable for creating and managing mods. Highly recommended!