gogcli-mcp 1.0.4 → 1.0.5
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/.mcp.json +1 -2
- package/CLAUDE.md +1 -1
- package/dist/index.js +3 -2
- package/{gogcli-mcp-1.0.4.skill → gogcli-mcp-1.0.5.skill} +0 -0
- package/manifest.json +2 -10
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/runner.ts +4 -1
- package/tests/runner.test.ts +17 -0
package/.mcp.json
CHANGED
package/CLAUDE.md
CHANGED
|
@@ -31,7 +31,7 @@ Main is always one version ahead of the latest tag. To release, run the **Tag &
|
|
|
31
31
|
4. Rebuilds, commits, and pushes main + tag
|
|
32
32
|
5. The tag push triggers the **Release** workflow (CI + npm publish + .mcpb + .skill + GitHub release)
|
|
33
33
|
|
|
34
|
-
Do NOT manually bump versions or create tags unless the user explicitly asks.
|
|
34
|
+
Do NOT manually bump versions or create tags unless the user explicitly asks. Always prefer the Tag & Bump action: `gh workflow run tag-and-bump.yml --ref main`. The action handles all four version files, tagging, and triggering the release.
|
|
35
35
|
|
|
36
36
|
## Architecture
|
|
37
37
|
|
package/dist/index.js
CHANGED
|
@@ -30137,7 +30137,8 @@ async function run(args, options = {}) {
|
|
|
30137
30137
|
fullArgs.push(...args);
|
|
30138
30138
|
const effectiveTimeout = timeout ?? TIMEOUT_MS;
|
|
30139
30139
|
return new Promise((resolve, reject) => {
|
|
30140
|
-
const
|
|
30140
|
+
const { GOG_ACCESS_TOKEN: _, ...cleanEnv } = process.env;
|
|
30141
|
+
const child = spawner(process.env.GOG_PATH ?? "gog", fullArgs, { env: cleanEnv });
|
|
30141
30142
|
const stdoutChunks = [];
|
|
30142
30143
|
const stderrChunks = [];
|
|
30143
30144
|
let settled = false;
|
|
@@ -30965,7 +30966,7 @@ function registerTasksTools(server2) {
|
|
|
30965
30966
|
}
|
|
30966
30967
|
|
|
30967
30968
|
// src/index.ts
|
|
30968
|
-
var server = new McpServer({ name: "gogcli", version: "1.0.
|
|
30969
|
+
var server = new McpServer({ name: "gogcli", version: "1.0.5" });
|
|
30969
30970
|
registerAuthTools(server);
|
|
30970
30971
|
registerCalendarTools(server);
|
|
30971
30972
|
registerContactsTools(server);
|
|
Binary file
|
package/manifest.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"manifest_version": "0.3",
|
|
4
4
|
"name": "gogcli-mcp",
|
|
5
5
|
"display_name": "gogcli",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.5",
|
|
7
7
|
"description": "Google Sheets (and more) for Claude via gogcli — read, write, and manage spreadsheets",
|
|
8
8
|
"author": {
|
|
9
9
|
"name": "Chris Hall",
|
|
@@ -37,8 +37,7 @@
|
|
|
37
37
|
],
|
|
38
38
|
"env": {
|
|
39
39
|
"GOG_ACCOUNT": "${user_config.gog_account}",
|
|
40
|
-
"GOG_PATH": "${user_config.gog_path}"
|
|
41
|
-
"GOG_ACCESS_TOKEN": "${user_config.gog_access_token}"
|
|
40
|
+
"GOG_PATH": "${user_config.gog_path}"
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
43
|
},
|
|
@@ -54,13 +53,6 @@
|
|
|
54
53
|
"title": "gog Executable Path",
|
|
55
54
|
"description": "Path to the gog executable (optional — defaults to 'gog' on your PATH)",
|
|
56
55
|
"required": false
|
|
57
|
-
},
|
|
58
|
-
"gog_access_token": {
|
|
59
|
-
"type": "string",
|
|
60
|
-
"title": "Google Access Token",
|
|
61
|
-
"description": "Short-lived OAuth access token (optional — bypasses stored refresh tokens, expires in ~1h). Useful for CI or automated contexts.",
|
|
62
|
-
"required": false,
|
|
63
|
-
"sensitive": true
|
|
64
56
|
}
|
|
65
57
|
},
|
|
66
58
|
"tools": [
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { registerGmailTools } from './tools/gmail.js';
|
|
|
10
10
|
import { registerSheetsTools } from './tools/sheets.js';
|
|
11
11
|
import { registerTasksTools } from './tools/tasks.js';
|
|
12
12
|
|
|
13
|
-
const server = new McpServer({ name: 'gogcli', version: '1.0.
|
|
13
|
+
const server = new McpServer({ name: 'gogcli', version: '1.0.5' });
|
|
14
14
|
|
|
15
15
|
registerAuthTools(server);
|
|
16
16
|
registerCalendarTools(server);
|
package/src/runner.ts
CHANGED
|
@@ -42,7 +42,10 @@ export async function run(args: string[], options: RunOptions = {}): Promise<str
|
|
|
42
42
|
const effectiveTimeout = timeout ?? TIMEOUT_MS;
|
|
43
43
|
|
|
44
44
|
return new Promise((resolve, reject) => {
|
|
45
|
-
|
|
45
|
+
// Strip GOG_ACCESS_TOKEN so gogcli uses stored refresh tokens instead of
|
|
46
|
+
// a potentially stale direct access token passed through MCP env config.
|
|
47
|
+
const { GOG_ACCESS_TOKEN: _, ...cleanEnv } = process.env;
|
|
48
|
+
const child = spawner(process.env.GOG_PATH ?? 'gog', fullArgs, { env: cleanEnv });
|
|
46
49
|
const stdoutChunks: Buffer[] = [];
|
|
47
50
|
const stderrChunks: Buffer[] = [];
|
|
48
51
|
let settled = false;
|
package/tests/runner.test.ts
CHANGED
|
@@ -300,6 +300,23 @@ describe('run', () => {
|
|
|
300
300
|
vi.useRealTimers();
|
|
301
301
|
});
|
|
302
302
|
|
|
303
|
+
it('strips GOG_ACCESS_TOKEN from child environment to force refresh-token auth', async () => {
|
|
304
|
+
const spawner = makeSpawner(0, '{}');
|
|
305
|
+
const originalToken = process.env.GOG_ACCESS_TOKEN;
|
|
306
|
+
process.env.GOG_ACCESS_TOKEN = 'stale-token-from-mcp-config';
|
|
307
|
+
try {
|
|
308
|
+
await run(['docs', 'comments', 'list', 'docId'], { spawner });
|
|
309
|
+
const envPassed = (spawner as ReturnType<typeof vi.fn>).mock.calls[0][2].env as NodeJS.ProcessEnv;
|
|
310
|
+
expect(envPassed.GOG_ACCESS_TOKEN).toBeUndefined();
|
|
311
|
+
} finally {
|
|
312
|
+
if (originalToken === undefined) {
|
|
313
|
+
delete process.env.GOG_ACCESS_TOKEN;
|
|
314
|
+
} else {
|
|
315
|
+
process.env.GOG_ACCESS_TOKEN = originalToken;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
|
|
303
320
|
it('ignores timeout if close event already settled the promise', async () => {
|
|
304
321
|
vi.useFakeTimers();
|
|
305
322
|
const spawner = vi.fn(() => {
|