gogcli-mcp-drive 3.0.0 → 4.0.1
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/dist/index.js +476 -946
- package/manifest.json +2 -2
- package/mint.yaml +41 -37
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/index.ts +3 -4
- package/src/tools/drive-extra.ts +1 -1
- package/tsconfig.json +1 -1
package/manifest.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"manifest_version": "0.3",
|
|
4
4
|
"name": "gogcli-mcp-drive",
|
|
5
5
|
"display_name": "gogcli (Drive)",
|
|
6
|
-
"version": "
|
|
6
|
+
"version": "4.0.1",
|
|
7
7
|
"description": "Extended Google Drive for Claude via gogcli — auth + full Drive support (upload, download, permissions, comments, shared drives)",
|
|
8
8
|
"author": {
|
|
9
9
|
"name": "Chris Hall",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
"name": "gog_drive_read_bytes",
|
|
106
|
-
"description": "Fetch a Drive file's raw bytes as a base64 resource
|
|
106
|
+
"description": "Fetch a Drive file's raw bytes as a base64 resource"
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
"name": "gog_drive_get",
|
package/mint.yaml
CHANGED
|
@@ -12,25 +12,29 @@ env:
|
|
|
12
12
|
- name: GOG_CLIENT_ID
|
|
13
13
|
required: false
|
|
14
14
|
help: >-
|
|
15
|
-
Google OAuth client id.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
Google OAuth client id. Read by the Node wrapper at startup
|
|
16
|
+
(bootstrap-auth.ts), which imports it into gog's keyring via a temp file
|
|
17
|
+
together with GOG_CLIENT_SECRET, GOG_REFRESH_TOKEN and GOG_ACCOUNT — set
|
|
18
|
+
all four or none. Not a secret, so unlike GOG_CLIENT_SECRET and
|
|
19
|
+
GOG_REFRESH_TOKEN it is not stripped from the spawned `gog`'s
|
|
20
|
+
environment; gog authenticates from its keyring under $HOME (see
|
|
21
|
+
state.dataDir).
|
|
20
22
|
- name: GOG_CLIENT_SECRET
|
|
21
23
|
secret: true
|
|
22
24
|
required: false
|
|
23
25
|
help: >-
|
|
24
|
-
Google OAuth client secret.
|
|
25
|
-
by runner.ts's
|
|
26
|
+
Google OAuth client secret. Imported into gog's keyring at startup with
|
|
27
|
+
GOG_CLIENT_ID; stripped from the spawned CLI's environment by runner.ts's
|
|
28
|
+
*_SECRET rule.
|
|
26
29
|
- name: GOG_REFRESH_TOKEN
|
|
27
30
|
secret: true
|
|
28
31
|
required: false
|
|
29
32
|
help: >-
|
|
30
|
-
Google OAuth refresh token
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
Google OAuth refresh token (`gog auth tokens export` prints one). Imported
|
|
34
|
+
into gog's keyring at startup with GOG_CLIENT_ID; stripped from the
|
|
35
|
+
spawned CLI's environment by runner.ts's *_TOKEN rule. Changing it
|
|
36
|
+
re-imports on the next start; an in-connector re-auth
|
|
37
|
+
(gog_auth_add_url/complete) stays in effect until it changes.
|
|
34
38
|
- name: GOG_ACCESS_TOKEN
|
|
35
39
|
secret: true
|
|
36
40
|
required: false
|
|
@@ -41,8 +45,21 @@ env:
|
|
|
41
45
|
- name: GOG_ACCOUNT
|
|
42
46
|
required: false
|
|
43
47
|
help: >-
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
The Google account to act as. Required for the startup auth bootstrap
|
|
49
|
+
(the refresh token is imported under this email); otherwise defaults to
|
|
50
|
+
gog's single/most recent account.
|
|
51
|
+
- name: GOG_KEYRING_BACKEND
|
|
52
|
+
required: false
|
|
53
|
+
help: >-
|
|
54
|
+
gog's credential store. Set to "file" on a headless host — there is no OS
|
|
55
|
+
keychain — so the keyring lives on the persistent data dir.
|
|
56
|
+
- name: GOG_KEYRING_PASSWORD
|
|
57
|
+
secret: true
|
|
58
|
+
required: false
|
|
59
|
+
help: >-
|
|
60
|
+
Encrypts gog's file keyring on the data dir. Required with
|
|
61
|
+
GOG_KEYRING_BACKEND=file. Deliberately not stripped from the spawned
|
|
62
|
+
CLI's environment — it is the one credential gog itself reads.
|
|
46
63
|
- name: GOG_READONLY
|
|
47
64
|
required: false
|
|
48
65
|
help: >-
|
|
@@ -53,24 +70,13 @@ env:
|
|
|
53
70
|
help: >-
|
|
54
71
|
Path to the `gog` binary. Leave unset when the dependency below supplies
|
|
55
72
|
it; set it only to point at a binary you manage yourself.
|
|
56
|
-
- name: GOG_RUNNER_URL
|
|
57
|
-
required: false
|
|
58
|
-
help: >-
|
|
59
|
-
URL of a remote gog runner to execute against instead of spawning the
|
|
60
|
-
local binary. If you set this, add its host to egress.allow.
|
|
61
|
-
- name: GOG_RUNNER_KEY
|
|
62
|
-
secret: true
|
|
63
|
-
required: false
|
|
64
|
-
help: >-
|
|
65
|
-
Shared key authenticating calls to GOG_RUNNER_URL. Required whenever that
|
|
66
|
-
is set.
|
|
67
73
|
- name: GOG_TIMEZONE
|
|
68
74
|
required: false
|
|
69
75
|
help: >-
|
|
70
|
-
The IANA zone gog
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
America/New_York.
|
|
76
|
+
The IANA zone gog formats its naive timestamps in. The wrapper passes
|
|
77
|
+
it to every spawned gog and reads it back (naiveSourceTimeZone) to
|
|
78
|
+
re-attach the offset, so the two always agree. Unset or invalid, both
|
|
79
|
+
use DISPLAY_TZ, then America/New_York — never the host's local zone.
|
|
74
80
|
- name: DISPLAY_TZ
|
|
75
81
|
required: false
|
|
76
82
|
help: >-
|
|
@@ -82,9 +88,8 @@ dependencies:
|
|
|
82
88
|
# Every tool shells out to the `gog` CLI; without it the server starts and
|
|
83
89
|
# then fails on the first call. This tag must track
|
|
84
90
|
# packages/gogcli-mcp/src/runner.ts's MIN_GOG_VERSION (the floor the tools
|
|
85
|
-
# assume)
|
|
86
|
-
#
|
|
87
|
-
# nine pins too.
|
|
91
|
+
# assume). See CLAUDE.md "Required gog version" — bumping the floor means
|
|
92
|
+
# bumping these nine pins, and the pin stored on each mcp-host registration.
|
|
88
93
|
- kind: github-release
|
|
89
94
|
repo: openclaw/gogcli
|
|
90
95
|
tag: v0.40.0
|
|
@@ -93,15 +98,14 @@ dependencies:
|
|
|
93
98
|
state:
|
|
94
99
|
dataDir: true
|
|
95
100
|
reason: >-
|
|
96
|
-
`gog` keeps its authorised-account state and
|
|
97
|
-
|
|
98
|
-
|
|
101
|
+
`gog` keeps its authorised-account state and file keyring under $HOME, and
|
|
102
|
+
the wrapper keeps its auth-bootstrap marker (~/.gogcli-mcp) there, so a
|
|
103
|
+
restart neither re-imports an unchanged secret nor discards an
|
|
104
|
+
in-connector re-auth. Without a persistent data dir every cold start has
|
|
105
|
+
only what the env secrets can re-seed.
|
|
99
106
|
egress:
|
|
100
107
|
allow:
|
|
101
108
|
# Google OAuth token exchange and the Google REST APIs the CLI calls.
|
|
102
109
|
- oauth2.googleapis.com
|
|
103
110
|
- www.googleapis.com
|
|
104
111
|
- googleapis.com
|
|
105
|
-
#
|
|
106
|
-
# NOTE: if you set GOG_RUNNER_URL to run against a remote gog runner, add
|
|
107
|
-
# that host here too — it is supplied at runtime and cannot be declared.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gogcli-mcp-drive",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"mcpName": "io.github.chrischall/gogcli-mcp-drive",
|
|
5
5
|
"description": "Extended Google Drive MCP server via gogcli — auth + full Drive support (upload/download/permissions/comments/shared drives)",
|
|
6
6
|
"author": "Claude Code (AI) <https://www.anthropic.com/claude>",
|
package/server.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"source": "github",
|
|
8
8
|
"subfolder": "packages/gogcli-mcp-drive"
|
|
9
9
|
},
|
|
10
|
-
"version": "
|
|
10
|
+
"version": "4.0.1",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "gogcli-mcp-drive",
|
|
15
|
-
"version": "
|
|
15
|
+
"version": "4.0.1",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|
package/src/index.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { runMcp } from '@chrischall/mcp-utils';
|
|
3
|
-
import { VERSION, authToolsFor, registerDriveTools,
|
|
3
|
+
import { VERSION, authToolsFor, registerDriveTools, bootstrapGogAuth } from '../../gogcli-mcp/src/lib.js';
|
|
4
4
|
import { registerExtraDriveTools } from './tools/drive-extra.js';
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
useRemoteGogRunner();
|
|
7
|
+
// Seed gog's keyring from GOG_CLIENT_ID/SECRET/REFRESH_TOKEN/ACCOUNT when the host injects them.
|
|
8
|
+
await bootstrapGogAuth();
|
|
10
9
|
|
|
11
10
|
await runMcp({
|
|
12
11
|
name: 'gogcli-drive',
|
package/src/tools/drive-extra.ts
CHANGED
|
@@ -36,7 +36,7 @@ export function registerExtraDriveTools(server: McpServer): void {
|
|
|
36
36
|
'Conditional replacement refuses Google Workspace files (Docs/Sheets/Slides), which have no replaceable binary content.',
|
|
37
37
|
annotations: { destructiveHint: true },
|
|
38
38
|
inputSchema: z.object({
|
|
39
|
-
localPath: z.string().optional().describe('Path to the file to upload, resolved ON THE GOG SERVER\'s filesystem — NOT this client\'s. Only usable when gog runs on the same machine you do (local stdio); on
|
|
39
|
+
localPath: z.string().optional().describe('Path to the file to upload, resolved ON THE GOG SERVER\'s filesystem — NOT this client\'s. Only usable when gog runs on the same machine you do (local stdio); on a hosted deployment (e.g. mcp-host) this path does not exist and the call fails with "no such file or directory" — use content there. Exactly one of localPath / content is required.'),
|
|
40
40
|
content: z.string().optional().describe('The file\'s bytes, base64-encoded (standard alphabet, with padding) — upload a file you hold without it existing anywhere on the gog server. This is the only route that works when the caller and gog share no filesystem. Requires name (there is no path to take a filename from). Max 8 MiB; for anything larger use localPath from a local deployment. Exactly one of localPath / content is required — supplying both is an error, not a precedence rule.'),
|
|
41
41
|
name: z.string().optional().describe('Override filename (create) or rename target (replace)'),
|
|
42
42
|
parent: z.string().optional().describe('Destination folder ID (create only)'),
|
package/tsconfig.json
CHANGED