jaegis-chat-export-mcp-server
v1.0.2
Published
JAEGIS Chat Export MCP Server
Readme
JAEGIS Chat Export MCP Server
A minimal HTTP + WebSocket server for chat export flows, built for Node 22 LTS, ESM-first, with CI coverage and Playwright e2e support.
Badges
Replace OWNER/REPO with your GitHub org/repo.
Features
- Single port server (34675) serving:
- HTTP GET /health (status JSON)
- HTTP GET /export/:id (retrieve export payload)
- WebSocket endpoint on same server for export protocol
- ESM-first, Node 22 LTS baseline; CI tests Node 22 & 24
- Jest 30 with coverage (lcov) and Codecov upload
- Playwright e2e with env-configured endpoints (HTTP, WS)
Getting Started
Prerequisites:
- Node 22.x (LTS)
Install:
npm installDevelop:
npm run devBuild & Run:
npm run build
npm startThe server listens on PORT (default 34675)
- /health returns
{ ok: true, uptime, exports } - /export/:id returns export payload stored via WS
exportmessages
Export Protocol (WebSocket)
- Client connects to ws://:
- Send an export message:
{"type":"export","id":"123","data":{"messages":[{"role":"user","content":"hi"}]}}- Server stores payload and replies:
{"type":"export:ack","id":"123"}- Retrieve via HTTP:
GET /export/123
Ping/Pong:
- Send
{ "type": "ping" }=> server replies{ "type": "pong", "ts": <unix_ms> }
Playwright e2e
Set environment variables (locally or in CI):
PLAYWRIGHT_BASE_URL— base HTTP URL for UI tests (optional; tests skip if not set)WS_URL— WebSocket URL for WS tests (optional; tests skip if not set)
Run e2e:
npm run test:e2eCoverage & Codecov
Jest generates lcov reports automatically during CI and when running npm test.
- Coverage output directory:
coverage - lcov files:
coverage/lcov.info
Codecov Setup
- Create a Codecov account and add your repository (https://codecov.io)
- For private repos: add
CODECOV_TOKENin GitHub → Settings → Secrets and variables → Actions → New repository secret - Optionally set repository variables for e2e:
CI_E2E=trueto enable the e2e jobPLAYWRIGHT_BASE_URLfor HTTP e2eWS_URLfor WebSocket e2e
- The CI workflow uploads coverage artifacts per Node version and then the
coveragejob merges and uploads them to Codecov.
Interpreting Coverage Reports
- In PRs, Codecov will comment with coverage deltas and overall project coverage
- The badge updates automatically as coverage changes
- You can view file-by-file and line-by-line coverage in the Codecov UI
Docker
docker build -t jaegis-mcp:dev .
docker run -p 34675:34675 jaegis-mcp:devSecurity & Performance
- Non-root runtime user in Docker
- better-sqlite3 notes: WAL mode recommended; see research.md
- Logging: JSON logs via winston
License
MIT
