list_devicesLABSCO 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
enabledflag 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
USE CASES
Turning something on, or checking whether it is
Filter devices by room or capability, then read the status or send the command. Two calls, and no hunting through an app's device list for the right lamp.
Working out why a device is not responding
Read its health and connectivity before assuming the automation is broken. A device that has dropped off the network fails differently from one that has an outdated capability, and this tells the two apart.
Switching the house into a different mode
Read which modes the location has and which is active, then change it. Modes are what most SmartThings automations key off, so this one call moves a lot of behaviour at once.
Writing an automation without the app
Create a rule with its conditions and actions, then trigger it by hand to see it fire before leaving it to run on its own. Rules need an Enterprise account's scopes.
Turning an automation off for a while
Update the rule with enabled set to false rather than deleting it. The rule survives the holiday, the renovation or the guest, and comes back with one call.
Organising devices into rooms
Create the rooms, then move devices into them so later filtering by room actually works. Worth doing once, and much faster from a conversation than from a phone.
37 tools
Listed in project docs. Your client may show a different list.
get_deviceupdate_devicedelete_deviceexecute_commandget_device_statusget_device_componentsget_device_capabilitiesget_device_healthget_device_presentationlist_locationsget_locationcreate_locationupdate_locationdelete_locationget_location_roomslist_roomsget_roomcreate_roomupdate_roomdelete_roomlist_modesget_modeget_current_modeset_modelist_scenesget_sceneexecute_scenecreate_sceneupdate_scenedelete_scenelist_rulesget_rulecreate_ruleupdate_ruledelete_ruleexecute_ruleBEFORE YOU INSTALL
What to know first
Tools you get
37 tools named in the project's documentation.
Requires
Python 3.8 or higher
INSTALLATION
Connect your client
Server setup
git clone https://github.com/technohead/smartthings-mcp
cd smartthings-mcp
pip install -r requirements.txtObtain a SmartThings API Token from https://developer.smartthings.com/ with the r:devices:* / w:devices:* / r:locations:* / w:locations:* / r:rules:* / w:rules:* / r:scenes:* / x:scenes:* scopes
python SmartThingsMCPServer.py -auth <YOUR_TOKEN>Connect your MCP client to http://localhost:8000/mcp as a streamable HTTP server