Summary
On a fresh install of Embody v5.0.392 on macOS, enabling Envoyenable produces:
Traceback (most recent call last):
File "/sys/TDResources/threadManager/ThreadManagerExt", line 641, in forceImmediate
File "/project1/Embody/EnvoyExt", line 1866, in _runServer
RuntimeError: MCP server failed on port 9870: No module named 'mcp.server'
EnvoyExt: Envoy disabled
This is two stacked problems, one user-visible and one that becomes visible only if you fix the first.
Environment
|
|
| Embody |
v5.0.392 |
| TouchDesigner |
2025.32280 |
| Bundled Python |
3.11.10 (heads/3.11-Derivative-dirty:e60cd070d8, Oct 10 2024) |
| macOS |
26.4.1 (build 25E253), Apple Silicon |
uv |
0.10.5 (already installed) |
Problem 1 — Bootstrap creates .venv but installs no deps
After dragging in the .tox and toggling Envoyenable:
.venv/ is created next to the .toe ✅
.mcp.json is written ✅
.venv/lib/python3.11/site-packages/ is empty ❌ — no mcp, no pydantic, no httpx, nothing
- Envoy then tries to
import mcp.server and crashes
The bootstrap appears to skip the dep-install step entirely on this machine. No error message in the textport before the mcp.server traceback. Possible silent failure inside _setupEnvironment / _findOrInstallUv — not surfaced to the user.
Problem 2 — Even after manual uv pip install, native wheels fail to load
Reproducing the dep install manually:
VIRTUAL_ENV=/path/to/project/.venv uv pip install "mcp[cli]"
.venv/bin/python -c "import mcp.server"
…gets:
ImportError: dlopen(.../pydantic_core/_pydantic_core.cpython-311-darwin.so):
code signature ... not valid for use in process:
mapping process and mapped file (non-platform) have different Team IDs
TD's bundled python3.11 is signed by Derivative's Apple Team ID and runs under Hardened Runtime + Library Validation. PyPI prebuilt wheels for pydantic_core, cffi, rpds, and cryptography._rust are signed by their respective publishers, so the dynamic loader rejects them.
codesign --force --sign - (ad-hoc resigning) does not bypass Library Validation — same error after.
Workaround that works locally
Compile all native deps from source against TD's Python:
# Install Rust toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
source "\$HOME/.cargo/env"
# Reinstall with --no-binary so .so files are built locally
VIRTUAL_ENV=/path/to/project/.venv uv pip install --no-binary :all: --reinstall "mcp[cli]"
After that, import mcp.server succeeds and Envoy starts cleanly.
Suggested fix
- Surface bootstrap failures. If
_setupEnvironment exits non-zero or doesn't install deps, log that explicitly to the textport before _runServer is allowed to run. The current behavior leaves users with an empty venv and an inscrutable No module named 'mcp.server' error.
- Detect the macOS Library Validation case. When running on macOS under TD's bundled Python, default
uv pip install to --no-binary pydantic-core,cryptography (at minimum), or document the Rust-toolchain prerequisite for Mac users. Ad-hoc resigning is not an option.
- Document the Rust prereq somewhere in the install flow if option 2 is the chosen path. Most TD users won't have
cargo on their machine.
Happy to test a fix or send a PR if helpful.
Summary
On a fresh install of Embody v5.0.392 on macOS, enabling
Envoyenableproduces:This is two stacked problems, one user-visible and one that becomes visible only if you fix the first.
Environment
heads/3.11-Derivative-dirty:e60cd070d8, Oct 10 2024)uvProblem 1 — Bootstrap creates
.venvbut installs no depsAfter dragging in the .tox and toggling
Envoyenable:.venv/is created next to the.toe✅.mcp.jsonis written ✅.venv/lib/python3.11/site-packages/is empty ❌ — nomcp, nopydantic, nohttpx, nothingimport mcp.serverand crashesThe bootstrap appears to skip the dep-install step entirely on this machine. No error message in the textport before the
mcp.servertraceback. Possible silent failure inside_setupEnvironment/_findOrInstallUv— not surfaced to the user.Problem 2 — Even after manual
uv pip install, native wheels fail to loadReproducing the dep install manually:
…gets:
TD's bundled
python3.11is signed by Derivative's Apple Team ID and runs under Hardened Runtime + Library Validation. PyPI prebuilt wheels forpydantic_core,cffi,rpds, andcryptography._rustare signed by their respective publishers, so the dynamic loader rejects them.codesign --force --sign -(ad-hoc resigning) does not bypass Library Validation — same error after.Workaround that works locally
Compile all native deps from source against TD's Python:
After that,
import mcp.serversucceeds and Envoy starts cleanly.Suggested fix
_setupEnvironmentexits non-zero or doesn't install deps, log that explicitly to the textport before_runServeris allowed to run. The current behavior leaves users with an empty venv and an inscrutableNo module named 'mcp.server'error.uv pip installto--no-binary pydantic-core,cryptography(at minimum), or document the Rust-toolchain prerequisite for Mac users. Ad-hoc resigning is not an option.cargoon their machine.Happy to test a fix or send a PR if helpful.