A web-based tool that drives MikuMikuDance (MMD) models — full body, both hands, and face — from a webcam, video, or photo in real time. One shot, no offline preprocessing, no multi-pass.
MiKaPo covers all three motion modalities in one pipeline:
まばたき, あ, ワ, ウィンク, ウィンク右), which is how MMD models are natively rigged for facial expression. Eye direction is the one face channel that does drive bones (左目 / 右目).The hard part isn't detection — it's the transformation. MediaPipe and MMD use different coordinate systems, every MMD model has its own rest-pose reference directions, and the bone hierarchy means each rotation has to be computed in its parent chain's local space.
MiKaPo 2.0 is a complete rewrite of the solver:

Demo model: 深空之眼 - 裁暗之锋·塞尔凯特
まばたき, あ, ワ, ウィンク, ウィンク右); eye gaze drives 左目 / 右目 bones.vmd motion file (30fps)npm install
npm run dev
Then open http://localhost:4000.
MediaPipe gives world-space 3D landmark positions per frame. MMD bones rotate in their parent's local frame, with each model defining its own rest orientation. The solver bridges these:
parent → child direction equals the parent-local reference direction.function solveBone(name: string, parentChain: string[], landmarks): Quaternion {
// Compose parent rotations and invert to get world → parent-local
const parentQ = parentChain.reduce((acc, p) => acc.multiply(boneStates[p].rotation), Quaternion.Identity())
const worldToLocal = Matrix.FromQuaternion(parentQ).invert()
// Transform landmarks into parent-local space
const head = Vector3.TransformCoordinates(landmarks.head, worldToLocal)
const tail = Vector3.TransformCoordinates(landmarks.tail, worldToLocal)
const direction = tail.subtract(head).normalize()
// Rotate the rest-pose reference onto the runtime direction
const reference = calibratedRefs[name] ?? DEFAULT_REFS[name]
return Quaternion.FromUnitVectorsToRef(reference, direction, new Quaternion())
}
左手捩 / 右手捩) — uses swing-twist decomposition along the elbow's forearm axis. A naive Euler-based approach bleeds wrist roll into pitch/yaw and gimbals.下半身) — 3-axis Gram-Schmidt basis from hip line + spine direction so the pelvis tilts forward when leaning, instead of staying vertical and kinking the spine at the waist.頭) — single rotation matrix from a Gram-Schmidt basis (ear axis + ear→eye direction) decomposed to a quaternion, instead of two FromUnitVectors calls composed (which compounds error).左足首 / 右足首) — calibrated from the 足首 → つま先 bone direction; runtime uses ankle → foot_index landmarks (not heel) so the rest and runtime measurement frames line up.$ claude mcp add MiKaPo \
-- python -m otcore.mcp_server <graph>