Platform Features

Bridging LLMs to the Physical World: Controlling SDRs with MCP

Large Language Models (LLMs) are incredibly powerful at parsing code, analyzing text, and generating configuration files. But historically, they have been trapped inside their chat interfaces, completely disconnected from the physical world. If you wanted an AI to analyze a radio signal, you had to manually capture it, decode it, save it to a file, and upload it to the chat.

With Mycelium, we have fundamentally changed this paradigm. Mycelium features a native implementation of the Model Context Protocol (MCP), transforming it into a bridge between AI agents and the electromagnetic spectrum.

What is MCP?

The Model Context Protocol (MCP) is an open standard that allows AI models to communicate securely with local tools and data sources via JSON-RPC 2.0. By running Mycelium in MCP server mode, an LLM can invoke Mycelium's internal functions exactly as a human operator would via the CLI.

Starting the Server

To expose your SDR hardware to an AI agent, launch Mycelium with the --mcp flag and a port number. This starts an HTTP server that accepts JSON-RPC 2.0 requests, making it easy to integrate with any MCP-compatible client over the network. For local integrations like Claude Desktop, a stdio transport is also available by omitting the port.

How the AI Interacts with Hardware

Once connected, the AI agent is granted access to a suite of MCP "Tools". For example, if you ask the AI to "Check what SDRs are plugged into my machine," the AI will autonomously execute the list_sdrs tool.

Mycelium responds with a structured list of discovered hardware, which the AI then reads and summarizes for you.

Building an AI-Controlled Feedback Loop

The true power of this integration is the bidirectional data flow utilizing Mycelium's Directive System. We can instruct the AI to create a tool, configure the SDR, and set up a pipeline that feeds RF data directly back into the LLM's context window.

  1. Tool Creation: The AI calls create_tool and configure_tool to instantiate a receiver on 131.725 MHz (ACARS).
  2. The Ingestion Directive: The AI sets up a directive to Receive data using the ACARS protocol plugin.
  3. The Output Directive: The AI adds the MCP_Output action to the tool's stack. This action takes the decoded ACARS message and pushes it directly to the MCP output queue.

Execution Flow

digraph { graph [bgcolor="transparent" fontname="Inter" rankdir=TB pad=0.4] node [fontname="Inter" fontsize=12 fontcolor="#e2e8f0" style=filled fillcolor="#1a1033" color="#8b5cf6" penwidth=1.5 margin="0.2,0.15" shape=box] edge [color="#8b5cf6" fontcolor="#a78bfa" fontname="Inter" fontsize=10 arrowsize=0.8] user [label="User" shape=ellipse] llm [label="AI Agent\n(MCP Client)"] subgraph cluster_ch { label="Mycelium (MCP Server)" fontcolor="#e2e8f0" color="#8b5cf6" style=dashed bgcolor="#0f0a1e" demod [label="Demodulate and Decode"] mcp_out [label="MCP_Output Directive"] demod -> mcp_out } sdr [label="SDR Hardware" shape=cylinder] user -> llm [label="Natural language task"] llm -> demod [label="MCP: configure + execute"] sdr -> demod [label="Raw IQ Samples" style=dashed] mcp_out -> llm [label="Decoded JSON"] llm -> user [label="Flight summary"] }

Conclusion

By treating the SDR not as a passive peripheral, but as an active, queryable endpoint via MCP, Mycelium allows security engineers to build autonomous monitoring systems. You can tell your AI to "watch for simulated GPS signals," and it will dynamically tune the hardware, analyze the demodulated data, and alert you in natural language the moment an anomaly occurs.



← Back to Blog