Implementation:8beeeaaat Touchdesigner mcp syncMcpServerVersions
| Knowledge Sources | |
|---|---|
| Domains | Versioning, Release_Management |
| Last Updated | 2026-10-28 22:13 GMT |
Overview
Concrete tool for synchronizing the package version across `mcpb/manifest.json` and `server.json`, including the MCPB bundle's SHA256 hash and download URL, from the current `package.json` version.
Description
The syncMcpServerVersions.ts script reads the `version` field from `package.json`, computes the SHA256 of the freshly built `touchdesigner-mcp.mcpb` (via `openssl dgst`), then writes the version into `mcpb/manifest.json` and `server.json` (top-level version, each package entry version, the mcpb identifier download URL, and `fileSha256`). It is run by the `npm run version:mcp` script and requires the `.mcpb` bundle to exist (built first via `npm run build:mcpb`).
Usage
This script is run automatically by `npm version` (via the `version` npm script → `run-p version:*`). The `.mcpb` must be built before running it:
npm run build:mcpb
npm run version:mcp
It is Step 5 of the Release Preparation workflow (package axis portion).
Code Reference
Source Location
- Repository: touchdesigner-mcp
- File: scripts/syncMcpServerVersions.ts
- Lines: L1-105
Signature
// No exported functions — standalone CLI script.
// Reads package.json version, computes .mcpb SHA256, writes to manifest + server.json.
const packageVersion: string = packageJson.version;
const mcpbSha256: string = execFileSync("openssl", ["dgst", "-sha256", mcpbPath]);
// Writes to:
// 1. mcpb/manifest.json — version
// 2. server.json — version, packages[].version, mcpb identifier download URL, fileSha256
Import
# Not imported — run as a script:
npm run version:mcp
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| package.json | file | Yes | Must contain a `version` field |
| touchdesigner-mcp.mcpb | file | Yes | Must exist (built via `npm run build:mcpb`) |
Outputs
| Name | Type | Description |
|---|---|---|
| mcpb/manifest.json | file | `version` field updated |
| server.json | file | `version`, `packages[].version`, download URL, `fileSha256` updated |
Usage Examples
Run via npm
# Build the bundle first (required for SHA256 computation)
npm run build:mcpb
# Then bump (fires version:api + version:mcp)
npm version patch --no-git-tag-version
Known Issue
# server.json's fileSha256 is computed from the LOCALLY built .mcpb.
# CI (release.yml) rebuilds the .mcpb after merge and attaches it to the
# GitHub Release. The zip build is non-deterministic (timestamps), so the
# published asset's hash will NOT match the recorded fileSha256.
# This is a known structural issue, not a per-release bug.