melcloud-ac
Controls Mitsubishi Electric AC units through MELCloud, providing tools for listing devices, power control, temperature setting, and smart automatic control.
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., "@melcloud-acset living room to 22 degrees"
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.
MELCloud AC Control (Python CLI + MCP)
Simple project to control Mitsubishi Electric AC units through MELCloud.
Goal
This repository is designed as an LLM-ready execution backend. An LLM/agent can interpret natural language and call this project (CLI or MCP) to perform real AC actions.
It supports:
MELCloud authentication
device listing
power on/off per room
target temperature changes
Related MCP server: BACnet MCP Server
1) Requirements
Python 3.10+
A MELCloud account with configured devices
Install dependencies:
cd integrations/melcloud-ac
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt2) Configuration
Create your local environment file:
cp .env.example .envFill in your credentials:
MELCLOUD_EMAIL=your_email
MELCLOUD_PASSWORD=your_password
MELCLOUD_LANGUAGE=0
# Optional: lock to a specific building/home name
# MELCLOUD_BUILDING=Home⚠️ Never commit
.env.
3) Usage
Option A: CLI (simple)
List devices:
python control_ac.py listPower control:
python control_ac.py power office on
python control_ac.py power office offSet temperature:
python control_ac.py temp office 22Smart automatic control (decides mode + target temperature from room temp):
python control_ac.py auto officeCustom thresholds/targets:
python control_ac.py auto office --cool-above 26 --heat-below 19 --cool-target 23 --heat-target 22 --neutral-target 23 --neutral-mode autoNotes:
Device resolution is alias-free and generic: the client fetches your MELCloud devices and picks the best match (with ambiguity safeguards).
Temperature guardrail in client: 16°C to 31°C.
Option B: MCP server (for LLM clients)
An MCP wrapper is included in mcp_server.py with 4 tools:
list_devices()set_power(room, state)set_temperature(room, value)auto_comfort(room, ...)(smart mode + target temperature selection)
Run MCP server:
python mcp_server.pyExample MCP client configuration (generic):
{
"mcpServers": {
"melcloud-ac": {
"command": "python",
"args": ["/path/to/integrations/melcloud-ac/mcp_server.py"],
"env": {
"MELCLOUD_EMAIL": "...",
"MELCLOUD_PASSWORD": "...",
"MELCLOUD_LANGUAGE": "0"
}
}
}
}Tip: you can either pass env in your MCP client config or rely on local .env.
4) Project structure
melcloud-ac/
├── control_ac.py # Main CLI
├── mcp_server.py # MCP wrapper for LLM tools
├── melcloud_client.py # MELCloud API client (auth + actions)
├── requirements.txt
├── .env.example
└── README.md5) LLM integration examples
Typical flow:
User says: “Turn on office AC”
LLM maps intent to action (
power on,room=office)LLM executes CLI or MCP tool
LLM returns a friendly response
Natural language → CLI mapping examples:
“Turn on office AC”
python control_ac.py power office on
“Turn off living room AC”
python control_ac.py power sala off
“Set office AC to 22 degrees”
python control_ac.py temp office 22
“What devices are available?”
python control_ac.py list
Quick Python wrapper example:
import json
import subprocess
def ac_command(*args: str) -> dict:
proc = subprocess.run(
["python", "control_ac.py", *args],
capture_output=True,
text=True,
check=False,
)
try:
return json.loads(proc.stdout)
except json.JSONDecodeError:
return {"ok": False, "error": proc.stdout or proc.stderr}
print(ac_command("list"))
print(ac_command("power", "office", "on"))
print(ac_command("temp", "office", "22"))Function-calling schema example:
{
"name": "ac_control",
"description": "Control MELCloud AC by room",
"parameters": {
"type": "object",
"properties": {
"action": { "type": "string", "enum": ["list", "power", "temp"] },
"room": { "type": "string" },
"state": { "type": "string", "enum": ["on", "off"] },
"value": { "type": "number" }
},
"required": ["action"]
}
}6) Quick troubleshooting
Login error: verify email/password and MELCloud account.
Room not found: run
python control_ac.py listand use the exact device name.Network timeout: check connectivity and MELCloud availability.
7) Next improvements (optional)
consolidated status command
mode support (
heat/cool/auto) and fan speedautomated tests (requests mocking)
This server cannot be installed
Maintenance
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
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/vascosilvaa/melcloud-ac'
If you have feedback or need assistance with the MCP directory API, please join our Discord server