From 83cbe608a0983f24b39df6ba4a9320e02f7a986e Mon Sep 17 00:00:00 2001 From: Agent Date: Fri, 13 Mar 2026 12:22:31 +0000 Subject: [PATCH] feat: add admin UI dashboard with static serving - Add admin-ui/index.html: web-based dashboard for monitoring hub - Add admin-ui/README.md: setup instructions for OBSERVE_SECRET connection - Configure nginx to serve admin-ui/ statically at /admin-ui/ location - No separate server process needed, UI uses WebSocket to connect - OBSERVE_SECRET provides auth layer, no nginx auth required Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- admin-ui/README.md | 61 ++++ admin-ui/index.html | 788 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 849 insertions(+) create mode 100644 admin-ui/README.md create mode 100644 admin-ui/index.html diff --git a/admin-ui/README.md b/admin-ui/README.md new file mode 100644 index 0000000..9b0a09c --- /dev/null +++ b/admin-ui/README.md @@ -0,0 +1,61 @@ +# Admin UI + +A web-based dashboard for monitoring the MCP Hub in real-time. + +## Setup + +### 1. Get Your OBSERVE_SECRET + +The `OBSERVE_SECRET` is stored in `/workspace/.env` on the hub server. Extract it: + +```bash +# On the hub server: +grep OBSERVE_SECRET /workspace/.env +``` + +Copy the secret value (it's a long hex string). + +### 2. Open the UI + +#### Option A: Via https (production) +``` +https://mcp.arik.work/admin-ui/ +``` + +#### Option B: Local development with file:// (offline) +```bash +# Simply open the file in your browser: +file:///workspace/admin-ui/index.html +``` + +#### Option C: Local development with HTTP server +```bash +cd /workspace/admin-ui +python3 -m http.server 8080 +# Then open http://localhost:8080 +``` + +### 3. Connect to the Hub + +In the UI, enter: +- **Hub URL**: `wss://mcp.arik.work/ws/observe` (production) or `ws://localhost:3000/ws/observe` (local dev) +- **OBSERVE_SECRET**: Paste the value from step 1 + +The status light will turn **green** when connected. + +### 4. Monitor + +- **Backends**: View connected MCP backends +- **Logs**: Real-time event stream from the hub +- **Status**: Connection indicator at the top + +## Adding More Backends + +To connect additional backends to the hub, edit `/workspace/.env` on the hub server: + +```env +OBSERVE_SECRET=... +# Add new backends via environment config or the hub's register endpoint +``` + +Then restart the hub to pick up new backends. diff --git a/admin-ui/index.html b/admin-ui/index.html new file mode 100644 index 0000000..cf893f9 --- /dev/null +++ b/admin-ui/index.html @@ -0,0 +1,788 @@ + + + + + + MCP Hub Admin + + + + + + +
+ + + +