Skip to main content
Glama

HardwareMCP is a local server that connects an AI app to an ESP32, another compatible serial device, or Home Assistant. It speaks the Model Context Protocol (MCP), the standard your app uses to discover tools and call them. The included mock device lets you try the whole conversation on your computer.

Try it without hardware

You need Python 3.10 or newer. If you already have the project, open a terminal in the folder containing pyproject.toml. Otherwise, get a copy with Git.

git clone https://github.com/itfidele/hardware-mcp.git
cd hardware-mcp

macOS or Linux

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e .
hardware-mcp check -c examples/mock.yaml --read
py -3 -m venv .venv
.venv\Scripts\activate.bat
python -m pip install -e .
hardware-mcp check -c examples/mock.yaml --read

Look for [ok] mock (MockDevice): 6 channels. You’ll see readings for temp, humidity, and button, followed by three outputs you can control. This check works before you connect an AI app.

Related MCP server: arduino-mcp-server

Your first conversation

After the terminal check, connect Claude Desktop or another MCP client. Then try these requests in the same session using the supplied mock configuration. Connect Claude Desktop · Other clients · Mock configuration

Ask your assistant

What to look for

“What’s the temperature on the mock device?”

A simulated reading in degrees Celsius. It varies slightly each time.

“Turn on the mock LED, then read it back.”

The LED reads 1. The project’s policy allows this write directly.

“Turn on relay1 on the mock device.”

A client that supports approval forms asks you first. Decline, then ask for the relay state. On a fresh session it still reads 0.

The channel is the named part you interact with, such as temp or led. Each read or write goes through the server’s permission rules in order. The first match decides whether to allow it, ask you, or deny it. A write that needs approval can run only after the client receives your explicit consent. With the mock configuration, you can inspect write outcomes in examples/audit.jsonl. How permissions and auditing work

Choose your device

Setup

What you can try

Where to start

Mock device

Read simulated sensors, switch an LED, or set fan speed from 0 to 100%.

Beginner guide

TCP simulator

Exercise the same serial driver used for the board through a local socket.

Simulator configuration

ESP32 over USB

Read chip temperature, uptime, and the BOOT button. Switch the LED or relay with the supplied firmware.

Board setup and firmware

Home Assistant

Read a named sensor or control a light or switch from your selected entities.

Home Assistant setup

To try the TCP simulator, run hardware-mcp sim in one terminal. In a second terminal with the same environment active, run hardware-mcp check -c examples/simulator.yaml --read. Look for sim-esp32. Press Ctrl+C in the first terminal when you’re done.

Connecting real hardware? Start with a sensor or the onboard LED. For a relay, verify the module’s switching polarity with the load disconnected. The project tracks physical-board, live Home Assistant, and desktop-client checks separately from its automated tests. Hardware safety · Test guide · Roadmap

Tool reference

Tool

What your assistant can do

list_devices

Find devices named in your configuration.

describe_device

List a device’s channels, units, and which channels accept writes.

get_policy

Inspect the active permission rules.

read_channel

Read a sensor or check an output’s current value.

write_channel

Change an output, subject to your policy.

Building a device that speaks the protocol? Start with the wire format. To work on the server, see the architecture and contributor guide.

MIT license © 2026 Nexttek Solutions LLC · Code of conduct · CI · Public safety checks

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to control hardware devices like Arduino, Raspberry Pi, 3D printers, CNC machines, and custom robots via serial ports and HTTP. Provides tools for device discovery, command sending, sensor reading, servo control, G-code execution, and emergency stops with safety features.
      37 PyPI
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to interact with serial port devices by sending commands, capturing output, and managing connections, with real-time browser-based terminal monitoring.
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to discover, read and control smart-home devices from multiple vendors through a unified capability model, and to author and trigger YAML scenes that a local deterministic engine executes without the AI in the control loop. High-risk actions such as door locks and garage doors are held in a confirmation queue for a human, and every call is written to a local audit log.
      Apache 2.0