Skip to main content
Glama

mc-mod-mcp

Minecraft MOD開発時にClaudeへ根拠に基づいた回答を提供するためのMCPサーバーです。

現在も活発なMOD開発シーンの2つの時代、1.8.9 (Forge/MCP, Java 8, HypixelスタイルのクライアントMOD) と 1.21.10+ (NeoForgeまたはFabric, Java 21, Mojangマッピング, Data Components) を対象としています。1.21.x向けには、linkieに対するライブマッピング検索や、linkieが最新リリースを取り込んでいない場合にpiston-metaから直接マッピングを取得する機能も備えています。

これがないと、Claudeは2つの時代を混同し、new ResourceLocation(...) (1.20.5で廃止) を幻視したり、アイテムがNBTではなくData Componentsを使用することを忘れたり、新しいsequence/yaw/pitchフィールドなしで ServerboundUseItemPacket を記述したりしがちです。これがあれば、モデルは名前を推測する代わりに参照すべき事実を得ることができます。

インストール

git clone https://github.com/ratph6/mc-mod-mcp
cd mc-mod-mcp
npm install
npm run build

次に、Claude Codeでビルドされたバイナリを指定します:

claude mcp add mc-mod node "$PWD/dist/index.js"

(または必要に応じて ~/.claude/config.json を手動で編集してください)。

使用方法

普通の英語で質問するだけです。Claudeがツールを選択します。実際に活用できる例をいくつか挙げます:

How do I send a useItem packet in 1.21.10 Fabric?

Translate this 1.8.9 snippet to 1.21+: Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("hi"))

Scaffold a NeoForge 1.21.10 mod main class for examplemod

Show me a @ModifyVariable mixin example

What's the Yarn name for LocalPlayer in 1.21.10?

ツール

名前

機能

mc_version_info

特定の時代のローダー、Java、マッピング、ビルドシステム、ドキュメントリンクの読み込み

mc_lookup_class

概念 (Block, Level, BlockEntity など) に対する1.8.9と1.21+の完全修飾クラス名の比較

mc_lookup_api

タスク (チャット送信, GUIを開く, ブロック登録 など) の標準的なスニペット

mc_translate

ある時代のシンボルから、もう一方の時代の同等品を提案

mc_event

「Xが発生したときに呼び出されるイベントは?」 — 1.8.9 + NeoForge + Fabricの回答を提供

mc_mixin

Mixinパターンカタログ (@Inject, @ModifyArg, @WrapOperation, @Accessor など) およびMixin設定JSON

mc_gotchas

時代特有の落とし穴 — Data Components、ResourceLocationファクトリ、mod bus vs game busなど。フィルタリング可能。

mc_gradle

時代とローダーに応じた build.gradle / settings.gradle / gradle.properties

mc_mappings_translate

Yarn ↔ Mojangクラス名の翻訳 (厳選)

mc_list_scaffolds

スキャフォールドテンプレートの列挙

mc_scaffold

ボイラープレートの生成 (MODメイン、アイテム/ブロック、コマンド、キーバインド、Mixin、ネットワークペイロードなど)

mc_docs

特定の時代のドキュメントリンク

mc_list_versions

ライブ: linkieが認識している全バージョン (名前空間ごと)

mc_mappings_search

ライブ: linkieのマッピングAPIに対する全文検索

mc_lookup_field

ライブ: linkieに対するフィールド名検索 (厳選されたテーブルはフィールドを追跡していません)

mc_mojang_mappings

piston-meta経由でMojangの client_mappings.txt を直接取得。26.1.xおよびlinkieが対応していないバージョンで使用。

最初の12個は厳選されたデータであり、高速で決定的、かつネットワークを使用しません。最後の4つは必要に応じてネットワークに接続します。

拡張

知識は src/knowledge.ts にフラットデータとして保持されています。CLASSES / METHODS / EVENTS / MIXIN_PATTERNS / GOTCHAS / YARN_TO_MOJANG / GRADLE_TEMPLATES にエントリを追加し、npm test を実行すれば完了です。スキャフォールドは同ファイル内のテンプレート関数であり、SCAFFOLD_KINDS を通じてリストされます。

src/
  index.ts          MCP server, tool definitions, stdio transport
  knowledge.ts      Curated data + scaffold templates
  linkie.ts         Live calls to linkie's mappings API
  mojang.ts         Live piston-meta + proguard parser
  smoke.test.ts     node:test smoke tests

注意点

Mojang/Yarn/Parchmentのマッピングファイル (数MB) は同梱していません。生の難読化名については、ライブツールまたは linkie を使用してください。コードがコンパイルできるかどうかではなく、APIの形状がその時代に適しているかどうかのみを判断します。翻訳は1.8.9と1.21.10を対象としています。中間バージョンでも通常は適用可能ですが、あくまで近似値として扱ってください。

Available Tools

16 tools
mc_docsDocumentation links for an eraC

Returns the most relevant doc/wiki links to consult for a given era.

Inputs: era (required).

mc_eventFind the event for a triggerA

Given a plain-English description of a trigger ('player joins', 'tick', 'right click block'), returns the event class name in 1.8.9, NeoForge 1.21+, and Fabric 1.21+. Also tells you whether the event lives on the mod bus or game bus (NeoForge distinction).

Inputs: trigger (required).

mc_gotchasEra-specific pitfalls and gotchasA

Returns a list of common mistakes, breaking changes, and surprising behaviors per era. Filter by topic ('mixin', 'nbt', 'packets', 'fabric', 'mappings', etc.). Use proactively when the user starts a non-trivial task in a specific area.

Inputs: era, topic.

mc_gradleGradle build files for a loaderB

Returns build.gradle, settings.gradle, and gradle.properties templates for a chosen era + loader combo. Pinned to current versions (NeoForge 21.10, Loom 1.10, Fabric API 0.131, Yarn 1.21.10+build.1, ForgeGradle 2.x for 1.8.9). Tell the user to bump to latest after copying.

Inputs: era (required), loader (required).

mc_list_scaffoldsList available scaffoldsA

Enumerate every scaffold template id and its description.

Inputs: no named parameters.

mc_list_versionsList every Minecraft version + namespace linkie carriesA

Live call to https://linkieapi.shedaniel.me/api/namespaces. Returns every mappings namespace (yarn, mojang, mojang_raw, quilt-mappings, mcp, legacy-yarn, feather, ...) and which Minecraft versions each one currently has. Use to confirm a version exists before searching it. By default filters to stable releases — pass includeUnstable=true to see snapshots, pre-releases, RCs.

Inputs: namespace, versionPrefix, includeUnstable, limit.

mc_lookup_apiLook up a common modding operationA

Given a task description like 'send chat message', 'open gui', 'register block', 'render hud', 'send useitem packet', returns the canonical snippet for both 1.8.9 and modern 1.21+. Searches BOTH the method/API table and the class-name table so partial class queries still surface useful info. Use when the user asks 'how do I X in ?'.

Inputs: task (required), loader.

mc_lookup_classLook up a Minecraft class across erasA

Given a class concept or partial name (e.g. 'Block', 'TileEntity', 'EntityPlayerMP', 'Level', 'BlockPos'), returns the fully-qualified name in 1.8.9 (Forge/MCP) and modern 1.21+ (Mojang) along with notes on path or rename differences. Always returns top approximate matches even when the query doesn't hit exactly.

Inputs: query (required).

mc_lookup_fieldFind a field in Minecraft mappings (live)A

Convenience wrapper over mc_mappings_search filtered to fields. The curated knowledge tables don't track fields at all, so this is the only way to ask 'what's the field name for X in ?'.

Inputs: query (required), namespace (required), version (required), limit.

mc_mappings_translateYarn ↔ Mojang class name translationA

Given a class name from either Yarn (Fabric) or Mojang official (NeoForge / modern Fabric) mappings, returns the equivalent. Useful when porting between Fabric on Yarn and NeoForge on Mojang, or when reading a wiki snippet that uses the other naming.

Inputs: name (required).

mc_mixinMixin pattern lookupA

Returns code examples for Mixin (Sponge/Fabric Mixin) patterns: @Inject HEAD/TAIL, @ModifyArg, @ModifyVariable, @Redirect, @WrapOperation, @Accessor, @Invoker, plus mixin config JSON skeletons for Fabric and NeoForge. Use when the user is wiring up a mixin and you need to remember the exact annotation shape.

Inputs: query.

mc_mojang_mappingsLook up Mojang official names directly from piston-metaA

Bypasses linkie and fetches Mojang's client_mappings.txt straight from piston-meta.mojang.com, parses the proguard format, and searches it. Use this for any version linkie can't load — most importantly the 26.1 lineage (26.1, 26.1.1, 26.1.2) which linkie advertises but 500s on. Also useful when you want to verify a name against Mojang directly. First call for a version downloads the mapping (multi-MB) and caches it in-process; subsequent calls are instant.

Inputs: version (required), query (required), type, limit.

mc_scaffoldGenerate boilerplate for a modding scenarioA

Emits a code snippet (or config file body) for a given scenario, era, and loader. Run mc_list_scaffolds first to see valid kind values. Loader is forced to 'forge' for 1.8.9.

Inputs: kind (required), era (required), loader (required), modId (required), +1 more.

mc_translateTranslate a Minecraft API symbol between erasA

Given a method or class name from one era, suggests the equivalent in the other era. Looks across both classes and method tasks. Useful when porting code between 1.8.9 and 1.21+.

Inputs: symbol (required), from (required).

mc_version_infoMinecraft modding era infoA

Returns version metadata (Java version, mappings flavor, loader options, build system, metadata file, doc links) for the chosen era. Use this when the user mentions a Minecraft version so you ground the rest of the answer.

Inputs: era (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 16 tools

    Disambiguation5/5

    Each tool targets a distinct aspect of modding (docs, events, gotchas, build scripts, scaffolding, mappings, etc.). Although there are similar-looking tools like mc_translate and mc_mappings_translate, their descriptions clearly differentiate between era-based and namespace-based translation. Overlaps are minimal and well-justified.

    Naming Consistency4/5

    All tools use the 'mc_' prefix consistently. Most names follow a descriptive noun or verb pattern (e.g., mc_list_scaffolds, mc_lookup_api). However, the pattern is not perfectly uniform, mixing noun_verb (mc_mappings_search) with verb_noun (mc_list_versions), and some are just nouns (mc_mixin). Still, the naming is clear and predictable overall.

    Tool Count5/5

    With 16 tools, the server's scope is well-scoped for a modding knowledge assistant. Each tool covers a distinct functional area without unnecessary bloat. The count feels appropriate for the domain, allowing both depth and breadth without overwhelming the user.

    Completeness4/5

    The tool set covers major modding tasks: version info, documentation, event handling, build scripts, scaffolding, mappings, mixins, and common pitfalls. Minor gaps exist (e.g., no dedicated tool for registry names or mod metadata), but these are often accessible via lookup or scaffold tools. Overall, the surface is quite complete for the server's purpose.

    Related MCP Connectors