MCP server hub and relay
- Add /ws/observe WebSocket path for real-time hub state observation - Implement setupObserveServer(httpServer) function that: - Requires secret authentication via observe handshake - Sends immediate snapshot of backends on successful auth - Streams all EventBus events to connected observers - Maintains read-only connections (ignores post-handshake messages) - Properly cleans up listeners on disconnect - Add OBSERVE_SECRET to .env (generate with crypto.randomBytes) - Export OBSERVE_SECRET from config.js - Wire setupObserveServer into index.js alongside existing setupWsServer - Support multiple simultaneous observers - Modified ws-server.js to allow other upgrade handlers (ws-observe, etc) - Add OBSERVE_SECRET to ecosystem.config.js env for pm2 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|---|---|---|
| .github | ||
| .vscode | ||
| admin-ui | ||
| mcp-bridge | ||
| sample-mcp | ||
| src | ||
| test | ||
| .gitignore | ||
| ecosystem.config.js | ||
| package-lock.json | ||
| package.json | ||
| req_test.py | ||
| test.py | ||