mcp-google-gsc 1.0.5 → 1.0.6

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.
@@ -1 +1 @@
1
- {"sha":"2dbde9f","builtAt":"2026-04-09T21:18:50.062Z"}
1
+ {"sha":"0a7079a","builtAt":"2026-04-09T21:28:28.271Z"}
package/dist/index.js CHANGED
@@ -8,6 +8,8 @@ import { google } from "googleapis";
8
8
  import { GscAuthError, GscRateLimitError, GscServiceError, classifyError, validateCredentials, } from "./errors.js";
9
9
  import { tools } from "./tools.js";
10
10
  import { withResilience, safeResponse, logger } from "./resilience.js";
11
+ // CLI package info
12
+ const __cliPkg = JSON.parse(readFileSync(join(dirname(new URL(import.meta.url).pathname), "..", "package.json"), "utf-8"));
11
13
  // Log build fingerprint at startup
12
14
  try {
13
15
  const __buildInfoDir = dirname(new URL(import.meta.url).pathname);
@@ -15,22 +17,21 @@ try {
15
17
  console.error(`[build] SHA: ${buildInfo.sha} (${buildInfo.builtAt})`);
16
18
  }
17
19
  catch {
18
- // build-info.json not present (dev mode)
20
+ console.error(`[build] ${__cliPkg.name}@${__cliPkg.version} (dev mode)`);
19
21
  }
20
22
  // CLI flags
21
- const __cliPkg = JSON.parse(readFileSync(join(dirname(new URL(import.meta.url).pathname), "..", "package.json"), "utf-8"));
22
23
  if (process.argv.includes("--help") || process.argv.includes("-h")) {
23
- console.log(`${__cliPkg.name} v${__cliPkg.version}\n`);
24
- console.log(`Usage: ${__cliPkg.name} [options]\n`);
25
- console.log("MCP server communicating via stdio. Configure in your .mcp.json.\n");
26
- console.log("Options:");
27
- console.log(" --help, -h Show this help message");
28
- console.log(" --version, -v Show version number");
29
- console.log(`\nDocumentation: https://github.com/mharnett/mcp-search-console`);
24
+ console.error(`${__cliPkg.name} v${__cliPkg.version}\n`);
25
+ console.error(`Usage: ${__cliPkg.name} [options]\n`);
26
+ console.error("MCP server communicating via stdio. Configure in your .mcp.json.\n");
27
+ console.error("Options:");
28
+ console.error(" --help, -h Show this help message");
29
+ console.error(" --version, -v Show version number");
30
+ console.error(`\nDocumentation: https://github.com/mharnett/mcp-search-console`);
30
31
  process.exit(0);
31
32
  }
32
33
  if (process.argv.includes("--version") || process.argv.includes("-v")) {
33
- console.log(__cliPkg.version);
34
+ console.error(__cliPkg.version);
34
35
  process.exit(0);
35
36
  }
36
37
  function loadConfig() {
@@ -386,4 +387,7 @@ process.on("SIGINT", () => {
386
387
  console.error("[shutdown] SIGINT received, exiting");
387
388
  process.exit(0);
388
389
  });
390
+ process.on("SIGPIPE", () => {
391
+ // Client disconnected -- expected during shutdown
392
+ });
389
393
  main().catch(console.error);
@@ -12,10 +12,13 @@ export const logger = pino({
12
12
  colorize: true,
13
13
  singleLine: true,
14
14
  translateTime: "SYS:standard",
15
+ destination: 2, // stderr -- stdout is reserved for MCP JSON-RPC
15
16
  },
16
17
  },
17
18
  }),
18
- });
19
+ },
20
+ // When no transport (test mode), write to stderr directly
21
+ process.env.NODE_ENV === "test" ? pino.destination(2) : undefined);
19
22
  // ============================================
20
23
  // SAFE RESPONSE (Response Size Limiting)
21
24
  // ============================================
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mcp-google-gsc",
3
3
  "mcpName": "io.github.mharnett/google-gsc",
4
- "version": "1.0.5",
4
+ "version": "1.0.6",
5
5
  "description": "MCP server for Google Search Console API with multi-client support, search analytics, and URL inspection.",
6
6
  "main": "dist/index.js",
7
7
  "bin": {