Minecraft Command Execution MCP Server
Minecraftコマンド実行MCPサーバー
ClaudeがMasterControl APIを通じてMinecraftコマンドを実行し、タブ補完を取得できるようにするMCP(Model Context Protocol)サーバーです。
機能
このMCPサーバーは2つのツールを提供します:
1. execute_command
認証されたプレイヤーとして、任意のMinecraftコマンドをリモートで実行します。
プレイヤーはオンラインかつサーバーに接続している必要があります
コマンドが実行されると、プレイヤーはゲーム内で通知を受け取ります
コマンドの出力またはエラーメッセージを返します
ヘルプを取得するには: コマンドの末尾に「help」を付けます(例:「island help」、「island upgrade help」)
例:
execute_command("gamemode creative")
execute_command("island help") # Shows island command help
execute_command("island upgrade help") # Shows upgrade subcommand help
execute_command("island upgrade speed 5")2. tab_complete
部分的なコマンドに対してタブ補完の候補を取得します。
利用可能なコマンドやサブコマンドを探索
有効な引数やパラメータを検索
MinecraftでTabキーを押すのと全く同じように動作します
例:
tab_complete("gamemode ") # Returns: survival, creative, adventure, spectator
tab_complete("island ") # Returns: available island subcommandsRelated MCP server: MCP Minecraft Remote
前提条件
Python 3.10以上
uvパッケージマネージャー (インストールはこちら)コマンドAPIを備えた稼働中のMasterControlサーバー
Minecraftプレイヤー用の有効なAPIキー
インストール
リポジトリをクローン:
git clone https://github.com/<your-user>/minecraft-mcp-server.git
cd minecraft-mcp-server依存関係をインストール:
uv sync環境変数を設定:
cp .env.example .env設定を
.envに編集:
# Required: Your Midnight API key
MIDNIGHT_API_KEY=your-api-key-here
# Optional: MasterControl API URL (defaults to localhost:8080)
MIDNIGHT_API_URL=http://your-server:8080/api/v2使用方法
ローカルでのテスト
サーバーを直接実行してテストします:
uv run server.pystdio入力を待機しますが、これはMCPサーバーとして正常な動作です。Ctrl+Cで終了します。
Claude Codeとの統合
Claude Codeにサーバーを追加します(クローンしたリポジトリへの絶対パスを使用してください):
claude mcp add midnight \
--transport stdio \
--env MIDNIGHT_API_KEY=your-key-here \
--env MIDNIGHT_API_URL=http://localhost:8080/api/v2 \
-- uv --directory /absolute/path/to/minecraft-mcp-server run server.pyインストールの確認
Claude Codeでサーバーが実行されているか確認します:
/mcpmidnight がリストされ、ステータスが ✓ Connected と表示されるはずです。
会話例
コマンドの実行:
You: "Change my gamemode to creative"
Claude: [Uses execute_command("gamemode creative")]
✓ Command executed successfullyコマンドヘルプの取得:
You: "How do I use the island upgrade command?"
Claude: [Uses execute_command("island upgrade help")]
Shows the help output for island upgradeコマンドの探索:
You: "What island commands are available?"
Claude: [Uses tab_complete("island ")]
Lists: upgrade, create, delete, invite, members...設定
環境変数
変数 | 必須 | デフォルト | 説明 |
| はい | - | プレイヤーのAPIキー |
| いいえ |
| MasterControl APIのベースURL |
APIエンドポイント
POST /api/v2/command/execute— コマンドを実行POST /api/v2/command/tabComplete— タブ補完を取得
トラブルシューティング
「MIDNIGHT_API_KEY environment variable not set!」
.env ファイルを作成してください:
echo "MIDNIGHT_API_KEY=your-key-here" > .env「Failed to execute command」
以下を確認してください:
MasterControl APIが実行されていること
APIキーが正しいこと
プレイヤーがオンラインでサーバーに接続していること(プロキシの待機状態ではないこと)
セキュリティ
.envをコミットしないでください — APIキーが含まれています(.gitignoreで除外済みです)コマンドはプレイヤーの権限で実行されます
AIは、あなたがゲーム内で実行できるあらゆるコマンドを実行可能です
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables management of Minecraft servers through the MCSManager API. Supports executing server commands, checking player status, retrieving server information, and controlling game settings like weather.191MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to remotely control a Minecraft player, including navigation, mining, building, and interaction with the world and other players.MIT
- FlicenseNot gradedqualityBmaintenanceEnables natural language control of a Minecraft bot, allowing it to execute tasks like mining, exploring, and item management via AI-powered commands.1
- AlicenseAqualityBmaintenanceExposes Minecraft server commands via RCON as a tool, and optionally powers an in-game AI chat listener that answers player questions using Claude.2MIT
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/mattlack15/midnightsky-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server