LabscoMCP early access ↗
technoheadMCP SERVER

SmartThingsMCP

Control SmartThings from the conversation — devices, rooms, modes, scenes, and the automation rules themselves.

by technohead ↗IoT, Smart Home & Embedded HardwareCommunity

LABSCO SUMMARY

It writes automations, not just switches.

Most home connections stop at turning things on and off. This one authors: scenes and rules can be created and edited, and a rule can be disabled without being deleted — the difference between adjusting a home and rebuilding it.

What it is

A FastMCP server over the SmartThings API covering the whole account: devices listed, inspected and commanded; locations and rooms created and edited; the active mode read and changed; scenes run and authored; and automation rules created, updated, enabled, triggered by hand and deleted. Reads are cached on both the client and server side.

What you get

  • Devices listed with filters for capability, location, room or identifier, then read in detail — status, components, capabilities, health and UI presentation (list_devices, get_device, get_device_status, get_device_components, get_device_capabilities, get_device_health, get_device_presentation)
  • A command run against a device component, plus renaming and removal (execute_command, update_device, delete_device)
  • Locations created, updated and deleted with their coordinates and address, and rooms listed, created, renamed and removed (list_locations, create_location, update_location, get_location_rooms, list_rooms, create_room, update_room, delete_room)
  • The modes available at a location, the one currently active, and a change of mode (list_modes, get_mode, get_current_mode, set_mode)
  • Scenes listed, read, executed, and created or edited with their actions, icon and colours (list_scenes, get_scene, execute_scene, create_scene, update_scene, delete_scene)
  • Automation rules read with their conditions and actions, created, updated, run manually, and toggled with the enabled flag instead of deleted (list_rules, get_rule, create_rule, update_rule, execute_rule, delete_rule)
  • Read results cached with a five-minute default and invalidated on writes, on both the client and the server

Requirements

Python 3.8 or newer, and a SmartThings API token created in the developer portal with the scopes for what you intend to do — r:devices:* and w:devices:* to read and control devices, r:locations:* and w:locations:* for locations and modes, r:scenes:* and x:scenes:* for scenes. The rules scopes need an Enterprise SmartThings account; without one, rule calls come back as 403. The token is passed per call. The server runs over HTTP on port 8000 by default, or with -transport sse or -transport stdio.

Setup effort

Build from source