Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ The following environment variables are used:
## Run the server

```bash
uv run src/hcm/server.py
uv run src/hrm/server.py
```

After installing from PyPI you can also run the server directly using
`uvx`:

```bash
uvx ble-hrm-server
```

## Run the tests
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "ble-hrm-server"
version = "0.1.0"
version = "0.2.0"
description = "A MCP server, which serve as a BLE heart rate monitoring to connect with a HRM device."
readme = "README.md"
requires-python = ">=3.10,<3.14"
Expand All @@ -16,6 +16,9 @@ dependencies = [
"qiniu>=7.16.0",
]

[project.scripts]
ble-hrm-server = "hrm.__main__:main"

[tool.uv]
dev-dependencies = [
"pytest>=8.0.0",
Expand Down
19 changes: 19 additions & 0 deletions src/hrm/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""Command line entry point for ble-hrm-server."""

from __future__ import annotations

from pathlib import Path
import sys

from fastmcp.cli.run import run_command

from . import server


def main() -> None:
"""Run the bundled MCP server."""
run_command(str(Path(server.__file__).resolve()), server_args=sys.argv[1:])


if __name__ == "__main__":
main()