@aaronsb/google-workspace-mcp 3.0.0 → 4.0.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.
Files changed (145) hide show
  1. package/LICENSE +201 -21
  2. package/LICENSE-MIT +21 -0
  3. package/NOTICE +24 -0
  4. package/README.md +71 -52
  5. package/build/accounts/auth.d.ts +1 -1
  6. package/build/accounts/auth.js +1 -1
  7. package/build/accounts/oauth.js +3 -3
  8. package/build/accounts/oauth.js.map +1 -1
  9. package/build/accounts/token-service.js +1 -1
  10. package/build/accounts/token-service.js.map +1 -1
  11. package/build/coverage/analyze.d.ts +1 -1
  12. package/build/coverage/analyze.js +6 -4
  13. package/build/coverage/analyze.js.map +1 -1
  14. package/build/coverage/baseline.js +37 -20
  15. package/build/coverage/baseline.js.map +1 -1
  16. package/build/coverage/compare.d.ts +1 -1
  17. package/build/coverage/compare.js +19 -10
  18. package/build/coverage/compare.js.map +1 -1
  19. package/build/coverage/discover.d.ts +5 -5
  20. package/build/coverage/discover.js +71 -155
  21. package/build/coverage/discover.js.map +1 -1
  22. package/build/coverage/report.js +3 -3
  23. package/build/coverage/report.js.map +1 -1
  24. package/build/coverage/types.d.ts +19 -4
  25. package/build/executor/index.d.ts +0 -3
  26. package/build/executor/index.js +1 -2
  27. package/build/executor/index.js.map +1 -1
  28. package/build/factory/defaults.js +30 -4
  29. package/build/factory/defaults.js.map +1 -1
  30. package/build/factory/generator.d.ts +10 -2
  31. package/build/factory/generator.js +54 -69
  32. package/build/factory/generator.js.map +1 -1
  33. package/build/factory/manifest/README.md +4 -3
  34. package/build/factory/manifest/calendar.yaml +1 -11
  35. package/build/factory/manifest/docs.yaml +15 -6
  36. package/build/factory/manifest/drive.yaml +1 -5
  37. package/build/factory/manifest/gmail.yaml +9 -24
  38. package/build/factory/manifest/meet.yaml +1 -1
  39. package/build/factory/manifest/sheets.yaml +2 -5
  40. package/build/factory/manifest/tasks.yaml +40 -2
  41. package/build/factory/patches.js +2 -0
  42. package/build/factory/patches.js.map +1 -1
  43. package/build/factory/safety.js +4 -4
  44. package/build/factory/safety.js.map +1 -1
  45. package/build/factory/types.d.ts +16 -15
  46. package/build/google/client.d.ts +45 -0
  47. package/build/google/client.js +232 -0
  48. package/build/google/client.js.map +1 -0
  49. package/build/google/descriptor.d.ts +40 -0
  50. package/build/google/descriptor.js +37 -0
  51. package/build/google/descriptor.js.map +1 -0
  52. package/build/google/descriptor.json +5271 -0
  53. package/build/google/errors.d.ts +45 -0
  54. package/build/google/errors.js +44 -0
  55. package/build/google/errors.js.map +1 -0
  56. package/build/google/methods.d.ts +37 -0
  57. package/build/google/methods.js +13 -0
  58. package/build/google/methods.js.map +1 -0
  59. package/build/index.js +3 -3
  60. package/build/index.js.map +1 -1
  61. package/build/node-floor.js +1 -1
  62. package/build/node-floor.js.map +1 -1
  63. package/build/server/formatting/markdown.d.ts +1 -1
  64. package/build/server/formatting/markdown.js +1 -1
  65. package/build/server/formatting/next-steps.js +1 -1
  66. package/build/server/formatting/next-steps.js.map +1 -1
  67. package/build/server/handlers/accounts.js +2 -2
  68. package/build/server/handlers/accounts.js.map +1 -1
  69. package/build/server/scratchpad/adapters/import-doc.js +15 -13
  70. package/build/server/scratchpad/adapters/import-doc.js.map +1 -1
  71. package/build/server/scratchpad/adapters/import-drive.js +16 -11
  72. package/build/server/scratchpad/adapters/import-drive.js.map +1 -1
  73. package/build/server/scratchpad/adapters/import-email.js +3 -15
  74. package/build/server/scratchpad/adapters/import-email.js.map +1 -1
  75. package/build/server/scratchpad/adapters/import-meet.js +5 -17
  76. package/build/server/scratchpad/adapters/import-meet.js.map +1 -1
  77. package/build/server/scratchpad/adapters/import-sheet.js +5 -6
  78. package/build/server/scratchpad/adapters/import-sheet.js.map +1 -1
  79. package/build/server/scratchpad/adapters/send-calendar.js +18 -13
  80. package/build/server/scratchpad/adapters/send-calendar.js.map +1 -1
  81. package/build/server/scratchpad/adapters/send-doc.js +22 -17
  82. package/build/server/scratchpad/adapters/send-doc.js.map +1 -1
  83. package/build/server/scratchpad/adapters/send-email-draft.d.ts +1 -1
  84. package/build/server/scratchpad/adapters/send-email-draft.js +17 -25
  85. package/build/server/scratchpad/adapters/send-email-draft.js.map +1 -1
  86. package/build/server/scratchpad/adapters/send-email.d.ts +2 -2
  87. package/build/server/scratchpad/adapters/send-email.js +21 -25
  88. package/build/server/scratchpad/adapters/send-email.js.map +1 -1
  89. package/build/server/scratchpad/adapters/send-sheet.js +10 -10
  90. package/build/server/scratchpad/adapters/send-sheet.js.map +1 -1
  91. package/build/server/scratchpad/adapters/send-task.js +9 -8
  92. package/build/server/scratchpad/adapters/send-task.js.map +1 -1
  93. package/build/server/scratchpad/handler.js +22 -28
  94. package/build/server/scratchpad/handler.js.map +1 -1
  95. package/build/server/scratchpad/manager.d.ts +1 -1
  96. package/build/server/server.js +13 -10
  97. package/build/server/server.js.map +1 -1
  98. package/build/server/session/tracker.js +21 -25
  99. package/build/server/session/tracker.js.map +1 -1
  100. package/build/server/tools.d.ts +1 -1
  101. package/build/server/tools.js +3 -3
  102. package/build/server/tools.js.map +1 -1
  103. package/build/services/calendar/patch.js +178 -68
  104. package/build/services/calendar/patch.js.map +1 -1
  105. package/build/services/docs/patch.d.ts +5 -3
  106. package/build/services/docs/patch.js +89 -19
  107. package/build/services/docs/patch.js.map +1 -1
  108. package/build/services/drive/patch.d.ts +1 -1
  109. package/build/services/drive/patch.js +115 -143
  110. package/build/services/drive/patch.js.map +1 -1
  111. package/build/services/gmail/attachments.js +10 -15
  112. package/build/services/gmail/attachments.js.map +1 -1
  113. package/build/services/gmail/mail.d.ts +34 -0
  114. package/build/services/gmail/mail.js +245 -0
  115. package/build/services/gmail/mail.js.map +1 -0
  116. package/build/services/gmail/mime.d.ts +45 -4
  117. package/build/services/gmail/mime.js +138 -4
  118. package/build/services/gmail/mime.js.map +1 -1
  119. package/build/services/gmail/patch.js +69 -83
  120. package/build/services/gmail/patch.js.map +1 -1
  121. package/build/services/meet/patch.js +24 -31
  122. package/build/services/meet/patch.js.map +1 -1
  123. package/build/services/sheets/patch.js +30 -35
  124. package/build/services/sheets/patch.js.map +1 -1
  125. package/build/services/tasks/patch.d.ts +18 -0
  126. package/build/services/tasks/patch.js +37 -0
  127. package/build/services/tasks/patch.js.map +1 -0
  128. package/build/version.d.ts +1 -1
  129. package/build/version.js +1 -1
  130. package/package.json +11 -6
  131. package/build/executor/errors.d.ts +0 -15
  132. package/build/executor/errors.js +0 -37
  133. package/build/executor/errors.js.map +0 -1
  134. package/build/executor/gws.d.ts +0 -26
  135. package/build/executor/gws.js +0 -197
  136. package/build/executor/gws.js.map +0 -1
  137. package/build/server/handlers/calendar.d.ts +0 -2
  138. package/build/server/handlers/calendar.js +0 -97
  139. package/build/server/handlers/calendar.js.map +0 -1
  140. package/build/server/handlers/drive.d.ts +0 -2
  141. package/build/server/handlers/drive.js +0 -58
  142. package/build/server/handlers/drive.js.map +0 -1
  143. package/build/server/handlers/email.d.ts +0 -2
  144. package/build/server/handlers/email.js +0 -119
  145. package/build/server/handlers/email.js.map +0 -1
package/LICENSE CHANGED
@@ -1,21 +1,201 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Aaron Bockelie (aaronsb@gmail.com)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright {yyyy} {name of copyright owner}
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/LICENSE-MIT ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Aaron Bockelie (aaronsb@gmail.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NOTICE ADDED
@@ -0,0 +1,24 @@
1
+ google-workspace-mcp
2
+ Copyright 2025-2026 Aaron Bockelie (aaronsb@gmail.com)
3
+
4
+ This product is licensed under the Apache License, Version 2.0 (see LICENSE).
5
+
6
+ ---
7
+
8
+ Prior history: MIT
9
+
10
+ Through v3.0.0 this project was distributed under the MIT License, and portions of
11
+ the code originate from that period. Those contributions remain under their original
12
+ terms, and the MIT notice is retained in LICENSE-MIT as MIT requires. MIT grants the
13
+ right to sublicense, so that code is redistributable under the Apache License 2.0
14
+ alongside the rest; retaining the notice is the condition, and this is it.
15
+
16
+ Copyright holders in the MIT-licensed history include, in addition to the author:
17
+
18
+ Henry Mao
19
+ David Eklov
20
+ Jeremy Yowell
21
+ Lubrsy706
22
+ Lucas Canavarro
23
+ Mike Brummett
24
+ Robbie Mitchell
package/README.md CHANGED
@@ -5,27 +5,27 @@
5
5
  [![Node](https://img.shields.io/node/v/@aaronsb/google-workspace-mcp?logo=node.js&label=node)](https://nodejs.org)
6
6
  [![License](https://img.shields.io/github/license/aaronsb/google-workspace-mcp)](LICENSE)
7
7
 
8
- Give AI agents full access to Google Workspace — Gmail, Calendar, Drive, and more — through a single MCP server that handles multi-account credential routing, response formatting for AI consumption, and contextual guidance.
8
+ Give AI agents real access to Google Workspace — Gmail, Calendar, Drive, Docs, Sheets, Tasks, and Meet — through a single MCP server that handles multi-account credential routing, response shaping for AI consumption, and contextual next-step guidance.
9
9
 
10
- Built on [Google's official Workspace CLI](https://github.com/googleworkspace/cli) (`gws`), which means API coverage grows as Google does. The server uses a manifest-driven factory that turns declarative YAML into fully functional MCP tools — adding a new Google API operation is a config change, not a code change.
10
+ The server talks to Google's REST APIs directly, through a client it builds **from Google's own machine-readable API specifications**. Google publishes a [Discovery document](https://developers.google.com/discovery) for every API; a build step reads them and generates the descriptor this server dispatches against. Google's API surface *is* the source of truth — not a hand-maintained wrapper, and not a third-party CLI.
11
11
 
12
12
  ## Why This MCP Server
13
13
 
14
- **For users:** One install gives your AI agent real, authenticated access to your Google accounts. Search email, check your calendar, manage Drive files, chain multi-step workflows — all through natural conversation.
14
+ **For users:** One install gives your agent authenticated access to your Google accounts. Search email, check your calendar, manage Drive files, chain multi-step workflows — through natural conversation.
15
15
 
16
- **For teams:** Multi-account support means your agent can work across personal and work accounts simultaneously, with per-account credential isolation and XDG-compliant storage.
16
+ **For teams:** Multi-account support lets one agent work across personal and work accounts at once, with per-account credential isolation and XDG-compliant storage.
17
17
 
18
- **For developers:** The factory architecture means coverage expands fast. Google's Workspace CLI already supports 15+ services and hundreds of API operations. The manifest curates which ones are exposed, patches add domain-specific formatting, and the defaults handle everything else.
18
+ **For developers:** Adding an operation is a YAML edit, not a code change. The manifest curates which of Google's methods to expose; the generated descriptor already knows every method's path, HTTP verb, parameters, and scopes. Nothing is transcribed by hand, so nothing drifts from Google.
19
19
 
20
20
  ## What's Available
21
21
 
22
- **7 Google-service tools (~80 operations) plus account, batching, and content-authoring tools.** The full surface — what's covered, what isn't, and how it grows — is mapped in **[API coverage](docs/coverage.md)**.
22
+ **11 tools — 7 Google services (80 operations), plus accounts, batching, content authoring, and a file sandbox.**
23
23
 
24
24
  | Tool | What It Does |
25
25
  |------|--------------|
26
- | `manage_email` | Gmail — search, read (plain or sanitized HTML body), send, reply / reply-all, forward, triage, trash, labels, threads, attachments |
26
+ | `manage_email` | Gmail — search, read (plain or sanitized HTML), send, reply / reply-all, forward, triage, trash, labels, threads, attachments |
27
27
  | `manage_calendar` | Calendar — list, agenda, get, create, quickAdd (natural language), update, delete, calendars, freebusy |
28
- | `manage_drive` | Drive — search, get, upload, download, copy, rename / move (`update`), delete, export, permissions, comments, view images |
28
+ | `manage_drive` | Drive — search, get, upload, download, copy, rename / move, delete, export, permissions, comments, view images |
29
29
  | `manage_sheets` | Sheets — read / write ranges (row-numbered output), append, clear, manage tabs, copy / duplicate / rename |
30
30
  | `manage_docs` | Docs — get, create, append, insert text, find-and-replace |
31
31
  | `manage_tasks` | Tasks — list / create / update / complete tasks and task lists |
@@ -35,52 +35,57 @@ Built on [Google's official Workspace CLI](https://github.com/googleworkspace/cl
35
35
  | `manage_workspace` | File operations in the workspace sandbox (exchange point for attachments, downloads, exports) |
36
36
  | `queue_operations` | Chain operations sequentially with `$N.field` result references |
37
37
 
38
- Every response includes **next-steps** guidance — the agent always knows what it can do next.
38
+ Every response carries **next-steps** guidance, so the agent always knows what it can do next.
39
+
40
+ Those 80 operations reach 60 of the 233 methods Google publishes across these seven APIs. The rest is mapped, not guessed — see **[API coverage](docs/coverage.md)**, which is generated by diffing the manifest against Google's live Discovery documents.
39
41
 
40
42
  ## How It Works
41
43
 
44
+ Two phases. Google's API specification is acquired at **build time** and frozen into a committed artifact; at **runtime** the server only reads it.
45
+
42
46
  ```
43
- ┌─────────────────────────┐
44
- MCP Client ──stdio──▶ │ manifest/*.yaml │
45
- │ (one file per service) │
46
- └────────┬────────────────┘
47
- │
48
- ┌────────▼────────────────┐
49
- │ Factory Generator │
50
- │ schemas + handlers │
51
- └────────┬────────────────┘
52
- │
53
- ┌──────────────┼──────────────┐
54
- ▼ ▼ ▼
55
- ┌──────────┐ ┌──────────┐ ┌──────────┐
56
- │ Gmail │ │ Calendar │ │ Drive │
57
- │ Patch │ │ Patch │ │ Patch │
58
- └────┬─────┘ └────┬─────┘ └────┬─────┘
59
- │ │ │
60
- └──────┬──────┘──────┬──────┘
61
- ▼ ▼
62
- Account Router ──▶ gws CLI ──▶ Google APIs
47
+ BUILD TIME RUNTIME
48
+ ───────────────────────────────────────── ──────────────────────────────
49
+
50
+ Google Discovery documents MCP Client
51
+ (the machine-readable API spec) │ stdio
52
+ │ ▼
53
+ ▼ ┌──────────────┐
54
+ ┌──────────────────────┐ │ Factory │◀── manifest/*.yaml
55
+ │ descriptor generator │ │ generator │ (which ops to expose)
56
+ │ scripts/generate- │ └──────┬───────┘
57
+ │ descriptor.mjs │ │ schemas + handlers
58
+ └──────────┬───────────┘ ▼
59
+ │ ┌──────────────┐
60
+ ▼ │ Patches │ Gmail hydration,
61
+ src/google/descriptor.json ──────────────▶ │ │ agenda merging,
62
+ 233 methods · committed └──────┬───────┘ MIME, formatting
63
+ paths · verbs · params · scopes │
64
+ ▼
65
+ ┌──────────────┐
66
+ │ Google client│──▶ Google REST APIs
67
+ │ + account │ (call / upload /
68
+ │ router │ download)
69
+ └──────────────┘
63
70
  ```
64
71
 
65
- The **factory** reads a YAML manifest and generates MCP tool schemas and request handlers at startup. **Patches** add domain-specific behavior where needed — Gmail search hydration, calendar formatting, Drive file type detection. Operations without patches get sensible defaults automatically.
72
+ **The descriptor** is generated from Google's Discovery documents and committed. A CI drift gate re-generates it and fails if the result differs, so the spec we dispatch against cannot silently fall behind Google.
73
+
74
+ **The client** (`src/google/client.ts`) is deliberately opinion-free: it builds the request Google's spec describes and returns exactly what Google returned. It does not reshape responses. All interpretation lives in patches and formatters, aimed at the MCP contract — which is what keeps "what Google said" and "what we chose to show" separable.
66
75
 
67
- The underlying engine is Google's `@googleworkspace/cli` — a Rust binary that wraps the full Google Workspace API surface. The MCP server curates which operations to expose and shapes the responses for AI consumption.
76
+ **The factory** reads the YAML manifest and generates MCP tool schemas and handlers at startup. **Patches** add behavior where an agent needs more than a raw API response — hydrating Gmail search results with senders and subjects, merging an agenda across calendars, building MIME for outbound mail. Operations without a patch get sensible defaults.
77
+
78
+ Because method names are generated into a TypeScript union, calling a method Google doesn't publish is a **compile error**, not a 404 at runtime.
68
79
 
69
80
  ## Install
70
81
 
71
82
  ### MCPB Bundle (Claude Desktop and other MCP clients)
72
83
 
73
- Download the `.mcpb` bundle for your platform from the [latest release](https://github.com/aaronsb/google-workspace-mcp/releases):
84
+ Download `google-workspace-mcp.mcpb` from the [latest release](https://github.com/aaronsb/google-workspace-mcp/releases).
74
85
 
75
- | Platform | File |
76
- |----------|------|
77
- | macOS (Apple Silicon) | `google-workspace-mcp-darwin-arm64.mcpb` |
78
- | macOS (Intel) | `google-workspace-mcp-darwin-x64.mcpb` |
79
- | Linux x64 | `google-workspace-mcp-linux-x64.mcpb` |
80
- | Linux ARM64 | `google-workspace-mcp-linux-arm64.mcpb` |
81
- | Windows x64 | `google-workspace-mcp-windows-x64.mcpb` |
86
+ One bundle covers every platform — macOS (Intel and Apple Silicon), Linux (x64 and ARM64), and Windows. There is nothing to choose: the server is pure JavaScript on Node, so there is no platform-specific payload to pick between. It needs Node 22.12 or newer.
82
87
 
83
- In Claude Desktop, drag the `.mcpb` file into the app — it will prompt you for your Google OAuth credentials, then you're ready to go. Other MCP clients that support `.mcpb` extensions can install it the same way. The bundle includes everything: the server, the gws binary, and all dependencies.
88
+ In Claude Desktop, drag the `.mcpb` file into the app — it will prompt for your Google OAuth credentials. Other MCP clients that support `.mcpb` extensions install it the same way. The bundle includes the server and all of its dependencies.
84
89
 
85
90
  ### Claude Code / npm
86
91
 
@@ -96,11 +101,10 @@ npx @aaronsb/google-workspace-mcp
96
101
 
97
102
  ### Prerequisites
98
103
 
99
- 1. **Node.js** 22.12 or newer — Node 18 and 20 are both end-of-life
104
+ 1. **Node.js** 22.12 or newer — Node 18 and 20 are both end-of-life.
100
105
  2. **Google Cloud OAuth credentials** — create at [console.cloud.google.com/apis/credentials](https://console.cloud.google.com/apis/credentials):
101
106
  - Create an OAuth 2.0 Client ID (Desktop application)
102
- - Enable the APIs you want (Gmail, Calendar, Drive, Sheets, etc.)
103
-
107
+ - Enable the APIs you want (Gmail, Calendar, Drive, Sheets, …)
104
108
  3. Set environment variables:
105
109
  ```bash
106
110
  export GOOGLE_CLIENT_ID="your-client-id"
@@ -149,7 +153,7 @@ Add to `.mcp.json`:
149
153
 
150
154
  ## Usage
151
155
 
152
- Add an account (opens browser for OAuth):
156
+ Add an account (opens a browser for OAuth):
153
157
 
154
158
  ```
155
159
  manage_accounts { "operation": "authenticate" }
@@ -178,27 +182,42 @@ Chain operations with result references — the output of one step feeds the nex
178
182
 
179
183
  ## Expanding Coverage
180
184
 
181
- The server discovers operations from the gws CLI, which already supports 15+ Google services (Sheets, Docs, Tasks, People, Chat, and more). Adding coverage is a manifest edit:
185
+ The coverage mapper diffs what the manifest exposes against what Google actually publishes, so the frontier is always measured rather than estimated:
182
186
 
183
187
  ```bash
184
- make manifest-discover # Find all 287+ available operations
185
- make manifest-lint # Validate the curated manifest
186
- make test # Verify everything works
188
+ npm run generate-descriptor # re-read Google's Discovery documents
189
+ make coverage # what we expose vs. what Google offers
190
+ make manifest-lint # validate the curated manifest
191
+ make check # type-check, lint, test, build, smoke
187
192
  ```
188
193
 
189
- New operations get default formatting automatically. Add a patch only when you need domain-specific presentation.
194
+ To expose a new operation, add it to the relevant `src/factory/manifest/*.yaml`. The descriptor already knows its path, verb, parameters, and scopes, and the factory generates the tool schema and handler. New operations get default formatting automatically — add a patch only when an agent needs a shaped response rather than a raw one.
190
195
 
191
196
  ## Data Storage
192
197
 
193
- Follows XDG Base Directory Specification:
198
+ Follows the XDG Base Directory Specification:
194
199
 
195
200
  | Data | Location |
196
201
  |------|----------|
197
202
  | Account registry | `~/.config/google-workspace-mcp/accounts.json` |
198
203
  | Credentials | `~/.local/share/google-workspace-mcp/credentials/` |
204
+ | Workspace (file exchange) | `~/.local/share/google-workspace-mcp/workspace/` |
199
205
 
200
- Credentials are per-account files with standard OAuth tokens. No secrets are stored in the project directory.
206
+ Credentials are per-account files holding standard OAuth tokens. No secrets are stored in the project directory.
207
+
208
+ ## Design
209
+
210
+ The server generates its API client from Google's own Discovery documents and calls Google directly. Nothing sits between the server and the API it targets: there is no subprocess, no second response shape, and no unversioned wrapper to keep in step. The descriptor is regenerated and diffed against Google on every build, so a method that does not exist is a compile error rather than a runtime surprise.
211
+
212
+ On top of that sits the manifest-driven tool factory: adding an operation is a YAML edit, not a code change. The coverage mapper reads Google's real published surface, so "what we expose vs what exists" is a measured number.
213
+
214
+ The reasoning behind this design, including what was verified and what it cost, is in **[ADR-103](docs/architecture/core/ADR-103-generate-a-google-api-descriptor-retire-the-gws-facade.md)**.
201
215
 
202
216
  ## License
203
217
 
204
- MIT
218
+ [Apache License 2.0](LICENSE).
219
+
220
+ Through v3.0.0 this project was MIT-licensed. Those contributions keep their original
221
+ notice (`LICENSE-MIT`), and the contributors are credited in [`NOTICE`](NOTICE). Apache 2.0
222
+ adds an explicit patent grant and a state-your-changes requirement; it does not take back
223
+ anything MIT permitted.
@@ -24,7 +24,7 @@ export declare function authenticateAccount(clientId: string, clientSecret: stri
24
24
  export declare function reauthWithServices(clientId: string, clientSecret: string, services: string): Promise<AuthResult>;
25
25
  /**
26
26
  * Check account status: token validity and granted scopes.
27
- * Reads scopes from the credential file (per-account, not from gws keyring).
27
+ * Reads scopes from the per-account credential file.
28
28
  * Validates token by attempting a refresh via the token service.
29
29
  */
30
30
  export declare function checkAccountStatus(email: string): Promise<AccountStatus>;
@@ -20,7 +20,7 @@ export async function reauthWithServices(clientId, clientSecret, services) {
20
20
  }
21
21
  /**
22
22
  * Check account status: token validity and granted scopes.
23
- * Reads scopes from the credential file (per-account, not from gws keyring).
23
+ * Reads scopes from the per-account credential file.
24
24
  * Validates token by attempting a refresh via the token service.
25
25
  */
26
26
  export async function checkAccountStatus(email) {
@@ -142,7 +142,7 @@ function listenForCallback(clientId, scopes, state) {
142
142
  }
143
143
  redirectUri = `http://127.0.0.1:${addr.port}/callback`;
144
144
  const authUrl = buildAuthUrl(clientId, redirectUri, scopes, state);
145
- process.stderr.write(`[gws-mcp] OAuth: opening browser for consent\n`);
145
+ process.stderr.write(`[google-workspace-mcp] OAuth: opening browser for consent\n`);
146
146
  openBrowser(authUrl);
147
147
  });
148
148
  timer = setTimeout(() => {
@@ -167,8 +167,8 @@ export function openBrowser(url) {
167
167
  const onError = (err) => {
168
168
  if (!err)
169
169
  return;
170
- process.stderr.write(`[gws-mcp] Failed to open browser: ${err.message}\n`);
171
- process.stderr.write(`[gws-mcp] Open this URL manually:\n${url}\n`);
170
+ process.stderr.write(`[google-workspace-mcp] Failed to open browser: ${err.message}\n`);
171
+ process.stderr.write(`[google-workspace-mcp] Open this URL manually:\n${url}\n`);
172
172
  };
173
173
  if (platform() === 'win32') {
174
174
  // 'start' is a cmd.exe built-in, not a standalone executable —
@@ -1 +1 @@
1
- {"version":3,"file":"oauth.js","sourceRoot":"","sources":["../../src/accounts/oauth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA6C,MAAM,WAAW,CAAC;AACpF,OAAO,EAAE,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AC,GAAG;YAAE,OAAO;QACjB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,kDAAkD,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC;QACxF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mDAAmD,GAAG,IAAI,CAAC,CAAC;IACnF,CAAC,CAAC;IAEF,IAAI,QAAQ,EAAE,KAAK,OAAO,EAAE,CAAC;QAC3B,+DAA+D;QAC/D,oEAAoE;QACpE,2CAA2C;QAC3C,IAAI,CAAC,oBAAoB,GAAG,GAAG,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC;SAAM,CAAC;QACN,MAAM,GAAG,GAAG,QAAQ,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC;QAC1D,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;IAChC,CAAC;AACH,CAAC"}
@@ -78,7 +78,7 @@ export async function warmTokenCache(emails) {
78
78
  for (let i = 0; i < results.length; i++) {
79
79
  const result = results[i];
80
80
  if (result.status === 'rejected') {
81
- process.stderr.write(`[gws-mcp] token warmup failed for ${emails[i]}: ${result.reason.message}\n`);
81
+ process.stderr.write(`[google-workspace-mcp] token warmup failed for ${emails[i]}: ${result.reason.message}\n`);
82
82
  }
83
83
  }
84
84
  }
@@ -1 +1 @@
1
- {"version":3,"file":"token-service.js","sourceRoot":"","sources":["../../src/accounts/token-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,gBAAgB,GAAG,qCAAqC,CAAC;AAC/D,MAAM,aAAa,GAAG,MAAM,CAAC,CAAC,iCAAiC;AAO/D,gEAAgE;AAChE,MAAM,KAAK,GAAG,IAAI,GAAG,EAAuB,CAAC;AAE7C,0FAA0F;AAC1F,MAAM,QAAQ,GAAG,IAAI,GAAG,EAA2B,CAAC;AAEpD,MAAM,OAAO,iBAAkB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M,EAAE,CAAC,EAAE,EAAE,CAAC;QACxC,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QAC1B,IAAI,MAAM,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;YACjC,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,kDAAkD,MAAM,CAAC,CAAC,CAAC,KAAM,MAAM,CAAC,MAAgB,CAAC,OAAO,IAAI,CACrG,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,WAAW;IACzB,KAAK,CAAC,KAAK,EAAE,CAAC;IACd,QAAQ,CAAC,KAAK,EAAE,CAAC;AACnB,CAAC"}
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Build-time coverage analysis tool (ADR-100).
4
4
  *
5
- * Compares the curated manifest against the gws CLI's actual surface
5
+ * Compares the curated manifest against Google's actual published API surface
6
6
  * to produce a structured coverage report.
7
7
  *
8
8
  * Usage:
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Build-time coverage analysis tool (ADR-100).
4
4
  *
5
- * Compares the curated manifest against the gws CLI's actual surface
5
+ * Compares the curated manifest against Google's actual published API surface
6
6
  * to produce a structured coverage report.
7
7
  *
8
8
  * Usage:
@@ -23,9 +23,11 @@ async function main() {
23
23
  const manifest = loadManifest();
24
24
  // Load existing baseline (if any)
25
25
  const baseline = loadBaseline();
26
- // Discover the gws CLI surface
27
- process.stderr.write('[coverage] Discovering gws CLI surface...\n');
28
- const discovered = discoverSurface();
26
+ // Read Google's real surface from Discovery. Never derive it from help text: a
27
+ // regex over prose once invented the method `calendars.The`, and measured us
28
+ // against the wrong denominator. See ADR-103 item 11.
29
+ process.stderr.write("[coverage] Reading Google's API surface...\n");
30
+ const discovered = await discoverSurface();
29
31
  // Compare
30
32
  const report = compareSurfaces(manifest, discovered, baseline);
31
33
  // Output