From d6be42b7197846cdf84a714498a5269806e952a4 Mon Sep 17 00:00:00 2001 From: genewoo Date: Tue, 17 Jun 2025 13:52:47 +0800 Subject: [PATCH] Update CLI entrypoint --- src/hrm/__main__.py | 7 +++++-- src/hrm/server.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/hrm/__main__.py b/src/hrm/__main__.py index ba62899..d4808f0 100644 --- a/src/hrm/__main__.py +++ b/src/hrm/__main__.py @@ -5,14 +5,17 @@ from pathlib import Path import sys -from fastmcp.cli.run import run_command +from fastmcp.cli.cli import app from . import server def main() -> None: """Run the bundled MCP server.""" - run_command(str(Path(server.__file__).resolve()), server_args=sys.argv[1:]) + app( + args=["run", str(Path(server.__file__).resolve()), *sys.argv[1:]], + standalone_mode=False, + ) if __name__ == "__main__": diff --git a/src/hrm/server.py b/src/hrm/server.py index 1cda409..ccccd85 100644 --- a/src/hrm/server.py +++ b/src/hrm/server.py @@ -16,7 +16,7 @@ FunctionResource( uri="discover://hrm", name="HRM Device", - text="Bluetooth Heart Rate Monitor Devices", + description="Bluetooth Heart Rate Monitor Devices", fn=cli.list_bluetooth_devices, ) )