crawlforge-mcp-server 4.2.6 → 4.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +8 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crawlforge-mcp-server",
3
- "version": "4.2.6",
3
+ "version": "4.2.7",
4
4
  "description": "CrawlForge MCP Server - Professional Model Context Protocol server with 23 web scraping, crawling, and content processing tools. Defaults to local Ollama for LLM extraction (no API key needed); OpenAI/Anthropic available as opt-in. v4.0 adds Markdown-first output, pre-built site templates, Camoufox stealth engine, and cost transparency.",
5
5
  "main": "server.js",
6
6
  "bin": {
package/server.js CHANGED
@@ -1163,12 +1163,18 @@ async function gracefulShutdown(signal) {
1163
1163
  process.on('SIGINT', () => gracefulShutdown('SIGINT'));
1164
1164
  process.on('SIGTERM', () => gracefulShutdown('SIGTERM'));
1165
1165
  process.on('uncaughtException', (error) => {
1166
+ // Keep the long-running stdio server alive: a single uncaught error in one
1167
+ // request path should not tear down the session for every other tool. We log
1168
+ // and continue rather than exiting. (Node considers the process state
1169
+ // technically undefined after this; acceptable trade-off for a resilient MCP
1170
+ // server, vs. disconnecting the client on any stray throw.)
1166
1171
  console.error('Uncaught Exception:', error);
1167
- gracefulShutdown('uncaughtException');
1168
1172
  });
1169
1173
  process.on('unhandledRejection', (reason, promise) => {
1174
+ // A stray rejection — typically background async work inside a single tool —
1175
+ // must NOT terminate the whole stdio MCP server, which would disconnect every
1176
+ // other tool mid-session. Log it and keep serving.
1170
1177
  console.error('Unhandled Rejection at:', promise, 'reason:', reason);
1171
- gracefulShutdown('unhandledRejection');
1172
1178
  });
1173
1179
 
1174
1180
  // Memory monitoring (development only)