Sonoff MCP Server
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., "@Sonoff MCP Serverturn on the living room light"
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.
Sonoff MCP Server
A Model Context Protocol server that lets AI agents — Claude Code, claude.ai, or any MCP client — control Sonoff smart-home devices through the eWelink Cloud API. Ask an agent to "turn on the heater" or "what's the temperature in the nursery?" and it calls a real device.
Runs as a remote MCP connector over HTTPS with full OAuth 2.0, so it can be attached to hosted AI clients, not just local ones.
Architecture
AI client (Claude Code / claude.ai)
│ HTTPS + OAuth 2.0 (Authorization Code + PKCE)
▼
reverse proxy ──▶ sonoff-mcp (FastMCP, streamable-http)
│ HTTPS
▼
eWelink Cloud API (CoolKit Open Platform v2)
│
▼
Sonoff devices (THR316D, MINIR4, SV, BASICR2, …)Transport — streamable-http (FastMCP), fronted by a reverse proxy for TLS
Auth — OAuth 2.0 Authorization Code + PKCE between the AI client and the server
Upstream — eWelink Cloud API v2 with its own OAuth token flow
SDK — FastMCP (
mcp[cli]), Python 3.12+,aiohttp
Related MCP server: Nature Remo MCP Server
Tools
Tool | Description |
| All devices with live state (on/off, online, temp/humidity for thermostats) |
| Detailed device info (model, firmware, power, thermostat mode) |
| Turn a device on/off (disables auto mode on thermostats) |
| Current temperature and humidity from a sensor/thermostat |
| Set thermostat mode ( |
Devices are addressed by name (partial, case-insensitive match) or device ID, so an agent can act on "living room lamp" without knowing internal identifiers.
Running
cp .env.example .env # eWelink app + MCP OAuth credentials
docker compose up -d
# then visit /ewelink/setup once to authorize your eWelink accountConfiguration (.env.example):
EWELINK_APP_ID/EWELINK_APP_SECRET— register at dev.ewelink.ccEWELINK_REGION— eWelink data center region (eu,us,as,cn)MCP_CLIENT_ID/MCP_CLIENT_SECRET— OAuth credentials for the MCP clientSERVER_URL— public base URL the connector is served from
Notes
Used in production as the smart-home action layer behind an AI phone assistant — the LLM calls these tools to control devices from a phone call or SMS.
The server capability-detects each device from its eWelink parameters, so switches, thermostats, and sensors are handled through a single unified model.
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.
Related MCP Servers
- Flicense-qualityCmaintenanceEnables AI models to control and query smart home devices (air conditioners, lights, locks, cameras, refrigerators) through a backend API. Supports device control operations, status queries, and detailed device information retrieval with built-in documentation for proper device usage.2
- AlicenseCqualityCmaintenanceEnables you to manage and automate interactions with Nature Remo devices, including listing devices and appliances, and operating TVs and air conditioners through natural language commands.497MIT
- Flicense-qualityBmaintenanceEnables AI agents to control a Cecotec Conga robot vacuum via 26 tools for state, cleaning modes, settings, timers, and system info.1
- AlicenseAqualityDmaintenanceEnables AI assistants to control Tuya/Smart Life smart home devices via tools like on/off, brightness, color, and custom commands.101MIT
Related MCP Connectors
Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.
SaaS intelligence for AI agents. 5 unified tools cover 1,000+ services with 91-96% token savings.
Universal AI API Orchestrator — 1,554 tools, 96 services. One install.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/mrkutin/sonoff-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server