Skip to main content
Glama
handsomejustin

Xiaomi smart home MCP server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MIJIA_TOKENYesAccess token obtained from login or API
MIJIA_API_URLYesThe base URL of the mijia-control API server, e.g. http://127.0.0.1:5000/api

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
list_devicesA

列出所有米家智能设备。返回设备ID、名称、型号、在线状态等信息。

Args:
    home_id: 按家庭ID过滤,不传则返回全部设备
    refresh: 是否强制刷新设备列表缓存
get_deviceA

获取设备详情,包含设备规格、可用属性列表和动作列表。

Args:
    did: 设备ID
get_propertyB

读取设备属性值,例如灯光亮度、空调温度、开关状态等。

Args:
    did: 设备ID
    prop_name: 属性名称,如 power、brightness、temperature
set_propertyA

设置设备属性值,用于控制设备。例如开灯、调亮度、设温度等。

Args:
    did: 设备ID
    prop_name: 属性名称,如 power、brightness、temperature
    value: 属性值,类型取决于属性定义。常见值:power 为 "on"/"off",brightness 为 0-100,temperature 为数字
run_actionC

执行设备动作,例如扫地机开始清扫、播放音乐等。

Args:
    did: 设备ID
    action_name: 动作名称,如 start-sweep、stop-sweeping
    value: 动作参数,可选
list_scenesA

列出所有米家场景。

Args:
    home_id: 按家庭ID过滤
    refresh: 是否强制刷新缓存
run_sceneC

执行一个米家场景,触发该场景中预设的所有设备操作。

Args:
    scene_id: 场景ID
list_homesB

列出所有家庭及其设备概览。

Args:
    refresh: 是否强制刷新缓存
get_homeB

获取家庭详情,包含该家庭下的所有设备列表。

Args:
    home_id: 家庭ID
list_ble_devicesA

列出所有已注册的蓝牙传感器设备,返回设备信息和最新温湿度读数。

get_ble_sensorB

获取蓝牙传感器的最新温湿度数据和设备详情。

Args:
    did: BLE 设备ID,如 blt.3.xxxxx
get_ble_readingsA

查询蓝牙传感器的历史温湿度读数,用于趋势分析。

Args:
    did: BLE 设备ID
    hours: 查询最近多少小时的数据,默认 24
    limit: 最大返回条数,默认 100

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/handsomejustin/mijia-control'

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