Skip to content

bridge

bridge

HTTP bridge connecting the MCP server to Houdini's hwebserver.

Houdini's hwebserver uses an RPC-style calling convention:

POST /api
Content-Type: application/x-www-form-urlencoded
Body: json=["namespace.function", [positional_args], {keyword_args}]

The server returns the function's return value JSON-encoded.

Classes:

Name Description
HoudiniBridge

Manages HTTP communication between the MCP server and Houdini's hwebserver.

Classes

HoudiniBridge

HoudiniBridge(host: str = 'localhost', port: int = 8100, timeout: float = 60.0)

Manages HTTP communication between the MCP server and Houdini's hwebserver.

Houdini's hwebserver exposes @apiFunction endpoints via a single /api URL. Calls are dispatched by function name inside the JSON-encoded body.

Methods:

Name Description
close

Close the HTTP client connection.

execute

Execute a command on Houdini and return the result data.

health_check

Check if Houdini is responsive.

Functions
close async
close() -> None

Close the HTTP client connection.

execute async
execute(
    command: str,
    params: dict[str, Any] | None = None,
    timeout: float | None = None,
) -> Any

Execute a command on Houdini and return the result data.

Parameters:

Name Type Description Default
command str

The command name (e.g. "scene.get_scene_info")

required
params dict[str, Any] | None

Command parameters

None
timeout float | None

Override timeout for this request (seconds)

None

Returns:

Type Description
Any

The response data dict on success.

Raises:

Type Description
ConnectionError

Cannot reach Houdini

HoudiniCommandError

Houdini returned an error

health_check async
health_check() -> dict[str, Any]

Check if Houdini is responsive.

Returns:

Type Description
dict[str, Any]

Dict with houdini_version, hip_file, pid, etc.