Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
scan_network

Scan network for WeMo devices using pywemo discovery.

This tool scans the specified subnet for WeMo devices by:

  1. Probing all IPs in the subnet on common WeMo ports (49152-49155)

  2. Verifying responsive IPs by attempting to read device descriptions

  3. Using pywemo library to properly identify and parse WeMo devices

Args:

subnet: Network subnet in CIDR notation (default: from config or "192.168.1.0/24")
timeout: Connection timeout in seconds for port probing (default: from config or 0.6)
max_workers: Maximum concurrent workers for network scanning (default: from config or 60)
ctx: MCP context injected by FastMCP; used to elicit the subnet when none is configured

Returns:

Dictionary containing:
- scan_parameters: The parameters used for scanning
- results: Summary with device counts
- devices: List of discovered WeMo devices with full details
list_devices

List all discovered WeMo devices from the cache.

Returns a list of devices that were found in previous network scans. Run scan_network first to populate the device cache.

Returns

Dictionary containing:
- device_count: Number of cached devices
- devices: List of device names and IPs
get_cache_info

Get information about the persistent device cache.

Returns information about the cache file including age, expiration status, and device count. Useful for determining if a rescan is needed.

Returns

Dictionary containing:
- exists: Whether cache file exists
- path: Path to cache file
- age_seconds: Age of cache in seconds
- expired: Whether cache has expired
- device_count: Number of devices in cache
- ttl_seconds: Time-to-live for cache entries
clear_cache

Clear the persistent device cache.

Removes the cache file and clears in-memory cache. Useful when devices have changed or cache is corrupted. Run scan_network after clearing to rebuild the cache.

Returns

Dictionary containing:
- success: Whether cache was cleared successfully
- message: Descriptive message
get_configuration

Get current server configuration.

Returns all configuration settings including network parameters, cache settings, and logging levels. Useful for debugging or verifying environment variable overrides.

Returns

Dictionary containing:
- configuration: All configuration sections
- source: Information about configuration sources (env vars, config file)
get_device_status

Get the current status of a WeMo device.

Retrieves the current state and information for a device by name or IP address. The device must have been discovered via scan_network first.

Args:

device_identifier: Device name (e.g., "Office Light") or IP address (e.g., "192.168.1.100")

Returns:

Dictionary containing:
- device_name: Name of the device
- state: Current state ("on" or "off")
- Additional device information
control_device

Control a WeMo device (turn on, off, toggle, or set brightness).

Controls a device by sending turn on, turn off, or toggle commands. For dimmer devices, you can also set the brightness level (1-100). The device must have been discovered via scan_network first.

Args:

device_identifier: Device name (e.g., "Office Light") or IP address (e.g., "192.168.1.100")
action: Action to perform - must be one of: "on", "off", "toggle", "brightness"
brightness: Brightness level (1-100) - only used when action is "brightness" or "on" for dimmer devices
ctx: MCP context injected by FastMCP; used to elicit the correct device when identifier is ambiguous

Returns:

Dictionary containing:
- success: Boolean indicating if the action succeeded
- device_name: Name of the device
- action_performed: The action that was executed
- new_state: The state after the action
- brightness: Current brightness level (for dimmers)
rename_device

Rename a WeMo device (change its friendly name).

Changes the friendly name of a WeMo device. This is the name that appears in the WeMo app and is used to identify the device. The device must have been discovered via scan_network first.

After renaming, the device cache will be updated with the new name. You may want to run scan_network again to refresh the device list.

Args:

device_identifier: Current device name (e.g., "Office Dimmer") or IP address (e.g., "192.168.1.100")
new_name: New friendly name for the device (e.g., "Office Light")

Returns:

Dictionary containing:
- success: Boolean indicating if the rename succeeded
- old_name: The previous name of the device
- new_name: The new name of the device
- device_ip: IP address of the device
get_homekit_code

Get the HomeKit setup code for a WeMo device.

Retrieves the HomeKit setup code (HKSetupCode) for devices that support HomeKit integration. This code can be used to add the device to Apple Home. The device must have been discovered via scan_network first.

Note: Not all WeMo devices support HomeKit. If a device doesn't support HomeKit or doesn't have a setup code, an error will be returned.

Args:

device_identifier: Device name (e.g., "Office Light") or IP address (e.g., "192.168.1.100")

Returns:

Dictionary containing:
- success: Boolean indicating if the code was retrieved
- device_name: Name of the device
- homekit_code: The HomeKit setup code (format: XXX-XX-XXX)
- device_ip: IP address of the device
show_device_dashboard

Show an interactive WeMo device dashboard inline in the host.

Returns rich HTML showing all cached devices as cards with Toggle / On / Off buttons. Supported in Claude Desktop, VS Code, ChatGPT, Goose and any other MCP Apps-compatible host (spec: SEP-1865).

Text-only fallback: use list_devices instead.

show_device_status_ui

Show a device status card with interactive controls.

Returns rich HTML for a single device showing its name, IP, model, and On / Off / Toggle buttons. Supported in Claude Desktop, VS Code, ChatGPT, Goose and any other MCP Apps-compatible host.

Args:

device_identifier: Device name or IP address.

Text-only fallback: use get_device_status + control_device instead.

Prompts

Interactive templates invoked by user choice

NameDescription
discover-devicesScan the network for WeMo devices and summarise what was found.
device-status-reportGet a full status report of all known WeMo devices.
activate-sceneSet all WeMo devices to match a named scene (e.g. movie night, bedtime, wake up).
troubleshoot-deviceDiagnose and attempt to fix issues with a specific WeMo device.

Resources

Contextual data attached and managed by the client

NameDescription
list_device_resourcesList all discovered WeMo devices as MCP resources. Returns an index of every device currently in the cache, with a URI that can be fetched individually via the device://{device_id} resource. Useful for MCP clients that want to enumerate available devices without calling the scan_network or list_devices tools.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/apiarya/wemo-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server