# ESPHome MCP for AI Agents AI Agent Connect

> ESPHome lets you turn your AI agent into a central command hub for your smart home and industrial IoT hardware. By connecting to your ESPHome devices via the Web API, you can toggle switches, adjust lights, and monitor sensors using plain English. It bridges the gap between your local microcontrollers and your AI tools, moving control from clunky dashboards to natural conversation.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_5SHbIX7z5rQfgbeYq11JB03GdUqXJkasteub5KtB/ai-agent-connect
- **Tags:** esp32, esp8266, home-automation, smart-home, microcontrollers, sensors

## Description

Imagine wanting to dim the lights or check the temperature in your workshop without opening three different apps. This Connector makes that happen by letting your AI agent talk directly to your ESPHome microcontrollers. Instead of navigating menus, you just tell your agent what to do. You can ask about the status of your greenhouse sensors, set the garage door to close, or adjust the fan speed in your server room. It takes the friction out of hardware interaction by treating your physical environment as part of the AI's reach.

If you're looking for a way to manage a fleet of devices without building a custom UI, this is the way to go. It connects your local hardware to the Vinkius catalog, making it easy to plug into your existing AI workflow. Whether you're running a complex home automation setup or a set of industrial sensors, you get a direct line of communication that works as fast as you can type. No more hunting for specific buttons; just tell the AI what you need, and it handles the heavy lifting of interacting with your hardware.

## Tools

### fan_action
Turn your fans on or off and manage their specific behaviors. This allows for easy climate control through your agent.

### get_metrics
Pull Prometheus metrics directly from your ESPHome hardware. Use this to track performance data over time.

### light_action
Control your lights, including specific brightness and color values. You can set the mood with a single sentence.

### number_set
Update a specific numeric value on a device, like a target temperature. This is perfect for setting thresholds.

### select_option
Pick a specific setting from a dropdown menu on your hardware. Use this to choose modes or presets easily.

### switch_action
Toggle power to switches and other binary components. This handles any simple on or off command.

### get_entity_state
Check the current status of any sensor, switch, or binary device. It pulls data directly from your device's Web API.

### alarm_action
Arm or disarm your alarm panels through your chat interface. Manage your security with a quick command.

### button_press
Simulate a physical button press on your connected device. This triggers actions that require a button interaction.

### cover_action
Open, close, or move covers like garage doors and blinds. You can specify positions and tilts with ease.

## Prompt Examples

**Prompt:** 
```
What's the temperature in the server room?
```

**Response:** 
```
Checking the server room status now.

| Room | Temperature | Humidity |
| :--- | :--- | :--- |
| Server Room | **22.5°C** | 45%

The temperature is currently within the optimal range.
```

**Prompt:** 
```
Turn on the workshop lights and set them to 50% brightness.
```

**Response:** 
```
I've sent the command to the workshop lights. 

*   **Status**: On
*   **Brightness**: 50%

They should be brightening up for you now.
```

**Prompt:** 
```
Close the garage door.
```

**Response:** 
```
Executing the close action on the garage door. 

**Success**: The garage door is now closed.
```

## Capabilities

### Check sensor readings
See real-time data from any connected sensor or switch.

### Adjust light settings
Change brightness and colors on your smart lights.

### Toggle appliances
Turn fans, switches, and other power devices on or off.

### Open and close covers
Control blinds, garage doors, and other motorized covers.

### Press physical buttons
Trigger button entities just like a human would.

### Set numeric values
Update specific numbers like temperature targets or sliders.

### Choose from dropdowns
Pick specific options from select entities on your hardware.

## Use Cases

### The Greenhouse Manager
A gardener asks the agent to check the soil moisture and open the vents if it's too humid. The agent uses get_entity_state and cover_action.

### The Workshop Setup
A woodworker wants to turn on the dust collection fan and dim the lights. The agent uses fan_action and light_action.

### The Security Check
A homeowner asks if the alarm is set and wants to disarm it for the night. The agent uses alarm_action.

### The Lab Test
A developer needs to set a target temperature to 75 degrees and see if the heater kicks in. The agent uses number_set and get_entity_state.

## Benefits

- Stop hunting through dashboards to find specific switches. You can use switch_action to toggle any device instantly through your chat.
- Get precise control over your environment. Use light_action to set exact brightness and RGB colors without manual sliders.
- Monitor your hardware in real-time. Use get_entity_state to ask about temperatures or power levels at any moment.
- Manage complex motorized systems easily. Use cover_action to open blinds or garage doors using simple voice or text commands.
- Access deep data for your projects. Use get_metrics to pull Prometheus data for your monitoring needs without extra steps.
- Interact with complex inputs naturally. Use select_option and number_set to handle dropdowns and sliders via conversation.

## How It Works

The bottom line is you get a direct voice command bridge to your local hardware without building a custom dashboard.

1. Enable the web_server component in your ESPHome configuration.
2. Subscribe to this Connector via the Vinkius Marketplace.
3. Provide your device's local URL and any required password.

## Frequently Asked Questions

**Can I use ESPHome MCP with my existing devices?**
Yes, as long as your devices are already running ESPHome and you have the web component enabled in your configuration.

**Does ESPHome MCP work with Claude?**
Yes, it works with any MCP-compatible client including Claude, Cursor, and Windsurf.

**Is it hard to set up?**
Not at all. You just need to enable one component in your configuration and provide your device's local URL.

**Can I control my lights?**
Yes, you can adjust brightness, colors, and power states through natural conversation.

**Does it work for industrial use?**
Absolutely. It's great for monitoring sensors and toggling switches in industrial environments.

**How do I connect it?**
You subscribe via Vinkius and enter your device's local IP address and optional password.

**Is my data private?**
Since it connects to your local URL, your device data stays on your local network.

**Can I control my lights and set specific colors using this server?**
Yes! Use the `light_action` tool. You can specify the entity name, the action (turn_on), and optional parameters like brightness (0-255) and RGB values (r, g, b) to get the perfect ambiance.

**How do I check the current temperature or humidity from my sensors?**
Simply use the `get_entity_state` tool. Provide the domain (e.g., 'sensor') and the entity ID. The agent will return the current value and state of that specific hardware component.

**Is it possible to trigger a physical button or restart a device?**
Yes. If you have a button entity configured in ESPHome (like a restart button), you can use the `button_press` tool with the entity name to trigger that action remotely.