mcp-google-gsc 1.0.8 → 1.0.10
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.
- package/README.md +2 -0
- package/dist/build-info.json +1 -1
- package/dist/index.js +11 -3
- package/dist/tools.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"sha":"
|
|
1
|
+
{"sha":"9c16844","builtAt":"2026-04-09T22:09:34.569Z"}
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
|
3
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
4
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
5
5
|
import { readFileSync, existsSync } from "fs";
|
|
6
|
-
import { join, dirname } from "path";
|
|
6
|
+
import { join, dirname, resolve, isAbsolute } from "path";
|
|
7
7
|
import { google } from "googleapis";
|
|
8
8
|
import { GscAuthError, GscRateLimitError, GscServiceError, classifyError, validateCredentials, } from "./errors.js";
|
|
9
9
|
import { tools } from "./tools.js";
|
|
@@ -19,6 +19,11 @@ try {
|
|
|
19
19
|
catch {
|
|
20
20
|
console.error(`[build] ${__cliPkg.name}@${__cliPkg.version} (dev mode)`);
|
|
21
21
|
}
|
|
22
|
+
// Version safety: warn if running a deprecated or dangerously old version
|
|
23
|
+
const __minimumSafeVersion = "1.0.5"; // minimum version with input sanitization
|
|
24
|
+
if (__cliPkg.version < __minimumSafeVersion) {
|
|
25
|
+
console.error(`[WARNING] Running deprecated version ${__cliPkg.version}. Minimum safe version is ${__minimumSafeVersion}. Please upgrade.`);
|
|
26
|
+
}
|
|
22
27
|
// CLI flags
|
|
23
28
|
if (process.argv.includes("--help") || process.argv.includes("-h")) {
|
|
24
29
|
console.error(`${__cliPkg.name} v${__cliPkg.version}\n`);
|
|
@@ -43,13 +48,16 @@ function loadConfig() {
|
|
|
43
48
|
const configPath = join(dirname(new URL(import.meta.url).pathname), "..", "config.json");
|
|
44
49
|
if (existsSync(configPath)) {
|
|
45
50
|
const raw = JSON.parse(readFileSync(configPath, "utf-8"));
|
|
51
|
+
const rawCf = raw.credentials_file || envTrimmed("GOOGLE_APPLICATION_CREDENTIALS");
|
|
46
52
|
return {
|
|
47
|
-
credentials_file:
|
|
53
|
+
credentials_file: rawCf && !isAbsolute(rawCf) ? resolve(rawCf) : rawCf,
|
|
48
54
|
clients: raw.clients || {},
|
|
49
55
|
};
|
|
50
56
|
}
|
|
51
57
|
// Fall back to env vars (single-property mode)
|
|
52
|
-
const
|
|
58
|
+
const rawCredsFile = envTrimmed("GOOGLE_APPLICATION_CREDENTIALS");
|
|
59
|
+
// Resolve relative credential paths to absolute (CWD is unpredictable in MCP hosts)
|
|
60
|
+
const credsFile = rawCredsFile && !isAbsolute(rawCredsFile) ? resolve(rawCredsFile) : rawCredsFile;
|
|
53
61
|
if (credsFile) {
|
|
54
62
|
return {
|
|
55
63
|
credentials_file: credsFile,
|
package/dist/tools.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const tools = [
|
|
2
2
|
{
|
|
3
3
|
name: "gsc_get_client_context",
|
|
4
|
-
description: "Get the current GSC client context based on working directory. Call this first to confirm which Search Console property you're working with.",
|
|
4
|
+
description: "Get the current GSC client context and health status based on working directory. Call this first to confirm which Search Console property you're working with.",
|
|
5
5
|
inputSchema: {
|
|
6
6
|
type: "object",
|
|
7
7
|
properties: {
|
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.
|
|
4
|
+
"version": "1.0.10",
|
|
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": {
|