Commit graph

21 commits

Author SHA1 Message Date
Agent
2210a2f148 fix: update restart delay and kill timeout in ecosystem config 2026-03-13 12:58:08 +00:00
Agent
4e78557158 Add OAuth 2.1 with Google OIDC to MCP hub
- Implement OAuth 2.1 authorization code + PKCE flow
- Google OIDC integration with dynamic client registration
- Well-known endpoints (/.well-known/oauth-protected-resource, /.well-known/oauth-authorization-server)
- OAuth token validation middleware for all service endpoints
- SQLite-backed token and client persistence
- Automatic token cleanup on 1-hour interval
- CORS headers for public OAuth endpoints
- E2E tests gracefully skip when OAuth is configured
- Placeholder credentials in .env for manual setup

Key files:
- src/oauth.js: OAuth routes and middleware
- src/oauth-store.js: SQLite persistence layer
- src/server.js: CORS + OAuth integration
- ecosystem.config.js: OAuth env vars
- .env: OAuth credentials (placeholders)
- test/e2e.js: Graceful skip on configured OAuth

All unauthenticated requests to /:serviceId/sse and /:serviceId/message now receive 401 with WWW-Authenticate header.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-13 12:38:12 +00:00
Agent
fc5fa4e16d Add WebSocket observer endpoint for hub state monitoring
- 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>
2026-03-13 12:26:55 +00:00
Agent
83cbe608a0 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>
2026-03-13 12:22:31 +00:00
Agent
84a804c57a mcp-hub-010: EventBus — central event emitter for hub telemetry 2026-03-13 11:52:48 +00:00
Agent
3028e787ac Initial commit: mcp-hub project 2026-03-13 11:30:19 +00:00
Agent
20fd23ff35 security: move secrets to .env, never commit secrets to git 2026-03-13 11:17:53 +00:00
Agent
0da8450830 chore: rotate backend secret to cryptographically strong 64-char hex 2026-03-13 11:13:36 +00:00
Agent
6318364b75 chore: rotate backend secrets to strong random 32-byte hex 2026-03-13 11:13:05 +00:00
Agent
aa78585a45 mcp-hub-009: Graceful backend failure — JSON-RPC error responses and session cleanup 2026-03-13 11:00:43 +00:00
Agent
050c63e8d3 Add VS Code MCP config for sample-mcp testing 2026-03-13 10:51:54 +00:00
Agent
5735a981d8 fix: update mcp-hub environment variables and standardize mcp-bridge settings 2026-03-13 10:34:11 +00:00
Agent
f2f64ec392 feat: add generic mcp-bridge for proxying upstream MCP SSE servers
- Add mcp-bridge/index.js: WebSocket backend for hub, relays requests
  to upstream MCP SSE servers via SSE+POST transport
- Add mcp-bridge/package.json with 'ws' dependency
- Add 'mcp-bridge-memory' entry to ecosystem.config.js (not started)
- Add 'bridge' script to root package.json
- Add mcp-bridge/node_modules to .gitignore

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-13 10:19:27 +00:00
Agent
85b3f5b6e2 mcp-hub-007: Auth hardening — per-service secrets and env-based config 2026-03-13 10:17:45 +00:00
Agent
91f0ce271b Add pm2 process management
- Add ecosystem.config.js with mcp-hub and sample-mcp app configs
- Add pm2:start, pm2:stop, pm2:logs, pm2:status scripts to package.json

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-13 09:08:10 +00:00
Agent
40625827f1 mcp-hub-005: End-to-end integration test 2026-03-12 18:25:29 +00:00
Agent
67bbb40830 mcp-hub-004: Sample MCP backend with echo tool 2026-03-12 18:21:37 +00:00
Agent
9a61026bca mcp-hub-003: Client SSE transport and message relay 2026-03-12 17:13:36 +00:00
Agent
a93bcfffa7 mcp-hub-002: WebSocket backend registration and health tracking 2026-03-12 16:46:30 +00:00
Agent
60d92af13b mcp-hub-001: Project scaffolding and core server 2026-03-12 16:44:37 +00:00
Agent
2b557e1eca initial: clean workspace with gitignore 2026-03-12 16:16:53 +00:00