With eWeLink MCP Server (V5.22, Prime), you can connect MCP-compatible AI clients and agents to your eWeLink account and control supported smart devices with simple, natural-language commands. Built on the Model Context Protocol (MCP), it bridges advanced AI assistants and your IoT devices—so you can query what’s on, check device status, and trigger actions through a conversational interface.
This step-by-step guide covers the full setup: enabling MCP Server in the app, generating your MCP URL, connecting it in Cursor, and running a few simple prompts to confirm it’s working.

Step-by-Step Setup Guide
Step 1: Enable MCP Server in eWeLink App
- Open the eWeLink app.
- Go to: Profile → Pilot Features → MCP Server
Step 2: Generate Your MCP Server URL (and Control Access)
After entering the MCP Server page, you’ll see access management options:
- Copy URL
Copy your MCP server URL and paste it into your AI client’s MCP configuration. - Refresh Token
Create a new URL if the current one expires. - Revoke Authorization
Immediately block AI access. Use this anytime you want to shut off all connected AI clients for privacy/security.
Best practice: If you ever suspect the URL was shared or exposed, use Revoke Authorization, then generate a fresh URL.
Step 3: Configure Your AI Client (Example: Cursor)
- Get Cursor: Download Cursor and sign up/log in to your account

- Access Settings: Open Cursor and go to Settings → Tools & MCP → Add Custom MCP

- Add Server: Create a new entry with this JSON format:
{
"mcpServers": {
"ewelink": {
"type": "http",
"url": "PASTE_YOUR_eWeLink_MCP_SERVER_URL_HERE"
}
}
}
- Save & Restart: Save your configuration and open a new chat/agent session

Recommended: Turn on the Auto option in the toolbar. MCP support can vary across agent modes, and Auto helps select the most suitable one.
Testing Your Setup
Once configured, try these conversation starters with your AI assistant:
- “How many devices do I have?”
- “Show me which devices are currently switched on.”
- “Turn on the living room switches.”
Compatibility Notes and Current Limitations
This is an initial release, so expect a few boundaries:
- Only supported devices appear in device query results.
If a device isn’t supported yet, the AI client won’t list it or control it via MCP. - Different AI agent modes can behave differently.
The same prompt may succeed in one mode and fail in another. If you have issues, try Auto mode or switch modes.
Currently Supported Devices
The initial rollout focuses on switches and plugs, including popular models like
Device Type | Eligible Device Models (Examples) |
Single-Channel Plug | SONOFF BASIC_R3 SONOFF MINI SONOFF RF_R2 SONOFF S20R1 SONOFF S26 SONOFF S31 Lite SONOFF S55R1 SONOFF S30 AIB-xU1 CKCP-001 |
Single-Channel Plug_Support 2.4G eWeLink-Remote | SONOFF BASICR4 SONOFF MINIR3 SONOFF MINIR4 SONOFF S40 lite CK-BL602-4SW-AY |
DIY Smart Switch | SONOFF Basic SONOFF RF SONOFF SV |
Single-Channel Switch | SONOFF RF R2 SONOFF T1 1C SONOFF Touch SONOFF TX1C |
Four-Channel Plug | SONOFF 4CH |
Power detection Plug | SONOFF IW100_US SONOFF IW101_US SONOFF Pow R2 SONOFF POWR3 SONOFF S31 PSA-X67-GL |
Three-Channel Switch | SONOFF T1 3C SONOFF TX3C |
Dual-Channel Switch | SONOFF T1 2C SONOFF TX2C |
Temp & Humi Monitoring Smart Switch | SONOFF S22_CN SONOFF TH10 SONOFF TH16 PSA-BHA-GL |
Dual-Channel Plug | SONOFF DUALR2 |
Power Monitoring Plug Overload Alert – Multi-Channel Protocols | SONOFF S40 SONOFF S40TPA SONOFF S40TPB |
(POWCT)POWR3 – with LCD Screen | SONOFF POWCT SONOFF POWR316 SONOFF POWR320D SONOFF S60TPF SONOFF S60TPG |
Temperature & Humidity Monitoring Switch_Support with History Feature | SONOFF TH16R3 SONOFF THR316 SONOFF THR320 SN-ESP32D0-THR3-01 |
Single-Channel Plug-Multi-channel version | SONOFF Micro |
Four-Channel Plug_Support 2.4G eWeLink-Remote | BL1-S04-01 CK-BL602-4SW-HS |
Troubleshooting & Tips
- URL Not Working? Try generating a new token in the eWeLink app
- Devices Missing? Check if your device model is in the supported list above
- Commands Not Executing? Ensure you’re in a compatible AI mode (use “Auto”)
- Security Concern? Use “Revoke Authorization” immediately, then generate a new URL
You’re all set. Enable the MCP Server in the eWeLink app, connect it to your AI client, and start controlling supported devices with simple, natural-language commands.
What important features are we missing? We’d love to hear from you! Join our discussion here.
Comments
0 comments
Please sign in to leave a comment.