feyagate-skill 1.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- feyagate_skill-1.2.2/LICENSE +21 -0
- feyagate_skill-1.2.2/PKG-INFO +585 -0
- feyagate_skill-1.2.2/README.md +559 -0
- feyagate_skill-1.2.2/feyagate_skill/__init__.py +9 -0
- feyagate_skill-1.2.2/feyagate_skill/auth.py +133 -0
- feyagate_skill-1.2.2/feyagate_skill/cli.py +212 -0
- feyagate_skill-1.2.2/feyagate_skill/data/SKILL.md +115 -0
- feyagate_skill-1.2.2/feyagate_skill/data/camera_extra_info.yaml +51 -0
- feyagate_skill-1.2.2/feyagate_skill/data/config.yaml.example +17 -0
- feyagate_skill-1.2.2/feyagate_skill/data/skills/automation.md +71 -0
- feyagate_skill-1.2.2/feyagate_skill/data/skills/ewelink.md +115 -0
- feyagate_skill-1.2.2/feyagate_skill/data/skills/extension.md +57 -0
- feyagate_skill-1.2.2/feyagate_skill/data/skills/midea.md +116 -0
- feyagate_skill-1.2.2/feyagate_skill/data/skills/tuya.md +124 -0
- feyagate_skill-1.2.2/feyagate_skill/data/skills/xiaomi.md +94 -0
- feyagate_skill-1.2.2/feyagate_skill/installer.py +303 -0
- feyagate_skill-1.2.2/feyagate_skill/mcp.py +48 -0
- feyagate_skill-1.2.2/feyagate_skill/scheduled.py +134 -0
- feyagate_skill-1.2.2/feyagate_skill/service.py +189 -0
- feyagate_skill-1.2.2/feyagate_skill/snapshot.py +85 -0
- feyagate_skill-1.2.2/feyagate_skill.egg-info/PKG-INFO +585 -0
- feyagate_skill-1.2.2/feyagate_skill.egg-info/SOURCES.txt +25 -0
- feyagate_skill-1.2.2/feyagate_skill.egg-info/dependency_links.txt +1 -0
- feyagate_skill-1.2.2/feyagate_skill.egg-info/entry_points.txt +2 -0
- feyagate_skill-1.2.2/feyagate_skill.egg-info/top_level.txt +1 -0
- feyagate_skill-1.2.2/pyproject.toml +42 -0
- feyagate_skill-1.2.2/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 panzuji
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: feyagate-skill
|
|
3
|
+
Version: 1.2.2
|
|
4
|
+
Summary: MCP Smart Home Gateway for AI Agents - Control Xiaomi, Tuya, Midea, eWeLink devices via MCP protocol
|
|
5
|
+
Author-email: panzuji <598432467@qq.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://www.feyagate.com
|
|
8
|
+
Project-URL: Repository, https://github.com/toddpan/feyagate-skill
|
|
9
|
+
Project-URL: Documentation, https://github.com/toddpan/feyagate-skill#readme
|
|
10
|
+
Keywords: mcp,smart-home,iot,xiaomi,tuya,midea,ewelink,ai-agent,home-automation
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Home Automation
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Requires-Python: >=3.8
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# FeyaGate Skill — MCP Smart Home Gateway for AI Agents
|
|
28
|
+
|
|
29
|
+
[中文](#中文) | [English](#english)
|
|
30
|
+
|
|
31
|
+
**MCP Server** | **Smart Home** | **IoT Gateway** | **AI Agent Skill**
|
|
32
|
+
|
|
33
|
+
[](https://modelcontextprotocol.io)
|
|
34
|
+
[](#)
|
|
35
|
+
[](#)
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
<a id="english"></a>
|
|
40
|
+
|
|
41
|
+
FeyaGate (飞阳网关) is an **MCP (Model Context Protocol) smart home gateway skill** that enables AI agents — **OpenClaw, Claude Code, Hermes, Codex, Windsurf, Copilot, 小智AI** and other AI coding assistants — to directly control smart home devices through a unified MCP interface.
|
|
42
|
+
|
|
43
|
+
Based on [miloco-mcp-server](https://gitee.com/panjyang/miloco-mcp-server), it provides cross-platform device control for **Xiaomi/Mi Home, Tuya, Midea, eWeLink**, camera monitoring with P2P streaming, Xiao AI speaker control, scheduled automation, and persistent memory — all accessible as MCP tools for any compatible AI agent.
|
|
44
|
+
|
|
45
|
+
**Website:** [www.feyagate.com](https://www.feyagate.com)
|
|
46
|
+
|
|
47
|
+
### Supported AI Agents
|
|
48
|
+
|
|
49
|
+
| AI Agent | Status | Integration |
|
|
50
|
+
|----------|--------|-------------|
|
|
51
|
+
| **OpenClaw** | Supported | MCP Skill auto-install |
|
|
52
|
+
| **Claude Code** | Supported | MCP config auto-setup |
|
|
53
|
+
| **Hermes** | Supported | MCP Skill auto-install |
|
|
54
|
+
| **Codex** | Supported | MCP Skill auto-install |
|
|
55
|
+
| **Windsurf** | Supported | MCP config auto-setup |
|
|
56
|
+
| **Copilot** | Supported | MCP config auto-setup |
|
|
57
|
+
| **小智AI (Xiaozhi AI)** | Supported | MCP Skill auto-install |
|
|
58
|
+
| **Cursor** | Supported | MCP config auto-setup |
|
|
59
|
+
|
|
60
|
+
## Project Structure
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
feyagate-skill/
|
|
64
|
+
├── SKILL.md # AI Agent Skill definition (MCP tool descriptions)
|
|
65
|
+
├── README.md # Project README (this file)
|
|
66
|
+
├── QUICKSTART.md # Quick start guide
|
|
67
|
+
├── reference.md # Full MCP API reference
|
|
68
|
+
│
|
|
69
|
+
├── config/ # Config templates (version-controlled)
|
|
70
|
+
│ ├── config.yaml.example # Config example
|
|
71
|
+
│ └── camera_extra_info.yaml # Camera extra info
|
|
72
|
+
│
|
|
73
|
+
├── scripts/ # Management scripts (version-controlled)
|
|
74
|
+
│ ├── install.sh / install.ps1 # One-click online installation
|
|
75
|
+
│ ├── upgrade.sh / upgrade.ps1 # Online upgrade (version compare, backup & rollback)
|
|
76
|
+
│ ├── setup.sh / setup.bat # Auto-detect platform & extract release package
|
|
77
|
+
│ ├── verify.sh / verify.bat # Verify installation integrity
|
|
78
|
+
│ ├── start.sh / start.bat # Start service
|
|
79
|
+
│ ├── stop.sh / stop.bat # Stop service
|
|
80
|
+
│ ├── health_check.sh / .bat # Health check
|
|
81
|
+
│ ├── auth.py # Mi Home OAuth authorization (cross-platform)
|
|
82
|
+
│ ├── snapshot.py # Camera snapshot tool
|
|
83
|
+
│ └── scheduled_analysis.py # Scheduled AI analysis
|
|
84
|
+
│
|
|
85
|
+
├── packages/ # Downloaded release packages (gitignored)
|
|
86
|
+
├── bin/ # Binary files (auto-filled by setup, gitignored)
|
|
87
|
+
├── lib/ # Dynamic libraries (auto-filled by setup, gitignored)
|
|
88
|
+
├── data/ # Runtime data (gitignored)
|
|
89
|
+
└── webui/ # Web UI (auto-extracted by setup, gitignored)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Platform Support
|
|
93
|
+
|
|
94
|
+
| Platform | Release Package | Binary | Libraries |
|
|
95
|
+
|----------|----------------|--------|-----------|
|
|
96
|
+
| macOS Intel | `miloco-mcp-server-*-Darwin-x86_64.tar.gz` | `bin/miloco-mcp-server` | `lib/*.dylib` |
|
|
97
|
+
| macOS ARM | `miloco-mcp-server-*-Darwin-arm64.tar.gz` | `bin/miloco-mcp-server` | `lib/*.dylib` |
|
|
98
|
+
| Linux x86_64 | `miloco-mcp-server-*-Linux-x86_64.tar.gz` | `bin/miloco-mcp-server` | `lib/*.so` |
|
|
99
|
+
| Windows x64 | `miloco-mcp-server-*-Windows-x86_64.zip` | `bin/miloco-mcp-server.exe` | `lib/*.dll` |
|
|
100
|
+
|
|
101
|
+
## Installation
|
|
102
|
+
|
|
103
|
+
### Option 0: Install via AI Assistant (Easiest)
|
|
104
|
+
|
|
105
|
+
Just send the message below to your AI assistant — it will read the guide and install FeyaGate Skill for you automatically.
|
|
106
|
+
|
|
107
|
+
> **Supported AI Agents:** OpenClaw, Claude Code, Hermes, Codex, Windsurf, Copilot, 小智AI, Cursor, and other MCP-compatible AI coding agents.
|
|
108
|
+
|
|
109
|
+
**Copy and paste this prompt:**
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
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.
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The AI assistant will automatically:
|
|
116
|
+
1. Detect your OS and architecture
|
|
117
|
+
2. Run the one-click install script
|
|
118
|
+
3. Configure and start the service
|
|
119
|
+
|
|
120
|
+
### Option 1: One-Click Online Install (Recommended)
|
|
121
|
+
|
|
122
|
+
Automatically fetches the latest version from the server — download, extract, and configure in one step:
|
|
123
|
+
|
|
124
|
+
**macOS / Linux:**
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
curl -fsSL https://raw.githubusercontent.com/toddpan/feyagate-skill/main/scripts/install.sh | bash
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Windows (PowerShell):**
|
|
131
|
+
|
|
132
|
+
```powershell
|
|
133
|
+
iwr -useb https://raw.githubusercontent.com/toddpan/feyagate-skill/main/scripts/install.ps1 | iex
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Custom install directory:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# macOS / Linux
|
|
140
|
+
curl -fsSL https://raw.githubusercontent.com/toddpan/feyagate-skill/main/scripts/install.sh | bash -s -- --dir ~/my-skill
|
|
141
|
+
|
|
142
|
+
# Windows
|
|
143
|
+
$env:FEYAGATE_INSTALL_DIR="D:\my-skill"; iwr -useb https://raw.githubusercontent.com/toddpan/feyagate-skill/main/scripts/install.ps1 | iex
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
The install script automatically:
|
|
147
|
+
1. Fetches the latest version info from [fota.json](https://oneapi.sooncore.com/ota/fota.json)
|
|
148
|
+
2. Clones the feyagate-skill repository (with scripts and config templates)
|
|
149
|
+
3. Downloads the binary release package for your platform and verifies MD5
|
|
150
|
+
4. Extracts the binary to `bin/`, libraries to `lib/`, WebUI to `webui/`
|
|
151
|
+
5. Creates the default `config/config.yaml` and `data/` directory
|
|
152
|
+
|
|
153
|
+
### Option 2: Manual Installation
|
|
154
|
+
|
|
155
|
+
#### Step 1: Clone the Repository
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
git clone https://github.com/toddpan/feyagate-skill.git
|
|
159
|
+
cd feyagate-skill
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
#### Step 2: Download the Release Package
|
|
163
|
+
|
|
164
|
+
**Download from website:** Visit [www.feyagate.com](https://www.feyagate.com) to download the Skill package for your platform, then place it in the `packages/` directory.
|
|
165
|
+
|
|
166
|
+
**Direct download links:**
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# macOS Intel
|
|
170
|
+
curl -L -o packages/miloco-mcp-server-VERSION-Darwin-x86_64.tar.gz \
|
|
171
|
+
"https://oneapi.sooncore.com/ota/feyagate-skill/miloco-mcp-server-VERSION-Darwin-x86_64.tar.gz"
|
|
172
|
+
|
|
173
|
+
# Linux x86_64
|
|
174
|
+
curl -L -o packages/miloco-mcp-server-VERSION-Linux-x86_64.tar.gz \
|
|
175
|
+
"https://oneapi.sooncore.com/ota/feyagate-skill/miloco-mcp-server-VERSION-Linux-x86_64.tar.gz"
|
|
176
|
+
|
|
177
|
+
# Windows x64
|
|
178
|
+
curl -L -o packages/miloco-mcp-server-VERSION-Windows-x86_64.zip \
|
|
179
|
+
"https://oneapi.sooncore.com/ota/feyagate-skill/miloco-mcp-server-VERSION-Windows-x86_64.zip"
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
> Tip: Get the latest version info at https://oneapi.sooncore.com/ota/fota.json (search for `feyagate-skill-*` entries).
|
|
183
|
+
|
|
184
|
+
#### Step 3: Run Setup
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# macOS / Linux
|
|
188
|
+
bash scripts/setup.sh
|
|
189
|
+
|
|
190
|
+
# Windows
|
|
191
|
+
scripts\setup.bat
|
|
192
|
+
|
|
193
|
+
# Or specify a package path
|
|
194
|
+
bash scripts/setup.sh --package /path/to/miloco-mcp-server-*.tar.gz
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
#### Step 4: Configuration
|
|
198
|
+
|
|
199
|
+
Edit `config/config.yaml` to set cloud region and other parameters:
|
|
200
|
+
|
|
201
|
+
```yaml
|
|
202
|
+
server:
|
|
203
|
+
http_port: 38080
|
|
204
|
+
bind_address: "0.0.0.0"
|
|
205
|
+
auth:
|
|
206
|
+
cloud_server: "cn" # cn / de / sg / us / ru / i2
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Start & Authorize
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
bash scripts/start.sh # Start MCP Server
|
|
213
|
+
python3 scripts/auth.py # First-time Mi Home account authorization
|
|
214
|
+
bash scripts/health_check.sh # Verify status
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Service Management
|
|
218
|
+
|
|
219
|
+
| Action | macOS / Linux | Windows |
|
|
220
|
+
|--------|---------------|---------|
|
|
221
|
+
| Install/Extract | `bash scripts/setup.sh` | `scripts\setup.bat` |
|
|
222
|
+
| Verify Installation | `bash scripts/verify.sh` | `scripts\verify.bat` |
|
|
223
|
+
| Start | `bash scripts/start.sh` | `scripts\start.bat` |
|
|
224
|
+
| Stop | `bash scripts/stop.sh` | `scripts\stop.bat` |
|
|
225
|
+
| Health Check | `bash scripts/health_check.sh` | `scripts\health_check.bat` |
|
|
226
|
+
| Custom Port | `bash scripts/start.sh --port 9090` | `scripts\start.bat --port 9090` |
|
|
227
|
+
| Online Upgrade | `bash scripts/upgrade.sh` | `powershell -File scripts\upgrade.ps1` |
|
|
228
|
+
| Check for Updates | `bash scripts/upgrade.sh --check` | `powershell -File scripts\upgrade.ps1 -Check` |
|
|
229
|
+
|
|
230
|
+
## MCP Tool Overview
|
|
231
|
+
|
|
232
|
+
| Category | Tools | Description |
|
|
233
|
+
|----------|-------|-------------|
|
|
234
|
+
| **Device Discovery** | device/list, device/specs, platform/status, gateway/info | Cross-platform device management & status query |
|
|
235
|
+
| **Xiaomi Control** | xiaomi/get_properties, xiaomi/set_property, xiaomi/execute_action | MIOT protocol device read/write & actions |
|
|
236
|
+
| **Xiaomi Auth** | xiaomi/auth_status, xiaomi/auth_url, xiaomi/auth_callback | OAuth authorization management |
|
|
237
|
+
| **Scenes** | scene/list, scene/trigger | Cross-platform scene management |
|
|
238
|
+
| **Xiao AI Speaker** | xiaoai/tts, xiaoai/play_music, xiaoai/control | TTS, music, voice control |
|
|
239
|
+
| **Camera** | xiaomi/camera_list, xiaomi/camera_connect, xiaomi/camera_snapshot, etc. | P2P connection, JPEG capture |
|
|
240
|
+
| **Tuya** | tuya/get_properties, tuya/set_property | Tuya device control |
|
|
241
|
+
| **Midea** | midea/get_properties, midea/set_property, midea/execute_action | Midea device control |
|
|
242
|
+
| **eWeLink** | ewelink/get_properties, ewelink/set_property, ewelink/execute_action | eWeLink device control |
|
|
243
|
+
| **Rooms** | room/list, room/set_device | Room management |
|
|
244
|
+
| **Memory** | memory/read, memory/add, memory/search, memory/note, etc. | Long-term memory & daily notes |
|
|
245
|
+
| **Scheduling** | schedule/add, schedule/list, schedule/get, etc. | Scheduled tasks |
|
|
246
|
+
| **Serial/GPIO** | serial/*, gpio/* | Extended device control |
|
|
247
|
+
|
|
248
|
+
For detailed API documentation, see [SKILL.md](SKILL.md), [FeyaGate_MCP_API.md](FeyaGate_MCP_API.md), and [FeyaGate_HTTP_API.md](FeyaGate_HTTP_API.md).
|
|
249
|
+
|
|
250
|
+
## Upgrade
|
|
251
|
+
|
|
252
|
+
### Online Upgrade (Recommended)
|
|
253
|
+
|
|
254
|
+
Automatically fetches the latest version with version comparison, backup/rollback, and service lifecycle management:
|
|
255
|
+
|
|
256
|
+
**Check for new versions:**
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
# macOS / Linux
|
|
260
|
+
bash scripts/upgrade.sh --check
|
|
261
|
+
|
|
262
|
+
# Windows
|
|
263
|
+
powershell -ExecutionPolicy Bypass -File scripts\upgrade.ps1 -Check
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
**Perform upgrade:**
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
# macOS / Linux (interactive confirmation)
|
|
270
|
+
bash scripts/upgrade.sh
|
|
271
|
+
|
|
272
|
+
# macOS / Linux (non-interactive, for automation)
|
|
273
|
+
bash scripts/upgrade.sh --yes
|
|
274
|
+
|
|
275
|
+
# Windows (interactive confirmation)
|
|
276
|
+
powershell -ExecutionPolicy Bypass -File scripts\upgrade.ps1
|
|
277
|
+
|
|
278
|
+
# Windows (non-interactive)
|
|
279
|
+
powershell -ExecutionPolicy Bypass -File scripts\upgrade.ps1 -Yes
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Upgrade flow: stop service -> backup bin/ + lib/ -> download new version -> MD5 verify -> extract & install -> write version -> restart service -> health check. If any step fails, it automatically rolls back to the backup.
|
|
283
|
+
|
|
284
|
+
### Manual Upgrade
|
|
285
|
+
|
|
286
|
+
When online upgrade is unavailable:
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
bash scripts/stop.sh # Stop current service
|
|
290
|
+
cp ~/Downloads/miloco-mcp-server-NEW-VERSION.tar.gz packages/ # Place new package
|
|
291
|
+
bash scripts/setup.sh # Re-extract (overwrite bin/ lib/)
|
|
292
|
+
bash scripts/start.sh # Start new version
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
## Developer: Building Release Packages
|
|
296
|
+
|
|
297
|
+
If you need to compile and package from source:
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
# In the miloco-mcp-server project
|
|
301
|
+
cd miloco-mcp-server
|
|
302
|
+
bash build-desktop-mac.sh --build --server-only # macOS
|
|
303
|
+
# or
|
|
304
|
+
bash build-desktop-linux.sh --build --server-only # Linux
|
|
305
|
+
|
|
306
|
+
# Output: app/release/miloco-mcp-server-VERSION-OS-ARCH.tar.gz
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
## License
|
|
310
|
+
|
|
311
|
+
MIT License
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
<a id="中文"></a>
|
|
316
|
+
|
|
317
|
+
基于 [miloco-mcp-server](https://gitee.com/panjyang/miloco-mcp-server) 的 MCP Skill 封装,提供小米/米家智能设备控制、摄像头监控、小爱音箱控制等能力。
|
|
318
|
+
|
|
319
|
+
**官网:** [www.feyagate.com](https://www.feyagate.com)
|
|
320
|
+
|
|
321
|
+
### 支持的 AI 助手
|
|
322
|
+
|
|
323
|
+
| AI 助手 | 状态 | 集成方式 |
|
|
324
|
+
|---------|------|----------|
|
|
325
|
+
| **OpenClaw** | 已支持 | MCP Skill 自动安装 |
|
|
326
|
+
| **Claude Code** | 已支持 | MCP 配置自动生成 |
|
|
327
|
+
| **Hermes** | 已支持 | MCP Skill 自动安装 |
|
|
328
|
+
| **Codex** | 已支持 | MCP Skill 自动安装 |
|
|
329
|
+
| **Windsurf** | 已支持 | MCP 配置自动生成 |
|
|
330
|
+
| **Copilot** | 已支持 | MCP 配置自动生成 |
|
|
331
|
+
| **小智AI** | 已支持 | MCP Skill 自动安装 |
|
|
332
|
+
| **Cursor** | 已支持 | MCP 配置自动生成 |
|
|
333
|
+
|
|
334
|
+
## 项目结构
|
|
335
|
+
|
|
336
|
+
```
|
|
337
|
+
feyagate-skill/
|
|
338
|
+
├── SKILL.md # AI Agent Skill 定义(MCP 工具描述)
|
|
339
|
+
├── README.md # 项目说明(本文件)
|
|
340
|
+
├── QUICKSTART.md # 快速开始指南
|
|
341
|
+
├── reference.md # 完整 MCP API 参考
|
|
342
|
+
│
|
|
343
|
+
├── config/ # 配置模板(入版本控制)
|
|
344
|
+
│ ├── config.yaml.example # 配置示例
|
|
345
|
+
│ └── camera_extra_info.yaml # 摄像头附加信息
|
|
346
|
+
│
|
|
347
|
+
├── scripts/ # 管理脚本(入版本控制)
|
|
348
|
+
│ ├── install.sh / install.ps1 # 一键在线安装(官方发布)
|
|
349
|
+
│ ├── upgrade.sh / upgrade.ps1 # 在线升级(版本对比、备份回滚)
|
|
350
|
+
│ ├── setup.sh / setup.bat # 自动检测平台 + 解压发布包
|
|
351
|
+
│ ├── verify.sh / verify.bat # 验证安装完整性
|
|
352
|
+
│ ├── start.sh / start.bat # 启动服务
|
|
353
|
+
│ ├── stop.sh / stop.bat # 停止服务
|
|
354
|
+
│ ├── health_check.sh / .bat # 健康检查
|
|
355
|
+
│ ├── auth.py # 米家 OAuth 授权(跨平台)
|
|
356
|
+
│ ├── snapshot.py # 摄像头抓拍工具
|
|
357
|
+
│ └── scheduled_analysis.py # 定时 AI 分析
|
|
358
|
+
│
|
|
359
|
+
├── packages/ # 放入下载的发布包(gitignored)
|
|
360
|
+
├── bin/ # 二进制文件(setup 自动填充,gitignored)
|
|
361
|
+
├── lib/ # 动态库(setup 自动填充,gitignored)
|
|
362
|
+
├── data/ # 运行时数据(gitignored)
|
|
363
|
+
└── webui/ # Web UI(setup 自动解压,gitignored)
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
## 平台支持
|
|
367
|
+
|
|
368
|
+
| 平台 | 发布包格式 | 二进制 | 动态库 |
|
|
369
|
+
|------|-----------|--------|--------|
|
|
370
|
+
| macOS Intel | `miloco-mcp-server-*-Darwin-x86_64.tar.gz` | `bin/miloco-mcp-server` | `lib/*.dylib` |
|
|
371
|
+
| macOS ARM | `miloco-mcp-server-*-Darwin-arm64.tar.gz` | `bin/miloco-mcp-server` | `lib/*.dylib` |
|
|
372
|
+
| Linux x86_64 | `miloco-mcp-server-*-Linux-x86_64.tar.gz` | `bin/miloco-mcp-server` | `lib/*.so` |
|
|
373
|
+
| Windows x64 | `miloco-mcp-server-*-Windows-x86_64.zip` | `bin/miloco-mcp-server.exe` | `lib/*.dll` |
|
|
374
|
+
|
|
375
|
+
## 安装
|
|
376
|
+
|
|
377
|
+
### 方式零:让 AI 助手帮你安装(最简单)
|
|
378
|
+
|
|
379
|
+
直接把下面的消息发给你的 AI 助手,它会自动阅读安装指南并为你完成安装。
|
|
380
|
+
|
|
381
|
+
> **支持:** OpenClaw、Claude Code、Hermes、Codex、Windsurf、Copilot、小智AI、Cursor 等各类 MCP 兼容 AI 编程助手。
|
|
382
|
+
|
|
383
|
+
**复制以下提示词发送:**
|
|
384
|
+
|
|
385
|
+
```
|
|
386
|
+
请阅读 https://github.com/toddpan/feyagate-skill/blob/main/QUICKSTART.md 并按照指南在我的机器上安装和配置 FeyaGate Skill。
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
AI 助手会自动:
|
|
390
|
+
1. 检测你的操作系统和架构
|
|
391
|
+
2. 执行一键安装脚本
|
|
392
|
+
3. 完成配置并启动服务
|
|
393
|
+
|
|
394
|
+
### 方式一:一键在线安装(推荐)
|
|
395
|
+
|
|
396
|
+
自动从服务器获取最新版本,下载、解压、配置一步到位:
|
|
397
|
+
|
|
398
|
+
**macOS / Linux:**
|
|
399
|
+
|
|
400
|
+
```bash
|
|
401
|
+
curl -fsSL https://raw.githubusercontent.com/toddpan/feyagate-skill/main/scripts/install.sh | bash
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
**Windows (PowerShell):**
|
|
405
|
+
|
|
406
|
+
```powershell
|
|
407
|
+
iwr -useb https://raw.githubusercontent.com/toddpan/feyagate-skill/main/scripts/install.ps1 | iex
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
自定义安装目录:
|
|
411
|
+
|
|
412
|
+
```bash
|
|
413
|
+
# macOS / Linux
|
|
414
|
+
curl -fsSL https://raw.githubusercontent.com/toddpan/feyagate-skill/main/scripts/install.sh | bash -s -- --dir ~/my-skill
|
|
415
|
+
|
|
416
|
+
# Windows
|
|
417
|
+
$env:FEYAGATE_INSTALL_DIR="D:\my-skill"; iwr -useb https://raw.githubusercontent.com/toddpan/feyagate-skill/main/scripts/install.ps1 | iex
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
安装脚本会自动:
|
|
421
|
+
1. 从 [fota.json](https://oneapi.sooncore.com/ota/fota.json) 获取最新版本信息
|
|
422
|
+
2. 克隆 feyagate-skill 仓库(含脚本和配置模板)
|
|
423
|
+
3. 下载对应平台的二进制发布包并校验 MD5
|
|
424
|
+
4. 解压二进制文件到 `bin/`,动态库到 `lib/`,WebUI 到 `webui/`
|
|
425
|
+
5. 创建默认 `config/config.yaml` 和 `data/` 目录
|
|
426
|
+
|
|
427
|
+
### 方式二:手动安装
|
|
428
|
+
|
|
429
|
+
#### Step 1: 克隆仓库
|
|
430
|
+
|
|
431
|
+
```bash
|
|
432
|
+
git clone https://github.com/toddpan/feyagate-skill.git
|
|
433
|
+
cd feyagate-skill
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
#### Step 2: 下载发布包
|
|
437
|
+
|
|
438
|
+
**从官网下载:** 访问 [www.feyagate.com](https://www.feyagate.com) 下载对应平台的 Skill 包,放入 `packages/` 目录。
|
|
439
|
+
|
|
440
|
+
**直接下载链接:**
|
|
441
|
+
|
|
442
|
+
```bash
|
|
443
|
+
# macOS Intel
|
|
444
|
+
curl -L -o packages/miloco-mcp-server-VERSION-Darwin-x86_64.tar.gz \
|
|
445
|
+
"https://oneapi.sooncore.com/ota/feyagate-skill/miloco-mcp-server-VERSION-Darwin-x86_64.tar.gz"
|
|
446
|
+
|
|
447
|
+
# Linux x86_64
|
|
448
|
+
curl -L -o packages/miloco-mcp-server-VERSION-Linux-x86_64.tar.gz \
|
|
449
|
+
"https://oneapi.sooncore.com/ota/feyagate-skill/miloco-mcp-server-VERSION-Linux-x86_64.tar.gz"
|
|
450
|
+
|
|
451
|
+
# Windows x64
|
|
452
|
+
curl -L -o packages/miloco-mcp-server-VERSION-Windows-x86_64.zip \
|
|
453
|
+
"https://oneapi.sooncore.com/ota/feyagate-skill/miloco-mcp-server-VERSION-Windows-x86_64.zip"
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
> 提示:最新版本信息可通过 https://oneapi.sooncore.com/ota/fota.json 获取(搜索 `feyagate-skill-*` 类型的条目)。
|
|
457
|
+
|
|
458
|
+
#### Step 3: 运行 Setup
|
|
459
|
+
|
|
460
|
+
```bash
|
|
461
|
+
# macOS / Linux
|
|
462
|
+
bash scripts/setup.sh
|
|
463
|
+
|
|
464
|
+
# Windows
|
|
465
|
+
scripts\setup.bat
|
|
466
|
+
|
|
467
|
+
# 或指定包路径
|
|
468
|
+
bash scripts/setup.sh --package /path/to/miloco-mcp-server-*.tar.gz
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
#### Step 4: 配置
|
|
472
|
+
|
|
473
|
+
编辑 `config/config.yaml`,设置云端区域等参数:
|
|
474
|
+
|
|
475
|
+
```yaml
|
|
476
|
+
server:
|
|
477
|
+
http_port: 38080
|
|
478
|
+
bind_address: "0.0.0.0"
|
|
479
|
+
auth:
|
|
480
|
+
cloud_server: "cn" # cn / de / sg / us / ru / i2
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
### 启动并授权
|
|
484
|
+
|
|
485
|
+
```bash
|
|
486
|
+
bash scripts/start.sh # 启动 MCP Server
|
|
487
|
+
python3 scripts/auth.py # 首次授权米家账号
|
|
488
|
+
bash scripts/health_check.sh # 验证状态
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
## 服务管理
|
|
492
|
+
|
|
493
|
+
| 操作 | macOS / Linux | Windows |
|
|
494
|
+
|------|---------------|---------|
|
|
495
|
+
| 安装/解压 | `bash scripts/setup.sh` | `scripts\setup.bat` |
|
|
496
|
+
| 验证安装 | `bash scripts/verify.sh` | `scripts\verify.bat` |
|
|
497
|
+
| 启动 | `bash scripts/start.sh` | `scripts\start.bat` |
|
|
498
|
+
| 停止 | `bash scripts/stop.sh` | `scripts\stop.bat` |
|
|
499
|
+
| 健康检查 | `bash scripts/health_check.sh` | `scripts\health_check.bat` |
|
|
500
|
+
| 自定义端口 | `bash scripts/start.sh --port 9090` | `scripts\start.bat --port 9090` |
|
|
501
|
+
| 在线升级 | `bash scripts/upgrade.sh` | `powershell -File scripts\upgrade.ps1` |
|
|
502
|
+
| 检查更新 | `bash scripts/upgrade.sh --check` | `powershell -File scripts\upgrade.ps1 -Check` |
|
|
503
|
+
|
|
504
|
+
## MCP 工具概览
|
|
505
|
+
|
|
506
|
+
| 类别 | 工具 | 说明 |
|
|
507
|
+
|------|------|------|
|
|
508
|
+
| **设备发现** | device/list, device/specs, platform/status, gateway/info | 跨平台设备管理与状态查询 |
|
|
509
|
+
| **小米控制** | xiaomi/get_properties, xiaomi/set_property, xiaomi/execute_action | MIOT 协议设备读写与动作 |
|
|
510
|
+
| **小米授权** | xiaomi/auth_status, xiaomi/auth_url, xiaomi/auth_callback | OAuth 授权管理 |
|
|
511
|
+
| **场景** | scene/list, scene/trigger | 跨平台场景管理 |
|
|
512
|
+
| **小爱音箱** | xiaoai/tts, xiaoai/play_music, xiaoai/control | TTS、音乐、语音控制 |
|
|
513
|
+
| **摄像头** | xiaomi/camera_list, xiaomi/camera_connect, xiaomi/camera_snapshot 等 | P2P 连接、JPEG 抓拍 |
|
|
514
|
+
| **涂鸦** | tuya/get_properties, tuya/set_property | 涂鸦设备控制 |
|
|
515
|
+
| **美的** | midea/get_properties, midea/set_property, midea/execute_action | 美的设备控制 |
|
|
516
|
+
| **易微联** | ewelink/get_properties, ewelink/set_property, ewelink/execute_action | eWeLink 设备控制 |
|
|
517
|
+
| **房间** | room/list, room/set_device | 房间管理 |
|
|
518
|
+
| **记忆** | memory/read, memory/add, memory/search, memory/note 等 | 长期记忆与每日笔记 |
|
|
519
|
+
| **定时任务** | schedule/add, schedule/list, schedule/get 等 | 定时调度 |
|
|
520
|
+
| **串口/GPIO** | serial/*, gpio/* | 扩展设备控制 |
|
|
521
|
+
|
|
522
|
+
详细 API 文档见 [SKILL.md](SKILL.md)、[FeyaGate_MCP_API.md](FeyaGate_MCP_API.md) 和 [FeyaGate_HTTP_API.md](FeyaGate_HTTP_API.md)。
|
|
523
|
+
|
|
524
|
+
## 升级
|
|
525
|
+
|
|
526
|
+
### 在线升级(推荐)
|
|
527
|
+
|
|
528
|
+
自动从服务器获取最新版本,支持版本对比、备份回滚和服务生命周期管理:
|
|
529
|
+
|
|
530
|
+
**检查是否有新版本:**
|
|
531
|
+
|
|
532
|
+
```bash
|
|
533
|
+
# macOS / Linux
|
|
534
|
+
bash scripts/upgrade.sh --check
|
|
535
|
+
|
|
536
|
+
# Windows
|
|
537
|
+
powershell -ExecutionPolicy Bypass -File scripts\upgrade.ps1 -Check
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
**执行升级:**
|
|
541
|
+
|
|
542
|
+
```bash
|
|
543
|
+
# macOS / Linux(交互式确认)
|
|
544
|
+
bash scripts/upgrade.sh
|
|
545
|
+
|
|
546
|
+
# macOS / Linux(非交互模式,适合自动化)
|
|
547
|
+
bash scripts/upgrade.sh --yes
|
|
548
|
+
|
|
549
|
+
# Windows(交互式确认)
|
|
550
|
+
powershell -ExecutionPolicy Bypass -File scripts\upgrade.ps1
|
|
551
|
+
|
|
552
|
+
# Windows(非交互模式)
|
|
553
|
+
powershell -ExecutionPolicy Bypass -File scripts\upgrade.ps1 -Yes
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
升级流程:停止服务 -> 备份 bin/ + lib/ -> 下载新版本 -> MD5 校验 -> 解压安装 -> 写入版本号 -> 重启服务 -> 健康检查。任何步骤失败将自动回滚到备份版本。
|
|
557
|
+
|
|
558
|
+
### 手动升级
|
|
559
|
+
|
|
560
|
+
当在线升级不可用时,可手动操作:
|
|
561
|
+
|
|
562
|
+
```bash
|
|
563
|
+
bash scripts/stop.sh # 停止当前服务
|
|
564
|
+
cp ~/Downloads/miloco-mcp-server-NEW-VERSION.tar.gz packages/ # 放入新包
|
|
565
|
+
bash scripts/setup.sh # 重新解压(覆盖 bin/ lib/)
|
|
566
|
+
bash scripts/start.sh # 启动新版本
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
## 开发者:打包发布包
|
|
570
|
+
|
|
571
|
+
如果你需要从源码编译并打包:
|
|
572
|
+
|
|
573
|
+
```bash
|
|
574
|
+
# 在 miloco-mcp-server 项目中
|
|
575
|
+
cd miloco-mcp-server
|
|
576
|
+
bash build-desktop-mac.sh --build --server-only # macOS
|
|
577
|
+
# 或
|
|
578
|
+
bash build-desktop-linux.sh --build --server-only # Linux
|
|
579
|
+
|
|
580
|
+
# 产出: app/release/miloco-mcp-server-VERSION-OS-ARCH.tar.gz
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
## 许可证
|
|
584
|
+
|
|
585
|
+
MIT License
|