Skip to main content

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
  • Camera P2P streaming — real-time snapshots, AI vision analysis
  • Xiao AI speaker — TTS, music playback, voice commands
  • Automation — scheduled tasks, trigger engine
  • Dynamic skills — load, create, and hot-reload skill documents at runtime
  • 8 AI agents supported — Claude Code, Cursor, OpenClaw, Hermes, Codex, Windsurf, Copilot, 小智AI

🚀 Quick Start

Prerequisites: Mac / Linux / Windows · Python 3.9+ · Terminal or PowerShell


🤖 Install & Configure via AI Agent (Recommended)

The easiest way — send this to Claude Code or any AI coding agent, and it will handle the entire installation and configuration for you:

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.

Supported AI agents: Claude Code, Cursor, OpenClaw, Hermes, Codex, Windsurf, Copilot, 小智AI


Option 1 — One command (curl)

Mac / Linux — open Terminal (Spotlight: type Terminal):

curl -fsSL https://raw.githubusercontent.com/toddpan/feyagate-skill/main/scripts/install.sh | bash

Windows — open PowerShell, paste and run:

iwr -useb https://raw.githubusercontent.com/toddpan/feyagate-skill/main/scripts/install.ps1 | iex

No Python yet? Install from python.org and check Add Python to PATH on Windows.

Option 2 — Install from PyPI (step by step)

pip install feyagate-skill    # 1. Install the CLI tool
feyagate setup              # 2. Download the gateway binary (~30MB)
feyagate start              # 3. Start the service
feyagate install-cursor     # 4. Connect your AI assistant (pick one)
feyagate auth               # 5. Sign in to Mi Home

Option 3 — Install from source (developers)

git clone https://github.com/toddpan/feyagate-skill.git
cd feyagate-skill
pip install -e ".[dev]"     # Editable install with dev dependencies (pytest, etc.)
feyagate setup
feyagate start
feyagate install-cursor     # or install-claude, install-hermes, etc.
feyagate auth

After install — connect your AI assistant

Your AI assistant Run this command
Cursor feyagate install-cursor
Claude Code feyagate install-claude
OpenClaw feyagate install-openclaw
Codex feyagate install-codex
Windsurf feyagate install-windsurf
Copilot (VS Code) feyagate install-copilot
Hermes feyagate install-hermes

Then restart your AI assistant and try: "List my smart home devices."

CLI Commands

Action Command
Install gateway feyagate setup
Start / stop feyagate start · feyagate stop
Restart feyagate restart
Status / logs feyagate status · feyagate log [-n 50]
Mi Home login feyagate auth
Camera snapshot feyagate snapshot --list · feyagate snapshot --camera-id ID --connect
Scheduled capture feyagate scheduled --camera-id ID --interval 300
Version feyagate --version
Update feyagate update or pip install --upgrade feyagate-skill

MCP Tools at a Glance

Category Tools
Device Discovery device/list device/specs auth/platforms gateway/info
Xiaomi get_xiaomi_device_properties set_xiaomi_device_property execute_xiaomi_device_action xiaomi/scene_*
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 / Midea / eWeLink get_*_device_properties set_*_device_property + auth/* login helpers
Scenes / Schedule xiaomi/scene_* schedule/* trigger/*
Dynamic Skills skill/list skill/read skill/create skill/update skill/delete skill/reload

Full API reference: SKILL.md · FeyaGate_MCP_API.md · FeyaGate_HTTP_API.md

How It Works

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

Development

git clone https://github.com/toddpan/feyagate-skill.git
cd feyagate-skill
pip install -e ".[dev]"
pytest                        # run all tests
pytest tests/test_cli.py      # run single file
pytest tests/test_cli.py::TestClass::test_method  # run single test
bash scripts/build.sh         # build PyPI package (outputs to dist/)
bash scripts/publish.sh pypi  # publish to PyPI (requires PYPI_TOKEN env var)

Tests use pytest with unittest.mock. Each module has a corresponding test file in tests/ (e.g. test_cli.py, test_service.py, test_installer.py).

License

MIT License


功能特点

  • 多平台智能家居 — 小米/米家、涂鸦、美的、易微联
  • 摄像头 — 实时抓拍、AI 视觉分析
  • 小爱音箱 — 语音播报、放音乐、语音控制
  • 自动化 — 定时任务、触发器
  • 动态技能 — 运行时加载、创建、热更新技能文档
  • 支持 8 款 AI 助手 — Cursor、Claude Code、OpenClaw、Codex、Windsurf、Copilot、Hermes、小智AI

🚀 快速开始

准备: 一台 Mac / Linux / Windows 电脑 · 已安装 Python 3.9+ · 能打开「终端」或 PowerShell


🤖 让 AI 帮你安装和配置(推荐)

最简单的方式 — 把下面这段话发给 Claude Code 或任意 AI 编程助手,它会自动帮你完成所有安装和配置:

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

支持的 AI 助手:Cursor、Claude Code、OpenClaw、Codex、Windsurf、Copilot、Hermes、小智AI


方式一:一条命令自动安装

Mac / Linux — 打开「终端」(Mac 可按 Command + 空格,搜索「终端」):

curl -fsSL https://raw.githubusercontent.com/toddpan/feyagate-skill/main/scripts/install.sh | bash

Windows — 打开 PowerShell,粘贴并运行:

iwr -useb https://raw.githubusercontent.com/toddpan/feyagate-skill/main/scripts/install.ps1 | iex

还没有 Python?到 python.org 下载安装;Windows 安装时务必勾选 Add Python to PATH

方式二:从 PyPI 安装(逐步执行)

pip install feyagate-skill    # 1. 安装命令行工具
feyagate setup              # 2. 下载网关程序(约 30MB,需联网)
feyagate start              # 3. 启动服务
feyagate install-cursor     # 4. 接入 AI 助手(按下表选一个)
feyagate auth               # 5. 登录小米账号

方式三:从源码安装(开发者)

git clone https://github.com/toddpan/feyagate-skill.git
cd feyagate-skill
pip install -e ".[dev]"     # 可编辑安装,含开发依赖(pytest 等),代码修改即时生效
feyagate setup
feyagate start
feyagate install-cursor     # 或 install-claude、install-hermes 等
feyagate auth

装好之后 — 让 AI 助手认识 FeyaGate

你用的 AI 助手 运行这条命令
Cursor feyagate install-cursor
Claude Code feyagate install-claude
OpenClaw feyagate install-openclaw
Codex feyagate install-codex
Windsurf feyagate install-windsurf
Copilot(VS Code) feyagate install-copilot
Hermes feyagate install-hermes

完成后 重启你的 AI 助手,试着说:「列出我家的智能设备」。

常用命令

想做什么 命令
下载/更新网关程序 feyagate setup
启动 / 停止 feyagate start · feyagate stop
重启 feyagate restart
查看状态 / 日志 feyagate status · feyagate log [-n 50]
登录米家 feyagate auth
摄像头抓拍 feyagate snapshot --list · feyagate snapshot --camera-id ID --connect
定时抓拍分析 feyagate scheduled --camera-id ID --interval 300
查看版本 feyagate --version
升级 feyagate updatepip install --upgrade feyagate-skill

MCP 工具一览

类别 工具
查设备 device/list device/specs auth/platforms gateway/info
小米控制 get_xiaomi_device_properties set_xiaomi_device_property execute_xiaomi_device_action xiaomi/scene_*
小爱音箱 xiaoai/tts xiaoai/play_music xiaoai/control
摄像头 xiaomi/camera_list xiaomi/camera_connect xiaomi/camera_snapshot xiaomi/camera_vision_chat
涂鸦 / 美的 / 易微联 get_*_device_properties set_*_device_property + auth/* 登录
场景 / 定时 xiaomi/scene_* schedule/* trigger/*
动态技能 skill/list skill/read skill/create skill/update skill/delete skill/reload

完整 API 文档:SKILL.md · FeyaGate_MCP_API.md · FeyaGate_HTTP_API.md

工作原理

┌─────────────┐     MCP 协议       ┌──────────────────┐    各平台协议     ┌──────────┐
│  AI 助手    │ ◄───────────────► │  FeyaGate 网关   │ ◄───────────────► │ 智能设备 │
│ (Cursor 等) │  本机 38080 端口   │                  │                   │ 灯/空调等 │
└─────────────┘                    └──────────────────┘                   └──────────┘

你对 AI 说「开灯」→ AI 调用 FeyaGate → 设备执行。

开发

git clone https://github.com/toddpan/feyagate-skill.git
cd feyagate-skill
pip install -e ".[dev]"
pytest                        # 运行所有测试
pytest tests/test_cli.py      # 运行单个文件
pytest tests/test_cli.py::TestClass::test_method  # 运行单个测试
bash scripts/build.sh         # 打包(输出到 dist/)
bash scripts/publish.sh pypi  # 发布到 PyPI(需设置 PYPI_TOKEN 环境变量)

测试使用 pytest + unittest.mocktests/ 下每个模块对应一个测试文件(如 test_cli.pytest_service.pytest_installer.py)。

许可证

MIT License

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.3.2.tar.gz (57.7 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.3.2-py3-none-any.whl (51.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for feyagate_skill-1.3.2.tar.gz
Algorithm Hash digest
SHA256 6fe1bb9003b6a8c7be7a63391e2a3d35ca64c6f2b75d40fb3dcbced53de2f81b
MD5 b0e82f0e84eb0eea609aa4317c4bdaa6
BLAKE2b-256 97540b2b8eebbebdc96206d35fec43fbb103ac3afa91f04735e38ebb6ef495dd

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for feyagate_skill-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b67e21d112c0c2aaea97cb7e3a0467a1788886b9b6da4978b3539979d5c73687
MD5 293f901cf4b6780dadead8e07f699aea
BLAKE2b-256 6ae588d362c96d7878dadd5ddbd739aab96d493e2462d4ab7e6ae8c7a19dda0f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.3.2 This release

2 files

1.3.1

2 files

1.2.33

2 files

1.2.32

2 files

1.2.31

2 files

1.2.30

2 files

1.2.29

2 files

1.2.27

2 files

1.2.26

2 files

1.2.25

2 files

1.2.24

2 files

1.2.23

2 files

1.2.22

2 files

1.2.21

2 files

1.2.20

2 files

1.2.19

2 files

1.2.18

1 file

1.2.17

1 file

1.2.16

2 files

1.2.8

2 files

1.2.7

2 files

1.2.6

2 files

1.2.5

2 files

1.2.4

2 files

1.2.3

2 files

1.2.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page