@mindstone/mcp-server-google-workspace 0.3.0 → 0.4.0
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 +6 -9
- package/dist/tools/definitions/index.d.ts +2 -2
- package/dist/tools/definitions/index.js +4 -6
- package/dist/utils/service-initializer.d.ts +0 -10
- package/dist/utils/service-initializer.js +5 -23
- package/dist/utils/untrusted-content.d.ts +1 -1
- package/dist/utils/untrusted-content.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
[](./LICENSE)
|
|
4
4
|
|
|
5
|
-
Google Workspace MCP server — Gmail, Calendar, Drive, Docs, Sheets, Slides, Contacts, Chat, Meet, Comments, and account diagnostics
|
|
5
|
+
Google Workspace MCP server — Gmail, Calendar, Drive, Docs, Sheets, Slides, Contacts, Chat, Meet, Tasks, Forms, Comments, and account diagnostics.
|
|
6
6
|
|
|
7
7
|
*Multi-account Google Workspace MCP. Host-orchestrated OAuth (the connector neither runs a callback server nor mints OAuth URLs), atomic per-account credential writes, and a structured `auth_required` handoff so the host drives the sign-in flow rather than the server.*
|
|
8
8
|
|
|
9
9
|
## Status
|
|
10
10
|
|
|
11
|
-
- **Version:** [0.
|
|
11
|
+
- **Version:** [0.4.0](./CHANGELOG.md) · npm: not yet published
|
|
12
12
|
- **Auth:** OAuth (host-orchestrated) ([`GOOGLE_CLIENT_SECRET`](./server.json))
|
|
13
|
-
- **Tools:** [
|
|
13
|
+
- **Tools:** [116](./src/tools/definitions/) (Gmail, Calendar, Drive, Docs, Sheets, Slides, Contacts, Chat, Meet, Tasks, Forms, Comments, Account)
|
|
14
14
|
- **Surface:** cloud-api
|
|
15
15
|
- **Machine-readable:** [`STATUS.json`](./STATUS.json)
|
|
16
16
|
|
|
@@ -89,7 +89,6 @@ This server is designed to run alongside a host application that performs the Go
|
|
|
89
89
|
|
|
90
90
|
| Variable | Default | Description |
|
|
91
91
|
| --- | --- | --- |
|
|
92
|
-
| `ENABLE_GOOGLE_TASKS_FORMS` | `false` | Set to `true` to register the additional Google Tasks and Forms tools. |
|
|
93
92
|
| `GOOGLE_WORKSPACE_REQUEST_TIMEOUT_MS` | `60000` | Outbound Google API request timeout in milliseconds (max `300000` = 5 min). |
|
|
94
93
|
|
|
95
94
|
`GOOGLE_WORKSPACE_DISABLE_REFRESH=1` may be injected by a host to make the connector return `auth_required` instead of refreshing tokens. It is intentionally not a user-facing setup variable.
|
|
@@ -153,7 +152,7 @@ Until the host has written `${ACCOUNTS_PATH}` and the matching per-account token
|
|
|
153
152
|
}
|
|
154
153
|
```
|
|
155
154
|
|
|
156
|
-
## Tools (
|
|
155
|
+
## Tools (116)
|
|
157
156
|
|
|
158
157
|
The full list lives under [`src/tools/definitions/`](./src/tools/definitions/) and is also surfaced in [`tools-inventory.json`](./tools-inventory.json). Grouped by domain:
|
|
159
158
|
|
|
@@ -171,10 +170,8 @@ The full list lives under [`src/tools/definitions/`](./src/tools/definitions/) a
|
|
|
171
170
|
| Meet | 3 | List conference records, list transcripts, and read transcript entries (speaker + text). |
|
|
172
171
|
| Comments | 5 | List/create/reply/resolve/delete Drive comments. |
|
|
173
172
|
| Account | 3 | List, authenticate, and remove workspace accounts. |
|
|
174
|
-
| Tasks
|
|
175
|
-
| Forms
|
|
176
|
-
|
|
177
|
-
The `## Status` block counts the 106 default-enabled tools; the additional 10 Tasks + Forms tools register when the feature flag is set.
|
|
173
|
+
| Tasks | 6 | List task lists, and list/create/update/complete/delete tasks. |
|
|
174
|
+
| Forms | 4 | Read-only access to forms and their responses. |
|
|
178
175
|
|
|
179
176
|
### Shared drives
|
|
180
177
|
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* - Docs (documents)
|
|
12
12
|
* - Slides (presentations)
|
|
13
13
|
* - Sheets (spreadsheets)
|
|
14
|
-
* - Tasks (task lists, tasks)
|
|
15
|
-
* - Forms (read-only access to forms and responses)
|
|
14
|
+
* - Tasks (task lists, tasks)
|
|
15
|
+
* - Forms (read-only access to forms and responses)
|
|
16
16
|
*/
|
|
17
17
|
import { ToolMetadata } from "../../modules/tools/registry.js";
|
|
18
18
|
export { accountTools } from "./account.js";
|
|
@@ -11,11 +11,10 @@
|
|
|
11
11
|
* - Docs (documents)
|
|
12
12
|
* - Slides (presentations)
|
|
13
13
|
* - Sheets (spreadsheets)
|
|
14
|
-
* - Tasks (task lists, tasks)
|
|
15
|
-
* - Forms (read-only access to forms and responses)
|
|
14
|
+
* - Tasks (task lists, tasks)
|
|
15
|
+
* - Forms (read-only access to forms and responses)
|
|
16
16
|
*/
|
|
17
17
|
import { createRequire } from 'node:module';
|
|
18
|
-
import { TASKS_FORMS_ENABLED } from "../../utils/service-initializer.js";
|
|
19
18
|
// Import tool definitions from each module
|
|
20
19
|
export { accountTools } from "./account.js";
|
|
21
20
|
export { gmailTools } from "./gmail.js";
|
|
@@ -62,7 +61,6 @@ function withCohortAnnotations(tool) {
|
|
|
62
61
|
};
|
|
63
62
|
}
|
|
64
63
|
// Export all tools combined - maintains backward compatibility
|
|
65
|
-
// Tasks and Forms are only included if ENABLE_GOOGLE_TASKS_FORMS=true
|
|
66
64
|
const rawTools = [
|
|
67
65
|
...accountTools,
|
|
68
66
|
...gmailTools,
|
|
@@ -76,8 +74,8 @@ const rawTools = [
|
|
|
76
74
|
...commentsTools,
|
|
77
75
|
...chatTools,
|
|
78
76
|
...meetTools,
|
|
79
|
-
...
|
|
80
|
-
...
|
|
77
|
+
...tasksTools,
|
|
78
|
+
...formsTools,
|
|
81
79
|
];
|
|
82
80
|
export const allTools = rawTools.map(withCohortAnnotations);
|
|
83
81
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Feature flag for Tasks and Forms APIs.
|
|
3
|
-
*
|
|
4
|
-
* These features require additional OAuth scopes that need to be configured
|
|
5
|
-
* in the Google Cloud Console and may require Google verification.
|
|
6
|
-
* Set ENABLE_GOOGLE_TASKS_FORMS=true to enable once scopes are configured.
|
|
7
|
-
*
|
|
8
|
-
* See: docs/plans/finished/260116_GoogleWorkspace_MCP_Improvements.md
|
|
9
|
-
*/
|
|
10
|
-
export declare const TASKS_FORMS_ENABLED: boolean;
|
|
11
1
|
export declare function initializeAllServices(): Promise<void>;
|
|
12
2
|
//# sourceMappingURL=service-initializer.d.ts.map
|
|
@@ -25,16 +25,6 @@ import { registerFormsScopes } from '../modules/forms/scopes.js';
|
|
|
25
25
|
import { CONTACTS_SCOPES } from '../modules/contacts/scopes.js';
|
|
26
26
|
import { scopeRegistry } from '../modules/tools/scope-registry.js';
|
|
27
27
|
import { applyDefaultGoogleRequestOptions } from './request-timeout.js';
|
|
28
|
-
/**
|
|
29
|
-
* Feature flag for Tasks and Forms APIs.
|
|
30
|
-
*
|
|
31
|
-
* These features require additional OAuth scopes that need to be configured
|
|
32
|
-
* in the Google Cloud Console and may require Google verification.
|
|
33
|
-
* Set ENABLE_GOOGLE_TASKS_FORMS=true to enable once scopes are configured.
|
|
34
|
-
*
|
|
35
|
-
* See: docs/plans/finished/260116_GoogleWorkspace_MCP_Improvements.md
|
|
36
|
-
*/
|
|
37
|
-
export const TASKS_FORMS_ENABLED = process.env.ENABLE_GOOGLE_TASKS_FORMS === 'true';
|
|
38
28
|
// Function to register contacts scopes
|
|
39
29
|
function registerContactsScopes() {
|
|
40
30
|
scopeRegistry.registerScope("contacts", CONTACTS_SCOPES.READONLY);
|
|
@@ -55,15 +45,9 @@ export async function initializeAllServices() {
|
|
|
55
45
|
registerContactsScopes();
|
|
56
46
|
registerChatScopes();
|
|
57
47
|
registerMeetScopes();
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
registerFormsScopes();
|
|
62
|
-
logger.info('Tasks and Forms scopes registered (ENABLE_GOOGLE_TASKS_FORMS=true)');
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
logger.info('Tasks and Forms disabled (set ENABLE_GOOGLE_TASKS_FORMS=true to enable)');
|
|
66
|
-
}
|
|
48
|
+
registerTasksScopes();
|
|
49
|
+
registerFormsScopes();
|
|
50
|
+
logger.info('Tasks and Forms scopes registered');
|
|
67
51
|
// Initialize account module first as other services depend on it
|
|
68
52
|
logger.info('Initializing account module...');
|
|
69
53
|
await initializeAccountModule();
|
|
@@ -80,11 +64,9 @@ export async function initializeAllServices() {
|
|
|
80
64
|
initializeContactsModule().then(() => logger.info('Contacts module initialized')),
|
|
81
65
|
initializeChatModule().then(() => logger.info('Chat module initialized')),
|
|
82
66
|
initializeMeetModule().then(() => logger.info('Meet module initialized')),
|
|
67
|
+
initializeTasksModule().then(() => logger.info('Tasks module initialized')),
|
|
68
|
+
initializeFormsModule().then(() => logger.info('Forms module initialized')),
|
|
83
69
|
];
|
|
84
|
-
// Only initialize Tasks and Forms if enabled
|
|
85
|
-
if (TASKS_FORMS_ENABLED) {
|
|
86
|
-
modulePromises.push(initializeTasksModule().then(() => logger.info('Tasks module initialized')), initializeFormsModule().then(() => logger.info('Forms module initialized')));
|
|
87
|
-
}
|
|
88
70
|
await Promise.all(modulePromises);
|
|
89
71
|
logger.info('All services initialized successfully');
|
|
90
72
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* broken out of. `undefined` passes through untouched. Idempotent for the same
|
|
25
25
|
* `source`.
|
|
26
26
|
*/
|
|
27
|
-
export declare function wrapUntrusted(text: string | undefined, source: string): string | undefined;
|
|
27
|
+
export declare function wrapUntrusted(text: string | null | undefined, source: string): string | undefined;
|
|
28
28
|
/**
|
|
29
29
|
* Recursively wrap every string value reachable inside `value`. Object keys are
|
|
30
30
|
* structural and NOT wrapped; non-string leaves pass through unchanged.
|
|
@@ -33,7 +33,7 @@ function escapeCloseTagSentinels(s) {
|
|
|
33
33
|
* `source`.
|
|
34
34
|
*/
|
|
35
35
|
export function wrapUntrusted(text, source) {
|
|
36
|
-
if (text === undefined)
|
|
36
|
+
if (text === undefined || text === null)
|
|
37
37
|
return undefined;
|
|
38
38
|
const open = `<untrusted-content source="${escapeAttr(source)}">`;
|
|
39
39
|
const close = '</untrusted-content>';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindstone/mcp-server-google-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"mcpName": "io.github.mindstone/mcp-server-google-workspace",
|
|
5
5
|
"description": "Google Workspace MCP server for Gmail, Calendar, Drive, Docs, Sheets, Slides, Contacts, Tasks, and Forms",
|
|
6
6
|
"license": "FSL-1.1-MIT",
|