# Golioth MCP

> Golioth MCP connects your AI agent directly to your entire fleet of IoT hardware. You can list projects, register devices, and read real-time sensor data—all from a single conversation. It gives you remote control over everything connected to the Golioth cloud without ever leaving your IDE or chat window.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** iot-management, hardware-control, lightdb, device-fleet, embedded-systems

## Description

Need to manage complex physical hardware? This MCP connects your AI agent directly to your Golioth IoT cloud, giving you full command over your entire connected device fleet. Instead of logging into a separate console and juggling multiple APIs, your agent acts like a universal remote terminal for all your projects.

Use it to list every project or check the status of specific sensors across dozens of devices. You can register new units as they come online, remove old ones, and even read and write real-time data paths—like changing an LED color or adjusting a sensor threshold—using natural conversation. When you connect through Vinkius, your AI client gains access to this entire catalog, meaning you don't have to switch context between different tools just to run diagnostics. It makes monitoring device connectivity and managing credentials as simple as talking to your agent.

## Tools

### create_project
Creates a new container project within the Golioth platform for grouping related devices.

### get_lightdb_state
Retrieves the current, real-time data state from a specified device using LightDB State.

### list_devices
Generates a list of all active hardware units assigned to an existing Golioth project.

### list_projects
Provides a directory listing of every available Golioth project the user has access to.

### register_device
Adds brand new hardware units into an existing project for fleet management.

### remove_device
Decommission a unit by removing it from its assigned Golioth project.

### set_lightdb_state
Writes specific values to a device, allowing you to control settings like thresholds or power states.

## Prompt Examples

**Prompt:** 
```
List all my Golioth projects.
```

**Response:** 
```
I've retrieved your projects. You have access to: 'Smart-Home-Hub' (ID: proj_123) and 'Industrial-Sensors' (ID: proj_456). Which one would you like to explore?
```

**Prompt:** 
```
Show me the devices registered in project proj_123.
```

**Response:** 
```
In project 'Smart-Home-Hub', I found 3 devices: 'Living-Room-Temp', 'Kitchen-Light', and 'Main-Gateway'. All are currently showing as active.
```

**Prompt:** 
```
Set the LightDB state for device 'Kitchen-Light' in project proj_123 at path 'power' to {"on": true}.
```

**Response:** 
```
Successfully updated the LightDB state. The 'power' path for 'Kitchen-Light' is now set to {"on": true}. The device should receive this update immediately.
```

## Capabilities

### List projects
Retrieve a full list of all available Golioth IoT projects.

### Manage devices
Add, remove, or check the status of any hardware unit within a specified project.

### Check sensor data
Read real-time values from specific device paths (like temperature or power status) using LightDB State.

### Control devices
Write new configurations to a device, such as updating an LED color or setting a control threshold.

## Use Cases

### Debugging an intermittent fault
An IoT engineer notices that a remote temperature reading is spiking. They ask their agent, 'Show me the lightdb state for sensor X.' The agent uses `get_lightdb_state` and instantly returns the full history, allowing the engineer to pinpoint if the spike is hardware or software related.

### Setting up a new deployment site
A product manager needs to deploy 50 sensors in a new building. They ask their agent to `create_project` for 'Building Alpha,' and then use `list_devices` repeatedly while running through the registration process with `register_device` until all hardware is accounted for.

### Testing remote actuators
An embedded developer needs to test a relay switch. Instead of wiring up test code, they use their agent to call `set_lightdb_state` on the target device's 'actuator' path and immediately confirm that the command was received and executed.

### Archiving old hardware
The team is retiring an entire sensor array. Rather than logging into the console to delete units, they ask their agent to `list_devices` first for verification, then use `remove_device` on the whole group in one go.

## Benefits

- You eliminate context switching. Instead of jumping between the Golioth Console, a database interface, and your IDE, all device management happens through your agent.
- Real-time control is instant. Use `set_lightdb_state` to change an LED color or adjust a sensor threshold without writing a single API script.
- Manage growth effortlessly. You can use `list_projects` and then `create_project` to structure new deployments simply by asking your agent to do it.
- Full lifecycle control is available. Need to onboard hardware? Use `register_device`. Finished with it? Run `remove_device`—all in one chat session.
- Deep diagnostics are fast. If a sensor acts up, you use `get_lightdb_state` to pull the exact path data and status immediately.

## How It Works

The bottom line is that your natural language instructions trigger specific hardware actions without you ever seeing an API call.

1. Subscribe to this MCP on Vinkius and provide your unique Golioth API Key.
2. Your AI agent connects and authenticates with the IoT cloud platform.
3. You give a conversational command, like 'Check the temperature for Device X' or 'List all projects.' The agent executes the action and reports the data back.

## Frequently Asked Questions

**How do I start with the Golioth MCP?**
You subscribe to this MCP on Vinkius and provide your Golioth API Key. Once connected, you can immediately ask your agent to `list_projects` to see what infrastructure is already set up for you.

**Can I use the Golioth MCP to change sensor values?**
Yes, you can control devices directly. Use the `set_lightdb_state` tool to write specific data paths, like changing an LED color or setting a new operational threshold for any connected unit.

**What is the difference between list_devices and get_lightdb_state in Golioth MCP?**
Listing devices (`list_devices`) tells you which units exist in a project. Getting lightdb state (`get_lightdb_state`) tells you what specific data those existing units are reporting right now.

**Does Golioth MCP support multi-project management?**
Absolutely. You can first use `list_projects` to see every project, and then switch contextually to run commands like `register_device` or `get_lightdb_state` in a different project.

**If I decommission a unit, should I use remove_device?**
Yes. Use the `remove_device` tool when you need to formally take a unit offline and delete its record from the active Golioth project registry.