Mysa MCP Server
jrolstad/mysa-mcp
Consulte termostatos Mysa conversacionalmente via Claude
Ver no GitHubServidor MCP que integra termostatos Mysa ao Claude, permitindo consultas conversacionais sobre temperatura ambiente, setpoints e estado dos dispositivos. Funcionalidade somente leitura com cache inteligente e suporte a múltiplos clientes MCP.
Instalação
npx convez-ai jrolstad/mysa-mcp1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Monitorar temperatura e umidade de ambientes em tempo real
- Consultar estado de termostatos durante automações ou fluxos de trabalho
- Integrar dados de aquecimento em sistemas de home automation
Veredito

Integração prática com API reversa do Mysa, bem estruturada com autenticação Cognito e cache eficiente. Limitação clara: somente leitura e sem histórico, mas adequada para monitoramento em tempo real.
README
A tradução para o português deste README ainda está na fila.
mysa-mcp
An MCP (Model Context Protocol) server that wraps the Mysa thermostat cloud API. Query your Mysa thermostats conversationally from Claude Code, Claude.ai, or any MCP-compatible client.
Read-only. This server only fetches data; it never changes a setpoint, mode, or lock.
Mysa has no official public API. This wraps the reverse-engineered endpoints the Mysa mobile app uses (canonical reference: dlenski/mysotherm). They are unsupported and could change without notice.
Tools
| Tool | Description |
|---|---|
get_devices | List thermostats on the account (name, model, time zone, device ID) |
get_current_state | Current state (ambient temp, setpoint, humidity, duty cycle, current/voltage) for all thermostats in one call |
get_device_state | Single-thermostat state — served from the cached all-states response, no extra API call |
get_homes | Homes/locations on the account |
reset_cache | Clear the in-process cache |
Temperatures are in °C. Mysa is heat-only — there is no mode field. A value of -1 means missing/invalid.
Why no historical data?
Mysa's legacy /users/readingsForUser history endpoint currently returns HTTP 500, so there is no working REST source for past readings. The only granular history source is an MQTT/WebSockets stream, which would require a long-lived background collector and a local database — out of scope for this server.
Configuration
MYSA_USERNAME=your_mysa_account_email
MYSA_PASSWORD=your_mysa_account_password
Auth uses AWS Cognito (USER_SRP_AUTH) against the Mysa user pool; tokens are cached in memory and refreshed automatically.
The server keeps an in-process cache with a 5-minute TTL.
Run locally (stdio)
python -m venv .venv
.venv\Scripts\pip install -r requirements.txt
copy .env.example .env # then fill in credentials
.venv\Scripts\python server.py
Connect to Claude Code
Add to ~/.claude.json under mcpServers:
{
"mcpServers": {
"mysa": {
"type": "stdio",
"command": "C:\\code\\rolstad-home-workspace\\repos\\mysa-mcp\\.venv\\Scripts\\python.exe",
"args": ["C:\\code\\rolstad-home-workspace\\repos\\mysa-mcp\\server.py"],
"env": {
"MYSA_USERNAME": "your_mysa_account_email",
"MYSA_PASSWORD": "your_mysa_account_password"
}
}
}
}
Run hosted (HTTP)
Set MCP_TRANSPORT=streamable-http and the server exposes a Streamable HTTP endpoint on PORT (default 8000). The included Dockerfile defaults to this mode.
docker build -t mysa-mcp .
docker run --rm -p 8000:8000 \
-e MYSA_USERNAME=... \
-e MYSA_PASSWORD=... \
mysa-mcp
Project structure
mysa_client.py # Cognito auth + httpx REST client
server.py # FastMCP tool definitions + in-process cache + transport toggle
requirements.txt
Dockerfile # python:3.11-slim, streamable-http transport by default
.env.example