# Balena MCP for AI Agents AI Agent Connect

> Balena MCP lets you manage your IoT fleet and edge devices directly from your AI client. You can query device status, update environment variables, and track deployments across your entire infrastructure without switching tabs. It brings your BalenaCloud dashboard into your chat interface, making it easy to manage hardware at scale.

## Overview
- **Category:** cloud-infrastructure
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_HaDxWZjxy0KnKuRGaidiaMAMaJh5YZgXdeQzTr9y/ai-agent-connect
- **Tags:** fleet-management, edge-computing, device-monitoring, linux-devices, deployment-automation, remote-management

## Description

Balena MCP lets you manage your IoT fleet and edge devices directly from your AI client. You can query device status, update environment variables, and track deployments across your entire infrastructure without switching tabs. It brings your BalenaCloud dashboard into your chat interface. Imagine you're managing a fleet of hundreds of edge devices. Normally, you'd be jumping between tabs, filtering through dashboards, and manually checking if a specific sensor node in a warehouse is actually online or if it's running the latest firmware. This Connector changes that by putting the power of BalenaCloud directly into your AI agent. Instead of hunting for a specific UUID or trying to remember which organization a device belongs to, you just ask your agent to find it. You can check the health of your fleets, see which devices are lagging, and grab the exact download URLs for balenaOS versions for your specific hardware. It's about moving from manual clicking to natural language commands. You can update environment variables for a specific group of sensors or verify your API keys in one place. This removes the friction of manual data entry and constant tab switching. You get a direct line of communication to your hardware, making it much easier to maintain your edge infrastructure at scale. Vinkius makes it easy to plug this into your existing workflow so you can focus on building products rather than babysitting hardware.

## Tools

### list_devices
The list_devices tool queries your devices using OData filters like UUID or status. This lets you find exactly what you need in a massive fleet.

### list_fleets
The list_fleets tool views all your Balena fleets and applications. Use this to get a bird's-eye view of your active projects.

### get_os_download_url
The get_os_download_url tool grabs the direct download link for a balenaOS image. This is perfect for rapid prototyping and manual testing.

### list_os_versions
The list_os_versions tool shows which balenaOS versions are available for specific hardware. This helps you pick the right firmware for your device type.

### list_organizations
The list_organizations tool lists all organizations associated with your account. Use this to manage multi-tenant access across different projects.

### list_releases
The list_releases tool filters and views deployment releases across your fleets. This ensures you know exactly what software is running where.

### whoami
The whoami tool checks your current user profile and active permissions. Use this to verify your account status and organization access.

### list_api_keys
The list_api_keys tool lists your Balena API keys. This helps you manage access and keep your credentials organized.

### create_device_env_var
The create_device_env_var tool creates a new environment variable for a specific device. This lets you change how your edge software behaves without a full redeploy.

### create_device_tag
The create_device_tag tool creates a custom tag for a device. This makes it easier to group and find specific hardware in large fleets.

## Prompt Examples

**Prompt:** 
```
Show me all the devices in my 'Warehouse-A' fleet.
```

**Response:** 
```
I've retrieved the devices for the **Warehouse-A** fleet. Here is the current status:

| Device ID | Status | Last Seen |
| :--- | :--- | :--- |
| `uuid-7721` | **Online** | 2 mins ago |
| `uuid-8832` | **Offline** | 4 hours ago |
| `uuid-9941` | **Online** | 1 min ago |

Would you like me to check the logs for the offline device?
```

**Prompt:** 
```
What's the latest balenaOS for a Raspberry Pi 3?
```

**Response:** 
```
I found the following stable versions for the **Raspberry Pi 3**: 

*   **v2.115.18** (Latest Stable)
*   **v2.113.18**
*   **v2.108.27**

I can provide the direct download URL for any of these if you'd like.
```

**Prompt:** 
```
Add a tag 'active-test' to device 12345.
```

**Response:** 
```
✅ **Success**

I've added the tag `active-test` to device **12345**. The device metadata has been updated successfully.
```

## Capabilities

### Query device status with filters
Find specific hardware in your fleet using UUIDs or other attributes.

### Update environment variables
Change how your edge software behaves without needing a full redeploy.

### Track deployment history
See exactly which software versions are running across your organizations.

### Get direct OS download links
Retrieve balenaOS images quickly for prototyping or manual testing.

### Verify account permissions
Check your current user profile and active API keys in one spot.

### List active fleets
Get a high-level overview of all your applications and active projects.

## Use Cases

### Troubleshooting a disconnected sensor
An engineer asks the agent to find a specific sensor by its UUID and check its status to see if it's actually online.

### Mass environment updates
A DevOps lead needs to update a location variable for 50 devices and asks the agent to apply the change to the whole group.

### Firmware research
A developer wants to know what's available for a Raspberry Pi 4 and asks the agent to list versions and provide download links.

### Organization audit
A manager asks the agent to list all organizations and active API keys to perform a security and access review.

## Benefits

- Skip the dashboard by using list_devices and list_fleets to get status updates instantly without navigating the BalenaCloud UI.
- Push updates faster by using create_device_env_var to change configuration variables on your edge hardware in seconds.
- Filter with precision by using OData queries with list_devices to isolate specific hardware by UUID or status.
- Organize your hardware better by using create_device_tag to categorize your nodes for easier searching by your agent.
- Provision hardware quickly by using list_os_versions and get_os_download_url to identify and grab the right firmware.
- Audit your infrastructure by using list_releases and list_api_keys to maintain a clear record of deployment history and security.

## How It Works

The bottom line is you get a command-line-like experience for your entire IoT infrastructure using only natural language.

1. Connect your Balena API key to the Connector via Vinkius.
2. Ask your AI client to list devices, check fleet health, or update configurations.
3. Receive real-time status updates and data directly in your chat interface.

## Frequently Asked Questions

**Can I manage my Balena devices with an AI agent?**
Yes, the Balena MCP lets you use natural language to query devices, update environment variables, and track releases directly through your AI client.

**How do I update environment variables on BalenaCloud using an AI?**
You can simply ask your agent to update a specific variable for a device or a group of devices, and it will handle the configuration change for you.

**Can the Balena MCP find specific devices by UUID?**
Yes, the Connector supports advanced querying, allowing your agent to find specific hardware using its UUID or other OData filters.

**How do I check which balenaOS version is on my hardware?**
You can ask your agent to list the available OS versions for your specific hardware type to see what is compatible and available.

**Can I use this to see my Balena API keys?**
Yes, the Connector can list your active API keys, helping you manage your credentials and organization access more easily.

**How does Balena MCP help with IoT fleet monitoring?**
It provides a direct way to check the health and status of your entire fleet, letting you see which devices are online or offline without manual searching.

**How can I find a specific device using its UUID?**
You can use the `list_devices` tool with an OData filter. For example, provide `$filter` as `uuid eq ''` to retrieve the exact device metadata.

**Is it possible to update a device's environment variables through the AI?**
Yes! Use the `create_device_env_var` tool by providing the Device ID, the variable name, and the desired value. The AI will apply the change to the specific device immediately.

**How do I get the download link for a specific balenaOS version?**
First, use `list_os_versions` to find the correct version string for your device type. Then, call `get_os_download_url` with the device type and version to receive the direct ZIP download URL.