JAEGIS Chat Export MCP Server
npm install jaegis-chat-export-mcp-serverA minimal HTTP + WebSocket server for chat export flows, built for Node 22 LTS, ESM-first, with CI coverage and Playwright e2e support.


Replace OWNER/REPO with your GitHub org/repo.
Prerequisites:
- Node 22.x (LTS)
Install:
``bash`
npm install
Develop:
`bash`
npm run dev
Build & Run:
`bash`
npm run build
npm start
The server listens on PORT (default 34675)
- /health returns { ok: true, uptime, exports }export
- /export/:id returns export payload stored via WS messages
json
{"type":"export","id":"123","data":{"messages":[{"role":"user","content":"hi"}]}}
`
- Server stores payload and replies:
`json
{"type":"export:ack","id":"123"}
`
- Retrieve via HTTP: GET /export/123Ping/Pong:
- Send
{ "type": "ping" } => server replies { "type": "pong", "ts": 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:
`bash
npm run test:e2e
`Coverage & Codecov
Jest generates lcov reports automatically during CI and when running
npm test.
- Coverage output directory: coverage
- lcov files: coverage/lcov.info$3
1. Create a Codecov account and add your repository (https://codecov.io)
2. For private repos: add CODECOV_TOKEN in GitHub → Settings → Secrets and variables → Actions → New repository secret
3. Optionally set repository variables for e2e:
- CI_E2E=true to enable the e2e job
- PLAYWRIGHT_BASE_URL for HTTP e2e
- WS_URL for WebSocket e2e
4. The CI workflow uploads coverage artifacts per Node version and then the coverage job merges and uploads them to Codecov.$3
- 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 UIDocker
`bash
docker build -t jaegis-mcp:dev .
docker run -p 34675:34675 jaegis-mcp:dev
``