Skip to main content
Glama
mattlack15

Minecraft Command Execution MCP Server

by mattlack15

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 subcommands

Related MCP server: MCP Minecraft Remote

前提条件

  • Python 3.10以上

  • uv パッケージマネージャー (インストールはこちら)

  • コマンドAPIを備えた稼働中のMasterControlサーバー

  • Minecraftプレイヤー用の有効なAPIキー

インストール

  1. リポジトリをクローン:

git clone https://github.com/<your-user>/minecraft-mcp-server.git
cd minecraft-mcp-server
  1. 依存関係をインストール:

uv sync
  1. 環境変数を設定:

cp .env.example .env
  1. 設定を .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.py

stdio入力を待機しますが、これは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でサーバーが実行されているか確認します:

/mcp

midnight がリストされ、ステータスが ✓ 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...

設定

環境変数

変数

必須

デフォルト

説明

MIDNIGHT_API_KEY

はい

-

プレイヤーのAPIキー

MIDNIGHT_API_URL

いいえ

http://localhost:8080/api/v2

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」

以下を確認してください:

  1. MasterControl APIが実行されていること

  2. APIキーが正しいこと

  3. プレイヤーがオンラインでサーバーに接続していること(プロキシの待機状態ではないこと)

セキュリティ

  • .env をコミットしないでください — APIキーが含まれています(.gitignore で除外済みです)

  • コマンドはプレイヤーの権限で実行されます

  • AIは、あなたがゲーム内で実行できるあらゆるコマンドを実行可能です

Install Server
F
license - not found
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

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

View all MCP Connectors

Latest Blog Posts

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