Content
MD MCP
MikuMikuDance (MMD) plugin that adds MCP (Model Context Protocol) server functionality. Uses MMDPlugin (v0.41 x64).
## Usage
### 1 MMDPlugin
MMDPlugin is required to add plugin functionality to MMD.
Install using [MMD Plugin Install Manager (PTOM76 fork)](https://github.com/PTOM76/MMDPluginInstallManager).
### 2. Build and Place `mmd_mcp.dll`
Build `mmd_mcp.dll` according to the "Build" section below, and place it in a subfolder in MMD's `Plugin/` directory.
```
MikuMikuDance/
Plugin/
mmd_mcp/
mmd_mcp.dll
```
### 3. Launch MMD
When MMD is launched, the plugin will be loaded automatically, and the MCP server will start listening at `http://127.0.0.1:3939`.
### 4. Configure MCP Client
Run the following command in Claude Code to register the MCP server.
```bash
claude mcp add mmd --transport streamable-http http://127.0.0.1:3939/mcp
```
For other MCP clients, set `http://127.0.0.1:3939/mcp` as the Streamable HTTP endpoint.
> **Note:** Cannot connect if MMD is not running. Make sure to launch MMD before using Claude Code.
> **Warning:** This plugin is under development and directly accesses MMD's memory. Make sure to back up project files (.pmm) and model files (.pmx) before using.
## Dependencies
- CMake 4.1+
- MSVC (C++20)
- [DirectX SDK (June 2010)](https://www.microsoft.com/en-us/download/details.aspx?id=6812) — Set environment variable `DXSDK_DIR` if not default path
## Build
```bash
cmake --preset default
cmake --build build
```
Output: Place `build/Debug/mmd_mcp.dll` in MMD's `Plugin/mmd_mcp/` directory.
## Deploy
Set `MMD_PLUGIN_DIR` in `CMakeUserPresets.json`:
```json
{
"version": 6,
"configurePresets": [
{
"name": "local",
"inherits": "default",
"cacheVariables": {
"MMD_PLUGIN_DIR": "path/to/MikuMikuDance/Plugin/mmd_mcp"
}
}
]
}
```
Configure and deploy:
```bash
cmake --preset local
cmake --build build --target deploy
```