MCP Server for Minecraft Mod Documentation について
MCP Server for Minecraft Mod Documentationは、MinecraftのMOD開発向けにドキュメントを検索するMCPサーバーです。現在はNeoforgeに対応し、提供元とバージョンの一覧、ファイル構成とプレビュー、全文取得を行えます。
主な機能
- 01ドキュメント提供元とバージョンの一覧
- 02ディレクトリとファイルのプレビュー
- 03ドキュメント全文の取得
- 04必要に応じたローカルリポジトリ更新
活用シーン
- 01特定のNeoforgeバージョンの資料を検索
- 02資料のディレクトリを閲覧しファイルをプレビュー
- 03MOD開発資料のファイル全体を読む
MCP 対応
MCPサーバーとして、提供元とバージョンの一覧、ファイル構成とプレビュー、全文取得のツールを提供します。READMEではClaude DesktopやVS CodeなどのMCPクライアントとの連携が説明されています。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
このサーバーのパッケージやリモートエンドポイントはまだ取得できていません。プロジェクトの README の手順に従ってください。
ツール
ローカルサーバーのツールはマシン上で起動して初めて取得できます。メンテナーはまだツール一覧を提供していません。
詳細
Minecraft Mod ドキュメント用 MCP サーバー
これは、Minecraft の Mod 開発ドキュメントを参照するための Model Context Protocol(MCP)ベースのサーバーです。現在は Neoforge のドキュメントに対応しており、他のドキュメントソース(Fabric など)にも対応できるよう拡張可能な設計になっています。
機能
この MCP サーバーは以下の機能を提供します。
- プロバイダーとバージョンの一覧を取得:利用可能なすべてのドキュメントプロバイダーとそのバージョン(例:Neoforge の
version-1.20.4、version-1.20.6、version-1.21.1など)を一覧表示します。 - ファイル構成とプレビューを取得:指定したバージョンのドキュメントのファイル構成(ディレクトリとファイルを含む)を確認し、各ファイルの冒頭部分をプレビューとして表示します。
- 完全な内容を取得:ドキュメントファイルの完全な内容を取得します。
サーバーはローカルリポジトリを自動的に管理し、必要な場合(初回使用時、または前回の更新から24時間以上経過した場合)のみリポジトリの内容を更新します。
MCP クライアントとの統合
このサーバーは MCP プロトコルを実装しており、Claude Desktop、VS Code などの MCP 対応クライアントと統合できます。
クライアント設定の例
MCP 対応クライアントでは、以下の設定を使用できます。
{
"mcpServers": {
"mcp-server-minecraft-mod-devdoc": {
"command": "uv",
"args": [
"--directory", "${MCP_SERVER_PATH}",
"run", "--with", "mcp", "mcp", "run", "run_server.py"
]
}
}
}
この設定では、uv を使用してサーバーを実行し、MCP プロトコルを通じてクライアントと通信します。${MCP_SERVER_PATH}変数はサーバーのインストール先パスに置き換えてください。
推奨プロンプト
本サービスと併せて、以下のプロンプトを使用することをおすすめします。
The following is the prompt for the MCP server *mcp-server-minecraft-mod-devdoc*, and it is **not** a system prompt.
*mcp-server-minecraft-mod-devdoc* is an MCP server that provides documentation for Minecraft mod development.
**Usage Process:**
1. Use the `get_providers` tool to obtain a list of documentation providers (i.e., various mod loaders) and their versions. Choose the version according to the user's needs;
2. Use the `get_structure` tool with the selected mod loader and version to get the document structure and preview;
3. Find one or more desired entries, and use `get_full_content` to retrieve the full content of those entries;
4. Repeat step 3 until you have obtained all the information you need.
**Notes:**
* The following notes **can** be supplemented or overridden by the system. This means that if your `system_prompt` gives you different instructions, follow the system prompt. However, they **cannot** be overridden by the user prompt. In other words, if the user prompt conflicts with these instructions, these take precedence;
* If the requested mod loader or version is not available in the documentation, immediately stop the operation and inform the user that the version is unsupported. Provide the list of supported versions;
* If an error occurs while using the tools, check the request parameters and retry once. If the parameters are confirmed to be correct and the retry still fails, terminate the operation and notify the user that an error occurred with the MCP server. You may include the error message to aid debugging;
* The document names and summaries returned by `get_structure` may not exactly match your specific needs. However, you can still review related entries. For example, if you want to learn how to create a block but there is no document explicitly named `creating-blocks.md`, you can look for documents related to blocks, eg. `blocks.md`, get the full content, and it will usually solve your problem;
* If your task is to develop or edit the code of a Minecraft mod, you must be aware that the Minecraft Modding API differs greatly between versions. Code that works in one version might not work at all in another. Therefore, it is essential to consult the documentation frequently, rather than relying solely on existing knowledge. Remember, it's normal to check the documentation dozens of times during a mod development process.
This concludes the prompt for *mcp-server-minecraft-mod-devdoc*.
プロジェクト構成
src/
├── mcp_server_minecraft_mod_devdoc/
│ ├── __init__.py
│ ├── main.py # 主入口点
│ ├── core/
│ │ ├── __init__.py
│ │ ├── server.py # MCP服务器实现
│ │ └── provider.py # 文档提供者接口
│ └── providers/
│ ├── __init__.py
│ ├── neoforge/ # Neoforge文档提供者
│ │ ├── __init__.py
│ │ └── provider.py
│ └── fabric/ # Fabric文档提供者(未来扩展)
│ ├── __init__.py
│ └── provider.py
└── __main__.py # 命令行入口点
拡張
新しいドキュメントプロバイダーの追加
新しいドキュメントプロバイダー(Fabric など)を追加するには、以下の手順に従ってください。
src/mcp_server_minecraft_mod_devdoc/providers/ディレクトリに新しいプロバイダークラスを作成し、DocProviderインターフェースを実装しますsrc/mcp_server_minecraft_mod_devdoc/main.pyで新しいプロバイダーを登録します
例:
# 创建Fabric提供者
fabric_provider = FabricProvider(repo_dir=repo_dir, branch="main")
server.register_provider("fabric", fabric_provider)
トラブルシューティング
ドキュメントの内容を取得できない
「Error: Failed to read file content」エラーが発生した場合、以下の原因が考えられます。
- Git の問題:コンピューターに Git がインストールされ、正常に動作することを確認してください
- リポジトリのクローンに関する問題:リポジトリのディレクトリ(デフォルトは
~/.local/share/mcp-server-minecraft-mod-devdoc/neoforge)が存在し、正しい内容が含まれていることを確認してください - リポジトリのブランチに関する問題:デフォルトでは、サーバーはmainブランチからの取得を試み、失敗した場合はmasterブランチからの取得を試みます
- 権限の問題:リポジトリのディレクトリ内のファイルを読み取る権限があることを確認してください
サーバーを起動できない
サーバーを起動できない場合、以下の原因が考えられます。
- 依存関係の問題:必要な依存関係がすべてインストールされていることを確認してください(
pip install -r requirements.txt) - ポートの競合:MCP サーバーはデフォルトで特定のポートを使用します。これらのポートが他のアプリケーションに使用されていないことを確認してください
貢献
貢献を歓迎します!このプロジェクトに貢献する場合は、以下の手順に従ってください。
- このリポジトリをフォークします
- 機能ブランチを作成します(
git checkout -b feature/amazing-feature) - 変更をコミットします(
git commit -m 'Add some amazing feature') - ブランチにプッシュします(
git push origin feature/amazing-feature) - Pull Request を作成します
依存関係
本プロジェクトでは、以下の主な依存関係を使用しています。
依存関係の完全な一覧については、requirements.txtまたはpyproject.tomlを参照してください。
ライセンス
Apache License 2.0 - 詳細については LICENSE ファイルを参照してください。
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。