服务与工具

米家智能家居

米家智能家居 MCP Server - 基于米家API的智能设备控制工具,支持设备发现、属性读写、动作调用、场景管理等功能

OAuth

24 个可用工具

get_server_status

Get server status information Returns: JSON string of server status

batch_set_properties

Batch set device properties Args: operations: Operation list, each operation contains device_id, siid, piid, value Returns: JSON string of batch operation result

call_action

Call device action Args: device_id: Device ID siid: Service instance ID aiid: Action instance ID params: Action parameter list (optional) Returns: JSO…

cancel_qr_login

Cancel ongoing QR code login process Call this to abort the QR login process if no longer needed. Returns: JSON string containing: - success: bool - m…

check_qr_login_status

Check if QR code has been scanned and login is complete Call this after start_qr_login to check if user has completed scanning. Uses short timeout to avoid blocking. Call repeatedly until…

clear_cache

Clear resource cache Returns: JSON string of clear result

clear_status_cache

Clear device status cache Returns: JSON string of clear result

connect

Connect to Mijia cloud service Returns: JSON string of connection result

disconnect

Disconnect from Mijia cloud service Returns: JSON string of disconnection result

discover_devices

Discover Mijia devices Returns: JSON string of device list

get_cached_device_status

Get cached device status Args: device_id: Device ID, if empty returns all cached status Returns: JSON string of cached status

get_consumable_items

Get consumable items for a specific home Args: home_id: Home ID owner_id: Owner ID (optional, for shared homes) Returns: JSON string of consumable items list

get_device_actions

Get device available actions Args: device_id: Device ID Returns: JSON string of device action list

get_device_properties

Get device properties Args: device_id: Device ID Returns: JSON string of device properties

get_device_status

Get device status information Args: device_id: Device ID Returns: JSON string of device status

get_homes

Get home list Returns: JSON string of home list

get_property_value

Get device property value Args: device_id: Device ID siid: Service instance ID piid: Property instance ID Returns: JSON string of property value

get_scenes_list

Get scene list for a specific home Args: home_id: Home ID Returns: JSON string of scene list

ping

Test server connectivity Args: message: Message to send Returns: JSON string of response message

refresh_all_device_status

Refresh all device status Returns: JSON string of all device status

run_scene

Run a specific scene Args: scene_id: Scene ID Returns: JSON string of execution result

search_devices

Search and filter devices Args: query: Search keywords (device name or model) device_type: Device type filter online_only: Whether to show only online devices Returns…

set_property_value

Set device property value Args: device_id: Device ID siid: Service instance ID piid: Property instance ID value: Value to set Returns: JSON string of …

start_qr_login

Start QR code login process (non-blocking) This initiates the QR code login and immediately returns the QR code URL. The user can scan the QR code using Mi Home app, then call check_qr_lo…