mcp-google-ads 1.0.7 → 1.0.8
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/dist/build-info.json +1 -1
- package/dist/index.js +15 -11
- package/dist/resilience.js +4 -1
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"sha":"
|
|
1
|
+
{"sha":"bdd46f2","builtAt":"2026-04-09T21:28:07.536Z"}
|
package/dist/index.js
CHANGED
|
@@ -8,29 +8,30 @@ import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextpro
|
|
|
8
8
|
import { tools } from "./tools.js";
|
|
9
9
|
import { GoogleAdsApi, enums } from "google-ads-api";
|
|
10
10
|
import { readFileSync, existsSync } from "fs";
|
|
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);
|
|
14
16
|
const buildInfo = JSON.parse(readFileSync(join(__buildInfoDir, "build-info.json"), "utf-8"));
|
|
15
|
-
|
|
17
|
+
console.error(`[build] SHA: ${buildInfo.sha} (${buildInfo.builtAt})`);
|
|
16
18
|
}
|
|
17
19
|
catch {
|
|
18
|
-
|
|
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.
|
|
24
|
-
console.
|
|
25
|
-
console.
|
|
26
|
-
console.
|
|
27
|
-
console.
|
|
28
|
-
console.
|
|
29
|
-
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-google-ads`);
|
|
30
31
|
process.exit(0);
|
|
31
32
|
}
|
|
32
33
|
if (process.argv.includes("--version") || process.argv.includes("-v")) {
|
|
33
|
-
console.
|
|
34
|
+
console.error(__cliPkg.version);
|
|
34
35
|
process.exit(0);
|
|
35
36
|
}
|
|
36
37
|
function loadConfig() {
|
|
@@ -1814,4 +1815,7 @@ process.on("SIGINT", () => {
|
|
|
1814
1815
|
console.error("[shutdown] SIGINT received, exiting");
|
|
1815
1816
|
process.exit(0);
|
|
1816
1817
|
});
|
|
1818
|
+
process.on("SIGPIPE", () => {
|
|
1819
|
+
// Client disconnected -- expected during shutdown
|
|
1820
|
+
});
|
|
1817
1821
|
main().catch((err) => logger.error({ error: err.message, stack: err.stack }, "Fatal startup error"));
|
package/dist/resilience.js
CHANGED
|
@@ -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-ads",
|
|
3
3
|
"mcpName": "io.github.mharnett/google-ads",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.8",
|
|
5
5
|
"description": "MCP server for Google Ads API with MCC support, 35 tools for campaign management, reporting, and optimization. Safe by default — all changes created PAUSED.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"bin": {
|