home / mcp / oxii smart home mcp server

OXII Smart Home MCP Server

Exposes OXII smart home controls via MCP over SSE for chatbots and MCP clients.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "baobao112233-mockup-mcp": {
      "url": "http://host.docker.internal:9031/sse",
      "headers": {
        "HOST": "0.0.0.0",
        "PORT": "9031",
        "DEBUG": "true",
        "OXII_PHONE": "+1234567890",
        "OXII_COUNTRY": "US",
        "OXII_BASE_URL": "https://api.oxii.example.com",
        "OXII_PASSWORD": "YOUR_PASSWORD"
      }
    }
  }
}

You can expose and control OXII smart home devices through an MCP server that speaks the Model Context Protocol. The server runs as an SSE endpoint and integrates with a chatbot or any MCP-compatible client, enabling device listing, switching, AC control, cron-based actions, and room-wide presets.

How to use

Use an MCP client (such as your chatbot or a dedicated MCP client) to connect to the server through the SSE endpoint. You can perform actions like listing devices, turning switches on or off, adjusting air conditioners, scheduling cronjobs, and running one-touch presets for rooms or the entire house. Start the server, ensure the channel is reachable, and then issue the available MCP tool calls with the required tokens and identifiers.

How to install

Prerequisites: Python 3.10 or newer (Poetry will manage dependencies) or Docker Engine 20.10+. You also need OXII account credentials with device access and network access to the OXII API.

Step by step commands and setup paths you will use include the following. Run these in your terminal from your project directory.

How to install

Prerequisites: Python 3.10+ (Poetry will manage dependencies) or Docker Engine 20.10+. You also need OXII account credentials with device access and network access to the OXII API.

Step 1: Prepare environment file from the sample.

Available tools

get_device_list

List homes, rooms, devices, and remote buttons. Returns the device catalog for subsequent actions.

switch_device_control

Toggle SH1/SH2 relay devices. Provides control over individual hardware relays.

control_air_conditioner

Full air conditioner control including mode, temperature, and fan speed.

create_device_cronjob

Add, update, or remove cronjobs for switches or AC to automate actions.

one_touch_control_all_devices

Execute a house-wide preset such as turning all devices on or off.

one_touch_control_by_type

Toggle devices by type (e.g., LIGHT, CONDITIONER) within a house.

room_one_touch_control

Run a preset for a single room.