gr4-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GR4_PREFIX | No | Path to the GNU Radio 4 install folder containing bin/gr4cp_server. Can also be set with the --prefix command-line option or the set_gr4_install tool. | |
| GR4_MCP_CONFIG | No | Overrides the location of the gr4-mcp config file (default: ~/.config/gr4-mcp/config.json). | |
| GR4_BACKEND_URL | No | URL of an existing gr4cp_server backend to attach to, or 'studio' to find a running gr4-studio backend. Can also be set with the --backend-url command-line option or the attach_backend tool. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| backend_statusA | Show the GNU Radio 4 install in use, the managed gr4cp_server backend (URL, pid, log), catalog size and schedulers. If no GNU Radio 4 install is found, the result says so: register one with set_gr4_install. |
| set_gr4_installA | Register the GNU Radio 4 install to run the backend from, e.g. "/home/peter/gnuradio4/install/full". Accepts the install prefix, its bin/ folder or the gr4cp_server binary. The backend is restarted from that install (running sessions are lost) and the block catalog reloaded. persist=True saves it to the gr4-mcp config file so later runs use it too (the GR4_PREFIX environment variable still takes precedence there). |
| attach_backendA | Attach to an already running gr4cp_server (e.g. the one gr4-studio started), or go back to a private one. url: "http://127.0.0.1:37945" (the http:// is optional); "studio" to find a running backend announced in the GR4 install's var/logs (gr4-studio writes gr4cp_server.log there); or omit it to return to a backend managed by gr4-mcp. Attaching stops the managed backend (its sessions are lost). gr4-mcp never stops an attached backend, and its sessions are shared with other clients: list_sessions shows gr4-studio's too. The URL is not saved, because backend ports change on every launch. |
| list_categoriesA | List block categories (e.g. blocks/math, blocks/filter, studio) with block-type counts. |
| search_blocksA | Search the block catalog by words in the block name, category or summary; best matches first. Every word must match. Whole words in the block name rank highest, then the first
sentence of the summary. Common radio terms are understood too, e.g. "noise" also finds
AWGN, "scope" the series sink, "fm demod" the quadrature demodulator, "mixer" the rotator.
Results are grouped per block family; each lists its concrete |
| describe_blockA | Ports, parameters (type, default, enum choices) and type variants of one block type. Advanced parameters (chunk sizes, compute domain, ...) are hidden unless include_advanced. |
| new_graphB | Start a new, empty flowgraph (replaces the current unsaved one). |
| show_graphA | Current flowgraph: blocks with their set parameters and ports, plus connections. include_grc adds the GRC YAML that deploy_graph would submit. |
| add_blockA | Add a block instance to the current graph. block_type: exact catalog id, e.g. "gr::blocks::basic::SignalGenerator". name: instance name used in connections and live settings (default: derived, e.g. signal_generator0). parameters: only values that differ from the defaults, e.g. {"sample_rate": 48000.0}. |
| remove_blockB | Remove a block and every connection touching it. |
| set_parametersA | Set parameters on a block in the graph (validated against the catalog). A value of null resets the parameter to the block default. This edits the graph only; use update_block_settings to change a running session. |
| connectA | Connect source block's output port to target block's input port. Ports may be omitted when the block has a single port of that direction. For dynamic ports pass the base name ("in") to take the next free index, or an explicit handle like "in#1". Port types must match exactly. |
| disconnectB | Remove connections from source to target (optionally only between the given ports). |
| validate_graphA | Check the graph locally: missing blocks, port counts, unconnected blocks, no sink. |
| save_graphA | Save the graph. The extension picks the format: .gr4s gr4-studio document (open it in Studio to view and edit), .gr4c inline GRC YAML, exactly what is submitted to the backend. |
| load_graphA | Load a .gr4s (Studio document) or .gr4c / .grc / .yaml (GRC YAML) file as the current graph. Unknown blocks, unsupported expressions and invalid connections are skipped and reported. |
| deploy_graphA | Validate the graph, create a backend session from it and (by default) start it. replace_previous stops and deletes the session previously deployed from this graph. A session whose start fails is deleted again; the runtime error is returned. |
| list_sessionsA | List all sessions on the backend (id, name, state, last_error). |
| session_statusB | State of a session (default: the one deployed from the current graph), incl. stream endpoints. Note: a graph whose blocks all finished still reports "running". |
| read_streamA | Read the latest data from Studio sink blocks (scope, spectrum, scalar, waterfall, XY) of a running session. stream: stream id, which is the sink block's name (default: every stream in the session). By default each stream is summarized: per-channel min/max/mean/rms/std, a dominant period in samples for time series (frequency = sample_rate / period), the strongest peaks for spectra, and at most max_points downsampled values. raw=True returns the full payload of a single stream instead (can be very large). |
| control_sessionB | Start, stop, restart or delete a session (default: the current graph's session). |
| get_block_settingsA | Read the live settings of a block in a running session, addressed by its instance name. |
| update_block_settingsB | Change settings of a block in a running session, e.g. {"tone_frequency": 10.0}. When the session belongs to the current graph, values are validated against the catalog first and also written into the graph so a later save/deploy keeps them. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| hello_world | Build, deploy and verify a sine-wave hello-world flowgraph. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 23 tools
Most tools have a clearly distinct target: catalog browsing (search_blocks, describe_block, list_categories), graph editing (add_block, connect, set_parameters), and runtime control (deploy_graph, control_session, read_stream). The one risky pair is set_parameters vs update_block_settings and get_block_settings vs show_graph, but their descriptions explicitly contrast graph-edit vs live-session semantics. Only minor boundary friction remains.
The dominant pattern is snake_case verb_noun (list_categories, add_block, remove_block, save_graph, deploy_graph, read_stream). Deviations are minor and readable: noun-first status tools (backend_status, session_status) and a few verbless/bare-verb names (new_graph, connect, disconnect). No casing mixing.
23 tools is on the heavy side, but the domain genuinely spans four sub-areas (block catalog, graph editing, deployment/sessions, backend install management) and each tool covers a real operation. Nothing looks redundant enough to remove, though a couple of status tools could conceivably be merged.
The lifecycle is well covered end to end: discover blocks, build/edit a graph, validate, save/load, deploy, control the session, and read live data, plus backend install and attach management. Small gaps exist around exposing graph export/serialization details or bulk session cleanup, but agents can work around them with existing tools.