OXII Smart Home MCP Server
Provides comprehensive smart home device control through OXII platform, including device switching, air conditioner management, cronjob scheduling, and room-based automation scenarios
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OXII Smart Home MCP Serverturn off the living room lights"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OXII Smart Home MCP Server
Modern documentation for the device-control MCP stack that pairs with the FastAPI chatbot. Use this guide the same way you would the chatbot docs: it covers setup, commands, tooling, and troubleshooting for standalone MCP development.
🔎 Overview
Purpose | Expose OXII smart home controls (device info, switching, AC, cronjobs, one-touch, room scenarios) via the Model Context Protocol (MCP). |
Transport | Server Sent Events (SSE) on port |
Runtime | Python 3.10+, |
Consumers | The FastAPI chatbot ( |
mcp/oxii-server/
├── main.py # Boots the FastMCP process and registers tools
├── tools/ # Tool implementations (auth, device control, cronjobs…)
├── client.py # Quick demo client for manual testing
├── docker-compose.yml # Containerized runtime (exposes :9031)
└── .env.example # Sample environment for OXII credentials✅ Prerequisites
Python 3.10 or newer (Poetry will manage dependencies), or Docker Engine 20.10+
OXII account credentials with device access (phone, password, country)
Network access to the OXII staging/prod API defined in
OXII_BASE_URL
⚙️ Environment configuration
Create a working copy of the environment file and fill in the secrets:
cp .env.example .envVariable | Description |
| Root URL for the OXII API (staging provided by default). |
| Login used to obtain access tokens. |
| Optional overrides for where the MCP server listens (default |
| Toggle verbose logging ( |
🚀 Running the server
Option 1 – Local Poetry workflow
poetry install
poetry run python main.pyThis starts the server at http://localhost:9031/sse.
Option 2 – Docker Compose
cp .env.example .env # if you have not already
docker compose up --build -dThe compose stack exposes port 9031 on the host. Combine this with the chatbot by pointing OXII_MCP_SERVER_URL to http://host.docker.internal:9031/sse inside the chatbot container.
✅ Verifying the service
1. Use the bundled client
poetry run python client.pySelect a tool from the prompt and provide the required parameters to confirm end-to-end connectivity.
2. Visit the built-in docs UI
Human friendly docs:
http://host.docker.internal:9031/docxMachine readable catalogue:
http://host.docker.internal:9031/docs.json
3. Curl the SSE handshake
curl -N http://localhost:9031/sseYou should see an initial JSON payload describing the MCP capabilities.
🧰 Tool catalogue
Below is a quick reference for each registered MCP tool. All payloads are JSON structures passed through the MCP protocol.
Tool | Purpose | Key parameters |
| List homes, rooms, devices, and remote buttons. |
|
| Toggle SH1/SH2 relay devices. |
|
| Full AC control (mode, temp, fan). |
|
| Add/update/remove cronjobs for switches or AC. |
|
| Execute a house-wide preset (e.g., “turn everything off”). |
|
| Toggle devices by type (LIGHT, CONDITIONER, …). |
|
| Run a single-room preset. |
|
ℹ️ Detailed schemas live in
tools/next to each function. Review those modules for argument validation and API payload shapes.
🔄 Working with the chatbot
Start the MCP server (local or Docker) and ensure port
9031is reachable from the chatbot environment.In
chatbot/.env, setOXII_MCP_SERVER_URL=http://host.docker.internal:9031/ssewhen running the chatbot in Docker.Restart the chatbot container (
docker compose restart app) to apply env changes.Use the chatbot endpoint
POST /ai/agent-oxiiwith a valid OXII token—the agent will automatically call the MCP tools.
🧪 Testing & diagnostics
Unit checks – Run
poetry run pytestif you add tests (seed filetest_tools.pyis available as a template).Token validation – Use
chatbot/test_folders/testing_api.pyto fetch a fresh token before invoking tools.Logs – With
DEBUG=true, the server prints detailed traces for each MCP call. In Docker, view them withdocker compose logs -f oxii-server.
🛠 Troubleshooting
Symptom | Suggested fix |
| The consumer is pointing to |
Authentication failures | Double-check |
Cronjob payload rejected | Ensure the cron expression has 6 fields ( |
AC commands ignored | Some devices require numeric mode/fan values. See constants in |
Docker rebuilds are slow | Use |
📚 Further reading
chatbot/README.mdfor the FastAPI-side integration guide.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/BaoBao112233/Mockup-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server