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.
- Tool Creation: The AI calls
create_toolandconfigure_toolto instantiate a receiver on 131.725 MHz (ACARS). - The Ingestion Directive: The AI sets up a directive to
Receivedata using the ACARS protocol plugin. - The Output Directive: The AI adds the
MCP_Outputaction to the tool's stack. This action takes the decoded ACARS message and pushes it directly to the MCP output queue.
Execution Flow
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