Introduction¶
When building smart home agents in DSH, the common approach is to spin up your own MCP service, manually write the port and tool bridging in profiles, and handle binary downloads, upgrades, and process supervision yourself. FeyaGate provides MCP capabilities across multiple platforms, but the connection between “local background service + DSH conversation tools” still requires a layer of managed logic.
This article introduces the npm package dsh-feyagate (repo toddpan/dsh-feyagate): published by maintainer toddpan, categorized as workflow, it installs the plugin within the DSH host process, downloads and verifies the proprietary background service miloco-mcp-server, then integrates approximately 76 tools (number from upstream FeyaGate_MCP_API.md §4) into conversations through an MCP facade. The plugin itself is MIT open source; smart home logic resides in binaries downloaded at runtime from rights holder channels per manifest, not distributed with the npm package.
What This Is¶
In one sentence: A DSH plugin for FeyaGate—hosts the local background service miloco-mcp-server within DSH (auto download → verify → install → supervise → upgrade → rollback on failure), integrates its MCP tools into DSH, and provides management interfaces in the settings panel for “Service / Platform Login / Accounts / Authorization / Settings / Logs / Open APIs”.
Terminology matches the README: platform accounts are “login”, licenses are “authorization”; local processes are “background service”; “FeyaGate” is the product name and settings entry. In the UI, the engine is displayed as “FeyaGate MCP Engine”, with miloco-mcp-server as an implementation detail.
Current npm version is 0.3.6 (consistent in package.json and README at the data cutoff point). SkillHub directory page: https://www.skillhub.cn/plugins/toddpan/dsh-feyagate.
Architecture Highlights¶
Within the DSH host, the browser-side settings page “FeyaGate” calls the plugin Host-side /dsh-feyagate/* management API through same-origin HTTP, responsible for installation, verification, supervision, and generating config.yaml. @deepseek-ai/dsh-mcp-client connects to the local MCP facade with serverName: feyagate (default ports written to state.json, subprocess actual HTTP defaults to 127.0.0.1:38080, can drift within range when occupied); the facade proxies tool calls to the background service when ready. Tool names visible to models in conversations appear as mcp__feyagate__* (normalized when original names contain /, subject to runtime tools/list).
Three implementation details worth knowing:
- What’s bridged is the plugin’s resident facade, not directly tied to the subprocess. When the subprocess isn’t installed, the facade can still instantly return
initialize(empty tool list), allowing DSH to start before installing the service; tool list changes are delivered eventually consistent viatools/list_changed, generally no need to restart DSH for this. - Installation root directory cannot be arbitrarily migrated.
config.yamlis located in the installation root, device identity and license are anchored to this directory (see repo ADR-0002). - Data persistence at
~/.dsh/dsh-feyagate/(README architecture description).
The background service connects to Xiaomi Cloud, Tuya Cloud, Midea Cloud, eWeLink, Huawei Cloud, Home Assistant, etc. via HTTPS / P2P / MQTT; LAN-side can involve Mijia cameras, XiaoAi speakers, etc. (subject to actual logged-in platforms and build capabilities).
Core Features¶
All from verified README descriptions (MVP and recent version notes before truncation):
| Capability | Description |
|---|---|
| Background Service Hosting | Parses platform assets per manifest/server-manifest.json, multi-source fallback download, verify with sha256 before extraction, lands in versions/<version>/, switches current pointer |
| Process Supervision | spawn, health check /health, crash backoff restart, etc. |
| MCP Integration with DSH | Approximately 76 MCP tools enter conversations via facade |
| Settings UI | Service overview (install/start/version), platform login, account overview, authorization, logs; since 0.3.6 added “Open APIs” section (MCP/HTTP endpoint quick reference, copy curl, docs link to docs/api.zh.md) |
| Platform Login | Complete Mijia / Tuya / Midea / eWeLink / Huawei flows within settings page; credentials only handed to background service on local loopback, plugin doesn’t persist or log |
| Verification Policy | Asset versions without verification values are rejected from installation (manifest verification strengthened since 0.3.4, preventing “default install failures” on Windows etc. from entering manifests) |
Plugin requires Node.js >= 20.16.0 (package.json engines).
Installation and Activation¶
1. Install Plugin¶
Replace <profile> with the profile name you want to install into (e.g., web). The command writes the bundle to the profile configuration, no need to manually edit profile files; after installation, restart DSH or trigger configuration resynthesis, “FeyaGate” should appear on the left side of settings.
dsh plugin --profile <profile> add dsh-feyagate
If you need to immediately lock a specific version (e.g., to avoid still installing old versions due to pnpm 11’s default 24-hour publish cooldown), the documentation example is installing with version number:
dsh plugin --profile <profile> add dsh-feyagate@0.3.5
(Specific version number subject to your needed release; current package version is 0.3.6.)
2. Install Background Service¶
Open Settings › FeyaGate › Service › Overview, click Install Background Service. The wizard will: download → sha256 verify (delete file and abort on failure) → extract to versions/<version>/ → write permissions (macOS includes quarantine handling) → switch current and start, poll /health. README explicitly states: won’t secretly download before user clicks.
For scenarios like macOS arm64 where verification fails, confirm plugin and manifest versions match (e.g., historical notes mention v1.2.20 mac-arm64 required updating sha256 after repackaging, should upgrade plugin first then install/upgrade service).
3. Confirm MCP Tools Available¶
After installation completes, ask something like “list my smart home devices” in conversation. The model should be able to call tools like mcp__feyagate__* (illustrative names like mcp__feyagate__device_list).
4. Login Platform Accounts¶
Path: Settings › Plugins › FeyaGate › Platform Login. Whether each platform card is available is determined by capabilities reported by the current background service build (e.g., if a build has no Huawei tools, the card shows as unsupported, may automatically appear after service upgrade).
Can also complete authorization through the same batch of MCP tools in conversation (see upstream API docs for details). Tuya can be completed in chat: provide the App’s “user code” to the model, model returns QR code (plugin renders token as PNG; when images unsupported can use qr_text_url in tool results or open in browser), after App scans and confirms, plugin polls to complete login.
Shortest path to light control: Install plugin → Install background service → Login Mijia in conversation → device/list to find lights → Turn on lights.
Typical Usage Examples¶
- DSH-internal closed loop only: After installing plugin and service, complete platform login entirely in settings page, use natural language in conversation to let model call
mcp__feyagate__*to control devices or query status. - Open APIs (0.3.6): View MCP address, HTTP endpoints, and curl examples built from real-time ports in settings “Open APIs”, external clients can integrate per
docs/api.zh.md(note the prompts when service is not running and security boundary descriptions). - Version and reinstallation: Service page version card provides conclusions on local and latest available versions; “More install options” allows specifying version, reinstalling, rolling back, etc. (specific options subject to UI).
Use Cases and Considerations¶
Who it’s for: Already using or planning to use DSH for agents/workflows, want to integrate FeyaGate’s multi-platform home capabilities into conversations as MCP tools, and willing to run proprietary background service binaries locally.
Permissions and Compliance: Plugin runs under current DSH process permissions, will download and execute third-party binaries, write to ~/.dsh/dsh-feyagate/. Before installation, should read GitHub repo source code, NOTICE and MIT license; proprietary part ownership and distribution method subject to NOTICE.
Ecosystem Note: DSH community plugin directories (like SkillHub) are independent sites, not officially affiliated with DeepSeek / Hunyuan; installation commands in this article are based on README, please do not concatenate github:owner/repo installation formats not appearing in the materials.
Others: Windows users should use the default win-x64 version that has passed verification in the manifest (0.3.4 fixed the issue of mandatory failure due to no sha256). Problem feedback can go through settings top bar or log page links to GitHub Issues.
Conclusion¶
dsh-feyagate consolidates “local FeyaGate MCP engine lifecycle” and “tools and settings UI in DSH” into one path: one dsh plugin add installs the plugin, then install the background service in settings, enabling conversation calls to large-scale home MCP tools, and managing login and authorization in the same panel.
- Directory page: https://www.skillhub.cn/plugins/toddpan/dsh-feyagate
- Source code and README: https://github.com/toddpan/dsh-feyagate