Skip to main content

MCP Smart Home Gateway for AI Agents - Control Xiaomi, Tuya, Midea, eWeLink devices via MCP protocol

Project description

FeyaGate — MCP Smart Home Gateway for AI Agents

中文 | English

MCP PyPI AI Agents IoT Platforms

Let your AI coding assistant control smart home devices — lights, cameras, AC, speakers — directly through MCP protocol.

Website: www.feyagate.com


Features

  • Multi-platform IoT control — Xiaomi/Mi Home, Tuya, Midea, eWeLink, Serial, GPIO
  • Camera P2P streaming — real-time snapshots, AI vision analysis
  • Xiao AI speaker — TTS, music playback, voice commands
  • Automation — scheduled tasks, trigger engine, room management
  • Memory system — persistent notes and long-term memory for AI agents
  • 8 AI agents supported — Claude Code, Cursor, OpenClaw, Hermes, Codex, Windsurf, Copilot, 小智AI

Install — 3 Steps

pip install feyagate-skill    →    feyagate setup    →    feyagate start

That's it. Then authorize your smart home account:

feyagate auth                 # Xiaomi OAuth (interactive)

Linux may need system deps first: sudo apt-get install -y libfmt8 libmosquitto1 libyaml-cpp0.7

Connect to Your AI Agent

One command per agent. Restart the agent after install.

Agent Command
Claude Code feyagate install-claude
Cursor feyagate install-cursor
OpenClaw feyagate install-openclaw
Hermes feyagate install-hermes
Codex feyagate install-codex
Windsurf feyagate install-windsurf
Copilot feyagate install-copilot

CLI Commands

Action Command
Install binary feyagate setup [--dir PATH]
Start feyagate start [--port PORT]
Stop feyagate stop
Restart feyagate restart [--port PORT]
Status feyagate status
Logs feyagate log [-n 50]
Auth Xiaomi feyagate auth [--status] [--code CODE]
Camera snapshot feyagate snapshot --list / --camera-id DID --connect --count 3
Scheduled analysis feyagate scheduled --camera-id DID --interval 300 --auto-connect
Upgrade server feyagate upgrade
Upgrade package pip install --upgrade feyagate-skill

MCP Tools at a Glance

Category Tools
Device Discovery device/list device/specs platform/status gateway/info
Xiaomi xiaomi/get_properties xiaomi/set_property xiaomi/execute_action
Xiaomi Auth xiaomi/auth_url xiaomi/auth_callback xiaomi/auth_status
Xiao AI Speaker xiaoai/tts xiaoai/play_music xiaoai/control
Camera xiaomi/camera_list xiaomi/camera_connect xiaomi/camera_snapshot xiaomi/camera_vision_chat
Tuya tuya/get_properties tuya/set_property auth/tuya_qr
Midea midea/get_properties midea/set_property midea/execute_action auth/midea_login
eWeLink ewelink/get_properties ewelink/set_property ewelink/execute_action auth/ewelink_login
Scenes scene/list scene/trigger
Rooms room/list room/set_device
Schedule schedule/add schedule/list schedule/get schedule/update schedule/delete
Trigger trigger/create trigger/list trigger/toggle trigger/logs
Memory memory/read memory/add memory/search memory/note memory/today
Serial / GPIO serial/* gpio/*

Full API docs: SKILL.md | QUICKSTART.md

How It Works

┌─────────────┐     MCP Protocol      ┌──────────────────┐     MIOT/DP/etc     ┌──────────┐
│  AI Agent   │ ◄──────────────────► │  feyagate server  │ ◄──────────────────► │  IoT     │
│ (Claude etc)│   localhost:38080     │  (miloco-mcp)     │                      │  Devices │
└─────────────┘                       └──────────────────┘                      └──────────┘

AI agents call MCP tools → FeyaGate translates to platform-specific protocols → devices respond.

Let AI Install For You

Copy-paste this prompt to your AI assistant:

Please read https://github.com/toddpan/feyagate-skill/blob/main/QUICKSTART.md and follow the instructions to install and set up FeyaGate Skill on my machine.

License

MIT License


功能特点

  • 多平台 IoT 控制 — 小米/米家、涂鸦 Tuya、美的 Midea、eWeLink、串口、GPIO
  • 摄像头 P2P 实时监控 — 抓拍、AI 视觉分析
  • 小爱音箱控制 — TTS 语音播报、音乐播放、语音指令
  • 自动化 — 定时任务、触发引擎、房间管理
  • 记忆系统 — 持久化笔记和长期记忆
  • 支持 8 款 AI 助手 — Claude Code、Cursor、OpenClaw、Hermes、Codex、Windsurf、Copilot、小智AI

安装 — 3 步

pip install feyagate-skill    →    feyagate setup    →    feyagate start

搞定。然后授权你的智能家居账号:

feyagate auth                 # 小米 OAuth 授权(交互式)

Linux 可能需要先装系统依赖:sudo apt-get install -y libfmt8 libmosquitto1 libyaml-cpp0.7

接入 AI 助手

一条命令搞定,装完重启 AI 助手即可。

AI 助手 命令
Claude Code feyagate install-claude
Cursor feyagate install-cursor
OpenClaw feyagate install-openclaw
Hermes feyagate install-hermes
Codex feyagate install-codex
Windsurf feyagate install-windsurf
Copilot feyagate install-copilot

命令速查

操作 命令
安装二进制 feyagate setup [--dir PATH]
启动 feyagate start [--port PORT]
停止 feyagate stop
重启 feyagate restart [--port PORT]
状态 feyagate status
日志 feyagate log [-n 50]
小米授权 feyagate auth [--status] [--code CODE]
摄像头抓拍 feyagate snapshot --list / --camera-id DID --connect --count 3
定时分析 feyagate scheduled --camera-id DID --interval 300 --auto-connect
升级服务器 feyagate upgrade
升级包 pip install --upgrade feyagate-skill

MCP 工具一览

类别 工具
设备发现 device/list device/specs platform/status gateway/info
小米控制 xiaomi/get_properties xiaomi/set_property xiaomi/execute_action
小米授权 xiaomi/auth_url xiaomi/auth_callback xiaomi/auth_status
小爱音箱 xiaoai/tts xiaoai/play_music xiaoai/control
摄像头 xiaomi/camera_list xiaomi/camera_connect xiaomi/camera_snapshot xiaomi/camera_vision_chat
涂鸦 tuya/get_properties tuya/set_property auth/tuya_qr
美的 midea/get_properties midea/set_property midea/execute_action auth/midea_login
易微联 ewelink/get_properties ewelink/set_property ewelink/execute_action auth/ewelink_login
场景 scene/list scene/trigger
房间 room/list room/set_device
定时 schedule/add schedule/list schedule/get schedule/update schedule/delete
触发器 trigger/create trigger/list trigger/toggle trigger/logs
记忆 memory/read memory/add memory/search memory/note memory/today
串口 / GPIO serial/* gpio/*

完整文档:SKILL.md | QUICKSTART.md

工作原理

┌─────────────┐     MCP 协议       ┌──────────────────┐    MIOT/DP 等     ┌──────────┐
│  AI 助手    │ ◄───────────────► │  feyagate 服务器  │ ◄───────────────► │  IoT     │
│ (Claude 等) │  localhost:38080  │  (miloco-mcp)     │                   │  设备    │
└─────────────┘                    └──────────────────┘                   └──────────┘

AI 助手调用 MCP 工具 → FeyaGate 翻译为各平台协议 → 设备响应。

让 AI 帮你安装

复制以下提示词发给你的 AI 助手:

请阅读 https://github.com/toddpan/feyagate-skill/blob/main/QUICKSTART.md 并按照指南在我的机器上安装和配置 FeyaGate Skill。

许可证

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

feyagate_skill-1.2.4.tar.gz (41.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

feyagate_skill-1.2.4-py3-none-any.whl (35.8 kB view details)

Uploaded Python 3

File details

Details for the file feyagate_skill-1.2.4.tar.gz.

File metadata

  • Download URL: feyagate_skill-1.2.4.tar.gz
  • Upload date:
  • Size: 41.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for feyagate_skill-1.2.4.tar.gz
Algorithm Hash digest
SHA256 b686e43f244b803fe89eb50f4cf33c1bc563265cfdcf6ad4c710fb20bf5bde0d
MD5 7dd6e677acf85e30f0d497c40ffb843e
BLAKE2b-256 08e87ea1280aa893a34365cb5b0bfb442f090276b3f28d7f9ba8fcc96f831e4f

See more details on using hashes here.

File details

Details for the file feyagate_skill-1.2.4-py3-none-any.whl.

File metadata

  • Download URL: feyagate_skill-1.2.4-py3-none-any.whl
  • Upload date:
  • Size: 35.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for feyagate_skill-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a5915ea1d1600fe715b4e32f4786eced63121f66ae722430a86f0cbb613bbe8a
MD5 b21f144c0a56fa5f6c7e2e1e20ee06ad
BLAKE2b-256 fd8f655285586f760cd98c9d9d9351ac2b44ced6a52e3b669d9217af389d491e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page