v6.2.0 — Memory Optimization & Prompt Fix
Highlights
- 78% memory reduction: Per-instance idle RSS drops from ~430 MB to ~80-95 MB via lazy imports
- Orphan prevention: PID lock file prevents duplicate server instances from accumulating
- Prompt fix: MCP prompt number parameters now work correctly
Memory Optimization
| Change | Savings |
|---|---|
Targeted crawlee imports (@crawlee/cheerio + @crawlee/core instead of umbrella) |
~61 MB |
| Lazy-load PlaywrightCrawler on first JS scrape | ~30-50 MB |
| Lazy-load document parsers (pdf-parse, mammoth, jszip) | ~74 MB |
| Lazy-load express, cors, rate-limit in STDIO mode | ~24 MB |
| Event store lazy loading (no eager disk load) | ~5-50 MB |
Process Lifecycle Improvements
- PID lock file (
storage/.server.pid): Kills stale orphan instances on startup - Stdin health check: Periodic check (5s) detects parent process death
- sanitizeUrlCache cap: Bounded at 500 entries with FIFO eviction
Bug Fixes
z.number()→z.coerce.number()infact-check(sources) andliterature-review(yearFrom, sources) prompts — MCP passes all prompt arguments as strings- Added
DOMlib to tsconfig for Playwrightpage.evaluate()browser context types
Install / Upgrade
npm install -g google-researcher-mcp@latest
# or
npx google-researcher-mcp@6.2.0Full Changelog: v6.1.0...v6.2.0
📦 Installation
npm install google-researcher-mcp@6.2.0