From 2dc21b536317771e453c66ddb93526832fd3c3e6 Mon Sep 17 00:00:00 2001 From: Yoel Bassin Date: Mon, 28 Apr 2025 09:48:56 +0300 Subject: [PATCH] main - fix: Update README to add UV support --- README.md | 43 +++++++++++++++++++++++-------------------- main.py | 3 ++- pyproject.toml | 5 ++++- 3 files changed, 29 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 6f7a9a3..3958a5a 100644 --- a/README.md +++ b/README.md @@ -26,39 +26,42 @@ ### Requirements - Python >= 3.13 - GNURadio (Tested with GNURadio Companion v3.10.12.0) - -### Installation -1. [**Install GNURadio**](https://wiki.gnuradio.org/index.php/InstallingGR) - -2. **Set up a Python virtual environment** - ```bash - python3.13 -m venv --system-site-packages venv - source venv/bin/activate - pip install -e . - ``` - > The `--system-site-packages` flag is required because GNURadio installs the `gnuradio` Python package globally. +- UV ### Usage - -Start the MCP server: +1. **Clone the repository** ```bash -python main.py +git clone https://github.com/yoelbassin/gnuradioMCP ``` -Connect your LLM or automation tool with: +2. [**Install GNURadio**](https://wiki.gnuradio.org/index.php/InstallingGR) + +3. **Set up a UV environment** +```bash +cd gnuradioMCP +uv venv --system-site-packages +``` + > The `--system-site-packages` flag is required because GNURadio installs the `gnuradio` Python package globally. + +4. **Add the MCP server configuration to your client configuration.** For example, for Claude Desktop or Cursor: ```json "mcpServers": { - "GnuradioMCP": { - "url": "http://localhost:8000/sse" + "GnuradioMCP": { + "command": "uv", + "args": [ + "--directory", + "/path/to/gnuradioMCP", + "run", + "main.py" + ] + } } -} ``` - ## Development Install development dependencies and run tests with: ```bash -pip install -e .[dev] +pip install -e ".[dev]" pytest ``` diff --git a/main.py b/main.py index 9a0946e..2b86694 100644 --- a/main.py +++ b/main.py @@ -24,4 +24,5 @@ app: FastMCP = FastMCP( McpPlatformProvider.from_platform_middleware(app, PlatformMiddleware(platform)) -app.run(transport="sse") +if __name__ == "__main__": + app.run() diff --git a/pyproject.toml b/pyproject.toml index e4c25f1..8cc77a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,10 @@ description = "A FastMCP server for gnuradio." requires-python = ">=3.13" dependencies = [ "pydantic", - "fastmcp" + "fastmcp", + # for gnuradio + "mako", + "pyyaml", ] [project.optional-dependencies]