fix: Resolve Houdini MCP server connection and startup issues#10
fix: Resolve Houdini MCP server connection and startup issues#10Limbicnation wants to merge 4 commits intocapoomgit:mainfrom
Conversation
This commit addresses multiple issues preventing the Houdini MCP server
from starting and connecting correctly with Claude Desktop.
Problem Description:
The Houdini MCP server failed to start due to several factors:
1. **Missing Python Dependencies:** The module and other required
libraries (, , ) were not
consistently installed or found, leading to .
2. **Mandatory RAPIDAPI_KEY Check:** The server would exit if
was not configured in , even if OPUS API
features were not intended for use.
3. **Windows-style Path in Venv:** The virtual environment path
( vs ) was incorrect for Linux systems, causing issues
with manipulation.
4. **Conflicting Venv Path Manipulation:** Manual
modification in interfered with Provide a command or script to invoke with `uv run <command>` or `uv run <script>.py`.
The following commands are available in the environment:
- dotenv
- httpx
- jsondiff
- jsonpatch
- jsonpointer
- markdown-it
- mcp
- normalizer
- pygmentize
- python
- python3
- python3.12
- typer
- uvicorn
See `uv run --help` for more information.'s
automatic virtual environment handling.
5. **PySide Compatibility:** The Houdini-side TCP server ()
used , which is incompatible with newer Houdini versions
(e.g., Houdini 21.0) that use .
6. **Incorrect Working Directory for Claude Desktop:** Claude Desktop
was launching the Provide a command or script to invoke with `uv run <command>` or `uv run <script>.py`.
The following commands are available in the environment:
- dotenv
- httpx
- jsondiff
- jsonpatch
- jsonpointer
- markdown-it
- mcp
- normalizer
- pygmentize
- python
- python3
- python3.12
- typer
- uvicorn
See `uv run --help` for more information. command from an incorrect working
directory, preventing from finding and the
virtual environment.
Solution Implemented:
1. **Updated :** Added , , and
as dependencies. was run to install them.
2. **Made OPUS API Optional:** Modified to
change the check from a critical exit to a warning.
OPUS API features are now gracefully disabled if keys are missing,
allowing the server to start.
3. **Removed Manual Venv Path Manipulation:** Deleted the problematic
modification logic from ,
allowing Provide a command or script to invoke with `uv run <command>` or `uv run <script>.py`.
The following commands are available in the environment:
- dotenv
- httpx
- jsondiff
- jsonpatch
- jsonpointer
- markdown-it
- mcp
- normalizer
- pygmentize
- python
- python3
- python3.12
- typer
- uvicorn
See `uv run --help` for more information. to handle the virtual environment correctly.
4. **Flexible PySide Import:** Modified to dynamically
import first, falling back to , ensuring
compatibility across different Houdini versions.
5. **Configured in Claude Desktop:** (User-applied change to
) Added the property to the
server configuration in Claude Desktop, pointing to the
project root ().
This ensures Provide a command or script to invoke with `uv run <command>` or `uv run <script>.py`.
The following commands are available in the environment:
- dotenv
- httpx
- jsondiff
- jsonpatch
- jsonpointer
- markdown-it
- mcp
- normalizer
- pygmentize
- python
- python3
- python3.12
- typer
- uvicorn
See `uv run --help` for more information. executes in the correct context.
Impact:
The Houdini MCP server now starts reliably, connects to Claude Desktop,
and provides core Houdini functionalities. OPUS API features are
optional and can be enabled by configuring the .
Fixes: #<issue_number> (if applicable)
- Remove auto-start on import in __init__.py (was causing port conflicts) - Make start_server/stop_server idempotent with proper state guards - Add restart_server() utility and cleanup helpers in server.py - Rename self.socket to self.server_socket for clarity - Handle BrokenPipeError/ConnectionResetError on client disconnect - Detect stale sockets in HoudiniConnection via getpeername() - Increase Houdini comm timeout to 5min for render operations - Use 127.0.0.1 consistently instead of localhost - Add langchain_classic fallback import - Add shelf tool scripts for start/stop
- Add ZipSlip protection to _unzip_file() with realpath validation - Implement 4-byte length-prefix TCP framing protocol on both sides - Fix zip_filepath possibly-unbound bug in OPUS import - Fix hou.nodeType crash in MCP bridge (replace with URL-derived name) - Add .gitignore entries for *.env, IDE files, .claude/ - Untrack urls.env from git (API key leak prevention) - Delete dead main.py scaffold - Update pyproject.toml description - Add ping command for protocol version detection - Add protocol handshake in send_command() to prevent silent hangs
When the running Houdini plugin doesn't recognize the ping command (older version), it returns a valid framed JSON error response instead of a pong. The handshake now treats this as a successful framing protocol verification rather than a hard failure, allowing the MCP bridge to proceed with normal commands.
d318f1b to
7dd64e6
Compare
|
+1 — independently verified on macOS 15 / Apple Silicon (Houdini 21.0.671):
Independent fork applied the same five fixes locally and the bridge + TCP server (verified via raw socket round-trip of Adds a Mac Apple Silicon Houdini 21 data point to the existing test coverage. Hope this helps land it. |
|
@DonLoquacious — thank you for the thorough independent verification on macOS 15 / Apple Silicon / Houdini 21.0.671. This is exactly the kind of cross-platform validation that helps land these fixes with confidence. Really appreciate you confirming all five items end-to-end, especially:
The raw socket round-trip verification of I'll ping the maintainer to see if we can get this merged. Thanks again for taking the time to test and document. |
This commit addresses multiple issues preventing the Houdini MCP server from starting and connecting correctly with Claude Desktop.
Problem Description:
The Houdini MCP server failed to start due to several factors:
uv run <command>oruv run <script>.py.The following commands are available in the environment:
See
uv run --helpfor more information.'sautomatic virtual environment handling.
5. PySide Compatibility: The Houdini-side TCP server () used , which is incompatible with newer Houdini versions (e.g., Houdini 21.0) that use .
6. Incorrect Working Directory for Claude Desktop: Claude Desktop was launching the Provide a command or script to invoke with
uv run <command>oruv run <script>.py.The following commands are available in the environment:
See
uv run --helpfor more information. command from an incorrect workingdirectory, preventing from finding and the
virtual environment.
Solution Implemented:
uv run <command>oruv run <script>.py.The following commands are available in the environment:
See
uv run --helpfor more information. to handle the virtual environment correctly.4. Flexible PySide Import: Modified to dynamically import first, falling back to , ensuring compatibility across different Houdini versions.
5. Configured in Claude Desktop: (User-applied change to ) Added the property to the server configuration in Claude Desktop, pointing to the project root (). This ensures Provide a command or script to invoke with
uv run <command>oruv run <script>.py.The following commands are available in the environment:
See
uv run --helpfor more information. executes in the correct context.Impact:
The Houdini MCP server now starts reliably, connects to Claude Desktop, and provides core Houdini functionalities. OPUS API features are optional and can be enabled by configuring the .
Fixes: #<issue_number> (if applicable)