From 80c0a1f32a202d992285d044582f29f9374dd685 Mon Sep 17 00:00:00 2001 From: Yoel Bassin Date: Sun, 27 Apr 2025 22:35:21 +0300 Subject: [PATCH] main - fix: Update README and pyproject.toml --- README.md | 80 +++++++++++++++++++++++++++++++++++--------------- pyproject.toml | 16 ++-------- 2 files changed, 59 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index c997249..6f7a9a3 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,67 @@ # GNURadio MCP Server -The goal of this project is allowing LLMs to create GNURadio Flowcharts for GNURadio Companion. The MCP server works by creating a flowchart and saving it as a `.grc` file that can be opened in gnuradio-companion. -## Installation +[![Python Version](https://img.shields.io/badge/python-3.13%2B-blue.svg)](https://www.python.org/downloads/release/python-3130/) -Install GNURadio, follow the installation process in [InstallingGR](https://wiki.gnuradio.org/index.php/InstallingGR). + +**GNURadio MCP Server** is a modern, extensible Machine Control Protocol (MCP) server for [GNURadio](https://www.gnuradio.org/), enabling programmatic, automated, and AI-driven creation of GNURadio flowgraphs. Designed for seamless integration with Large Language Models (LLMs), automation frameworks, and custom clients, it empowers you to generate `.grc` files and control SDR workflows at scale. + +> **Why GNURadio MCP Server?** +> - Automate SDR workflows and flowgraph generation +> - Integrate with LLMs, bots, and custom tools +> - Build, modify, and validate flowgraphs programmatically +> - Save time and reduce manual errors in SDR prototyping + + +## Features +- ๐ŸŒ **MCP API**: Exposes a robust MCP interface for GNURadio +- ๐Ÿ› ๏ธ **Programmatic Flowgraph Creation**: Build, edit, and save `.grc` files from code or automation +- ๐Ÿค– **LLM & Automation Ready**: Designed for AI and automation integration +- ๐Ÿงฉ **Extensible**: Modular architecture for easy extension and customization +- ๐Ÿ“ **Example Flowgraphs**: Includes ready-to-use `.grc` examples in the `misc/` directory +- ๐Ÿงช **Tested**: Comprehensive unit tests with `pytest` + + +## Quickstart + +### 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. + +### Usage + +Start the MCP server: ```bash -brew install gnuradio -``` -Now create a virtual environment to run the project. -```bash -python3.13 -m venv --system-site-packages venv -source venv/bin/activate -pip install -e . -``` -we use the `--system-site-packages` flag since GNURadio installs the `gnuradio` python package globally. - -Currently, you can run the MCP server located on `main.py` -``` python main.py ``` -and add the GnuradioMCP server to your LLM using -``` - "mcpServers": { - "GnuradioMCP": { - "url": "http://localhost:8000/sse" - } +Connect your LLM or automation tool with: +```json +"mcpServers": { + "GnuradioMCP": { + "url": "http://localhost:8000/sse" } +} ``` -## Current Status -In development, basic server have been created. Currently using GNURadio Companion (v3.10.12.0). + +## Development +Install development dependencies and run tests with: +```bash +pip install -e .[dev] +pytest +``` + + +## Project Status +**In active development.** Core server functionality is available, but the API and features are evolving. Your feedback and contributions are highly valued! diff --git a/pyproject.toml b/pyproject.toml index 0f3e413..e4c25f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,11 +8,8 @@ version = "0.1.0" description = "A FastMCP server for gnuradio." requires-python = ">=3.13" dependencies = [ - "pyYAML", - "mako", - "pygobject", - "numpy", - "jsonschema", + "pydantic", + "fastmcp" ] [project.optional-dependencies] @@ -21,15 +18,6 @@ dev = [ "pre-commit" ] -[tool.ruff] -line-length = 88 - -[tool.ruff.lint] -select = ["E", "F", "W", "I"] # Enable basic flake8 rules + isort - -[tool.ruff.format] -quote-style = "double" - [tool.pytest.ini_options] # Tell pytest where to find the package pythonpath = ["src"]