FengSui 4G/5G Router MCP Server
<p align="center">
<img src="web/brand/logo.svg" width="72" height="72" alt="" />
</p>
<h1 align="center">FengSui 烽燧</h1>
<p align="center">
A self-hosted console for 5G routers. See your signal, run your router, and get SMS and alerts in one place.
</p>
<p align="center">
<a href="https://github.com/cky008/cpe-dash/releases"><img src="https://img.shields.io/github/v/release/cky008/cpe-dash?style=flat-square&label=release" alt="Latest release" /></a>
<a href="https://github.com/cky008/cpe-dash/actions/workflows/ci-docker.yml"><img src="https://github.com/cky008/cpe-dash/actions/workflows/ci-docker.yml/badge.svg" alt="CI" /></a>
<a href="https://fengsui.iocky.com/en/docs/agents/"><img src="https://img.shields.io/badge/MCP-built--in_server-7C3AED?style=flat-square&logo=modelcontextprotocol&logoColor=white" alt="Built-in MCP server for AI agents" /></a>
<img src="https://img.shields.io/badge/Docker-amd64_|_arm64-2496ED?style=flat-square&logo=docker&logoColor=white" alt="Docker amd64 and arm64" />
<img src="https://img.shields.io/badge/runtime_deps-0-black?style=flat-square" alt="No runtime dependencies" />
<a href="LICENSE"><img src="https://img.shields.io/badge/license-PolyForm_NC_1.0.0-orange?style=flat-square" alt="PolyForm Noncommercial 1.0.0" /></a>
</p>
<p align="center">
<a href="https://fengsui.iocky.com/en/docs/quick-start/"><b>Quick start</b></a> ·
<a href="https://fengsui.iocky.com/en/">Documentation</a> ·
<a href="https://cky008.github.io/fengsui-demo/">Live demo</a> ·
<a href="README.zh-CN.md">简体中文</a>
</p>
<p align="center">
<img src="docs/screenshots/dashboard-sujian.webp" alt="The FengSui dashboard" width="100%" />
</p>
FengSui is a web console that runs on your own NAS or computer and lets you see and manage a 4G / 5G router. Verified on the Huawei H168-383, it also connects to other Huawei models and to ZTE, TP-Link, D-Link and OpenWrt routers, among others. It brings what the router's own web page scatters across many screens onto one dashboard, and adds what that page lacks: history charts, alerts, Telegram notifications, SMS threads and a built-in MCP server for AI agents. Your data stays at home.
## What it does
- **Shows your signal**: RSRP, SINR, modulation, transmit power, and the band and bandwidth of every 4G and 5G carrier, refreshed every 5 seconds, with 7 days of history.
- **Band and cell locks you can undo**: preview a lock before you apply it. If a lock cuts the internet, FengSui can undo it after a few minutes.
- **SMS**: threads, one-click copy for verification codes, contact import. Messages are stored encrypted on your disk.
- **Devices and internet access**: see who is connected and how; pause a device's internet access or give it a schedule.
- **Alerts and Telegram**: get told when the WAN drops, the signal weakens, the router restarts or the SMS box fills up. Read and answer SMS in Telegram.
- **Works with AI agents**: a built-in MCP server lets Claude, Cursor and others read the signal and its history. Actions that change the router are off by default, and you choose what each token may do.
It is also built not to get in the way: it steps aside when you sign in to the router's own page, it stops after one wrong password instead of locking the router, and it uses only what ships with Node.js, with no third-party runtime dependencies.
## Quick start
You need a NAS or computer that runs Docker, on the same network as the router.
```bash
mkdir -p ~/cpe-dash/data && cd ~/cpe-dash
curl -fsSLO https://raw.githubusercontent.com/cky008/cpe-dash/main/docker-compose.yml
curl -fsSL -o .env https://raw.githubusercontent.com/cky008/cpe-dash/main/.env.example
# Edit .env: set DATA_ENCRYPTION_KEY (generate one with openssl rand -hex 32) and TZ
docker compose pull && docker compose up -d
docker compose logs cpe-dash | grep "setup code"
```
Open `http://<this machine's IP>:18384`, enter the setup code from the log and follow the steps to connect your router. The full walkthrough, including Synology's Container Manager, is in the [quick start](https://fengsui.iocky.com/en/docs/quick-start/).
> [!CAUTION]
> Do not forward port `18384` to the internet. To reach the console from outside, use a VPN such as Tailscale or an HTTPS reverse proxy; see [Security and privacy](https://fengsui.iocky.com/en/docs/security/).
## Screenshots
| SMS | Controls |
| :---: | :---: |
| <img src="docs/screenshots/sms-ziming-en.webp" alt="SMS threads" /> | <img src="docs/screenshots/controls-chenxi.webp" alt="Controls drawer: locks, self-healing and switches" /> |
| **Devices and access** | **On a phone** |
| <img src="docs/screenshots/topology-access.webp" alt="Connected devices and access control" /> | <img src="docs/screenshots/mobile.webp" alt="The dashboard on a phone" width="60%" /> |
You can try the rest in the [live demo](https://cky008.github.io/fengsui-demo/): every value is made up, and a reload resets it.
## Compatibility
So far FengSui is verified on the H168-383 (firmware 4.4.0.1) only.
- **Other routers**: Other Huawei HiLink routers connect too, and so do routers from ZTE, Pinsu, Tozed (ZLT), FiberHome, NRadio, D-Link and TP-Link, and OpenWrt routers with a Quectel or Fibocom module; FengSui tells the brand itself, but none of them has been verified on a real device.
- **Writes**: On those routers, what FengSui implements works straight away, writes included: they are on by default, and you can turn each one off in the console. Each write is sent once and read back, and a band or cell lock that leaves the internet down for 3 minutes is undone automatically.
- **Help verify more routers**: Device reports from the console help get more routers verified, and you can hand the console's ready-made prompt to an AI agent to run the tests and draft the report.
- **Details**: Where each brand and model stands is under [Supported devices](https://fengsui.iocky.com/en/docs/supported-devices/), how FengSui works on these routers is under [Other models and brands](https://fengsui.iocky.com/en/docs/other-routers/), and the notes on each brand's models are in the [device reference](docs/dev/device-notes.md); or see it first in the [live demo's other-model mode](https://cky008.github.io/fengsui-demo/?router=other).
## Documentation
The full documentation, with search, is on the [documentation site](https://fengsui.iocky.com/en/):
- **Get started**: [What FengSui is](https://fengsui.iocky.com/en/docs/overview/) · [Supported devices](https://fengsui.iocky.com/en/docs/supported-devices/) · [Quick start](https://fengsui.iocky.com/en/docs/quick-start/) · [Install and upgrade](https://fengsui.iocky.com/en/docs/install/)
- **Use FengSui**: [Dashboard](https://fengsui.iocky.com/en/docs/dashboard/) · [Band and cell locks](https://fengsui.iocky.com/en/docs/locking/) · [Router switches](https://fengsui.iocky.com/en/docs/router-switches/) · [SMS](https://fengsui.iocky.com/en/docs/sms/) · [Devices and internet access](https://fengsui.iocky.com/en/docs/devices/) · [Alerts and notifications](https://fengsui.iocky.com/en/docs/notifications/) · [AI agents (MCP)](https://fengsui.iocky.com/en/docs/agents/)
- **Understand the readings**: [Signal readings](https://fengsui.iocky.com/en/docs/signal/) · [Bands, carriers and cells](https://fengsui.iocky.com/en/docs/bands-and-cells/)
- **Manage**: [Docker Compose file](https://fengsui.iocky.com/en/docs/docker-compose/) · [Configuration](https://fengsui.iocky.com/en/docs/configuration/) · [API reference](https://fengsui.iocky.com/en/docs/api/) · [Security and privacy](https://fengsui.iocky.com/en/docs/security/) · [Backup and restore](https://fengsui.iocky.com/en/docs/backup/) · [Other models and brands](https://fengsui.iocky.com/en/docs/other-routers/) · [Architecture and protocols](https://fengsui.iocky.com/en/docs/architecture/)
- **Help**: [Troubleshooting](https://fengsui.iocky.com/en/docs/troubleshooting/) · [FAQ](https://fengsui.iocky.com/en/docs/faq/) · [Acknowledgments](https://fengsui.iocky.com/en/docs/acknowledgments/)
The developer notes (in Chinese) are in [`docs/dev/`](docs/dev/README.md): [Huawei HiLink protocol](docs/dev/protocol.md) · [Architecture and design](docs/dev/architecture.md) · [Implementation sources](docs/dev/sources.md) · [Audit record](docs/dev/audits.md) · [API contract (REST / SSE / MCP)](docs/dev/api.md) · [Device reference](docs/dev/device-notes.md) · [Logo](docs/dev/brand.md). Changes are in the [changelog](CHANGELOG.md).
## Contributing
- Questions and ideas: [GitHub Issues](https://github.com/cky008/cpe-dash/issues)
- Development: [CONTRIBUTING.md](CONTRIBUTING.md) (no router needed: `npm run demo` simulates one)
- Security problems: report privately as described in [SECURITY.md](SECURITY.md)
- Code of conduct: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
- Sponsoring: [GitHub Sponsors](https://github.com/sponsors/cky008) · [Buy Me a Coffee](https://buymeacoffee.com/iocky)
## Licence and disclaimers
- **Licence**: Source-available under the [PolyForm Noncommercial License 1.0.0](LICENSE) (free for personal and non-commercial use). Commercial use needs separate permission from the author. Third-party components in the build are listed in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
- **Unofficial**: FengSui is an independent project, not affiliated with or endorsed by Huawei, Synology or any carrier. All trademarks belong to their owners.
- **As is**: no warranty of any kind. Band and cell locks, reboots and blocking can leave you without internet for a while; SMS is billed by your carrier and you are responsible for what you send. Use it only on equipment and networks you are allowed to manage, and follow local law and your carrier's terms.
## Acknowledgements
The projects FengSui consulted when adding support for each brand of router are listed under [Acknowledgements](https://fengsui.iocky.com/en/docs/acknowledgments/).
TDQS
Scored across 35 tools
Most tools have clearly distinct purposes, and the descriptions carefully separate read domains such as telemetry, router settings, cellular settings, access control, and session status. A few areas could still be confused, especially the multiple settings/read tools and the overlapping device-blocking and MAC-filter tools, but the boundaries are documented well enough to guide selection.
The set uses snake_case with a verb-first pattern almost throughout, which makes names predictable. Minor deviations such as manage_internet_time_rule and upsert_contact are still readable and consistent with their specific operations.
The router-management surface is broad, covering telemetry, RF locks, Wi-Fi, security, cellular settings, SMS, contacts, diagnostics, and device control, so many tools are justified. However, 35 tools is heavy and pushes beyond a comfortably scoped set; some grouping or consolidation would likely improve usability.
The server covers the main router lifecycle: reading telemetry and history, configuring cellular and Wi-Fi behavior, managing locks, controlling devices, and handling SMS and contacts. A few gaps remain, such as contact deletion/listing beyond search and restoring deleted SMS, but the core workflows are well covered.