MCP

mmd-mcp: Drive MikuMikuDance on Windows via MCP for Authoring and MME Settings

mmd-mcp is best suited for programmatically driving MikuMikuDance on Windows for animation and MME effect settings — but only if you first start the Japanese-release MMD 9.32 x64 yourself and complete a source build that requires the Visual Studio C++ component.

Official source · mmd-mcp

Install

python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e .
cmd /c scripts\build_native.cmd

mmd-mcp is a Windows-oriented stdio MCP server for controlling authoring operations in MikuMikuDance (MMD) and MME effect settings. Its prerequisites are clear: you must be on Windows, must have already started MMD 9.32 x64 (the Japanese release yourself — the server rejects unsupported versions), and must be willing to build from source (requires Python x64 and the "Desktop development with C++" component of Visual Studio 2022/Build Tools). It does not auto-start MMD and does not listen on the network. If your environment doesn't meet these conditions, or you'd rather not touch a build toolchain, it isn't a good first choice.

Who It's For

  • People doing MMD animation work on Windows who need to programmatically adjust models, cameras, lighting, physics, and the timeline, or edit MME's EMM effect assignments and export AVI video.
  • The verified environment is the Japanese-release MMD 9.32 x64, Japanese Windows, and Python 3.10 x64; other MMD versions are rejected, so users of other versions should consider themselves unsupported.
  • Not for: macOS/Linux users, people who haven't installed MMD or who use an unverified version, and people who don't want to install the Visual Studio C++ component. The official evidence makes no mention of macOS/Linux support — this is unknown.

First Attempt in 3 Minutes

Note: this main path cannot actually be completed in 3 minutes — building the DLL from source takes considerable time; "3 minutes" refers to the small number of steps.

Prerequisites:

  1. A Windows environment with Python x64 installed (verified with 3.10 x64).
  2. Visual Studio 2022 or Build Tools installed, with the "Desktop development with C++" component selected (needed to compile the native DLL).
  3. The Japanese MMD 9.32 x64 already running — the server will not start MMD for you.

Installation (from the repository directory; official PowerShell commands):

python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e .
cmd /c scripts\build_native.cmd

The third command compiles the native DLL. This step is mandatory, and the build output lands locally.

Register with your MCP client (stdio mode). Official example configuration:

"command": "C:/Tools/mmd-mcp/.venv/Scripts/python.exe",
"args": ["-m", "mmd_mcp.server"]

Replace the path with your own venv location.

For your first call, mmd_list_windows is recommended: it only lists windows and does not touch the scene, making it the lowest-risk first call. A success signal is a returned list of the current MMD windows with their hwnd values. If you have multiple MMD instances running, every subsequent call must pass in the hwnd returned by mmd_list_windows. The official evidence does not state whether mmd_list_windows is marked with a readOnlyHint, so do not treat any tool as zero-risk.

Other installation methods: the official source only provides the source-install path above; there are no pip packages or prebuilt binaries documented.

Usage Scenarios

Scenario 1: Verify connectivity and manage multiple instances. Setup: you've just configured your client and want to confirm it can find MMD. Call mmd_list_windows and inspect the returned window list and hwnd values. If only one MMD is running, you can proceed to call other tools directly; if multiple MMDs are running, pass the corresponding hwnd to each call to specify the target, per the official instructions. What can be confirmed at this point: window enumeration and the hwnd-passing mechanism — for finer output details, rely on the actual return values.

Scenario 2: Batch-write camera keyframes and export video. Setup: you've finished a motion sequence and want to set camera movement programmatically and output AVI. The official v0.3.0 provides 50 tools, among which mmd_batch_camera_keys writes camera keyframes in batch and mmd_export_video outputs AVI. Note that both of these are write operations on the currently open MMD project: keyframe writing and video export change/generate project content, so before calling, confirm the currently open project can be modified or is already backed up. The official evidence does not state whether these tools have an undo path, nor the details of export parameters; check the specific parameter definitions in your client before calling.

Usage Boundaries

  • Read/write nature: of the 50 tools, some are window/scene query calls, while others are write operations such as model selection, batch bone/camera keyframe writing, EMM effect assignment read/write (mmd_read_effect_assignments / mmd_write_effect_assignments), and AVI export. Write operations act directly on the MMD project you have open.
  • Environment binding: the verified environment is strictly MMD 9.32 x64 (the Japanese release, officially checked against a specific SHA-256); unsupported builds are rejected.
  • Prerequisites and side effects: MMD must be started manually beforehand; the server does not auto-start MMD and does not listen on the network; with multiple instances you must pass hwnd to specify the target, otherwise the target is ambiguous.
  • Local writes: installation creates a local venv and compiles a native DLL — these are required local changes.
  • Unconfirmed items: the official evidence does not state whether tools offer an undo mechanism, the parameter details of each write operation, or compatibility with Chinese/English Windows or other Python versions. Missing information does not mean there is no risk — back up your project before using write operations.