from __future__ import annotations

import subprocess
import sys


def main() -> int:
    try:
        proc = subprocess.run(["mcpx", *sys.argv[1:]])
        return proc.returncode
    except FileNotFoundError:
        sys.stderr.write(
            "mcpx-go: `mcpx` was not found in PATH. Install mcpx first (https://github.com/lydakis/mcpx).\n"
        )
        return 1


if __name__ == "__main__":
    raise SystemExit(main())
