@mcp-z/mcp-gmail 2.3.0 → 2.3.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/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
MCP server for Gmail integration with OAuth authentication, message search, batch operations, and Google Sheets export
|
|
4
4
|
|
|
5
|
+
Requires Node.js >=20. The examples use `npx`, included with npm, to run this server and [@mcp-z/cli](https://github.com/mcp-z/cli).
|
|
6
|
+
|
|
5
7
|
## Common uses
|
|
6
8
|
|
|
7
9
|
- Search and read messages
|
|
@@ -12,6 +14,11 @@ MCP server for Gmail integration with OAuth authentication, message search, batc
|
|
|
12
14
|
|
|
13
15
|
MCP supports stdio and HTTP.
|
|
14
16
|
|
|
17
|
+
Both the 2025 and 2026-07-28 protocol revisions are served, over either transport, from the same
|
|
18
|
+
server. Your client negotiates whichever it speaks. A 2025 client keeps working with no change,
|
|
19
|
+
and support for it is not being dropped. The 2026-07-28 revision is stateless, so a client speaking
|
|
20
|
+
it sends no `initialize` handshake and carries no session id.
|
|
21
|
+
|
|
15
22
|
**Stdio**
|
|
16
23
|
```json
|
|
17
24
|
{
|
|
@@ -58,7 +65,7 @@ MCP supports stdio and HTTP.
|
|
|
58
65
|
|
|
59
66
|
## OAuth modes
|
|
60
67
|
|
|
61
|
-
Configure via environment variables or the `env` block in `.mcp.json`.
|
|
68
|
+
Configure via environment variables or the `env` block in `.mcp.json`. The configuration reference below lists every option.
|
|
62
69
|
|
|
63
70
|
### Loopback OAuth (default)
|
|
64
71
|
|
|
@@ -88,9 +95,9 @@ Example (http) - Create .mcp.json:
|
|
|
88
95
|
```json
|
|
89
96
|
{
|
|
90
97
|
"mcpServers": {
|
|
91
|
-
"
|
|
98
|
+
"gmail": {
|
|
92
99
|
"type": "http",
|
|
93
|
-
"url": "http://localhost:3000",
|
|
100
|
+
"url": "http://localhost:3000/mcp",
|
|
94
101
|
"start": {
|
|
95
102
|
"command": "npx",
|
|
96
103
|
"args": ["-y", "@mcp-z/mcp-gmail", "--port=3000"],
|
|
@@ -105,7 +112,7 @@ Example (http) - Create .mcp.json:
|
|
|
105
112
|
|
|
106
113
|
Local (default): omit REDIRECT_URI → ephemeral loopback. Cloud: set REDIRECT_URI to your public /oauth/callback and expose the service publicly.
|
|
107
114
|
|
|
108
|
-
Note: start block is a helper in
|
|
115
|
+
Note: the `start` block is a helper in `npx @mcp-z/cli up` for starting an HTTP server from your `.mcp.json`. See [@mcp-z/cli](https://github.com/mcp-z/cli) for details.
|
|
109
116
|
|
|
110
117
|
|
|
111
118
|
### Service account
|
|
@@ -160,11 +167,11 @@ HTTP only. Requires a public base URL. CSV export and `/files` are disabled in D
|
|
|
160
167
|
## How to use
|
|
161
168
|
|
|
162
169
|
```bash
|
|
163
|
-
#
|
|
164
|
-
mcp-z inspect --servers gmail --tools
|
|
170
|
+
# Start the configured server and list its tools
|
|
171
|
+
npx -y @mcp-z/cli inspect --servers gmail --tools
|
|
165
172
|
|
|
166
|
-
# Call a tool
|
|
167
|
-
mcp-z call gmail message-search '{"query":"from:alice@example.com"}'
|
|
173
|
+
# Call a tool after authorizing Gmail
|
|
174
|
+
npx -y @mcp-z/cli call-tool gmail message-search '{"query":"from:alice@example.com"}'
|
|
168
175
|
```
|
|
169
176
|
|
|
170
177
|
## Tools
|
|
@@ -192,7 +199,7 @@ mcp-z call gmail message-search '{"query":"from:alice@example.com"}'
|
|
|
192
199
|
|
|
193
200
|
## Configuration reference
|
|
194
201
|
|
|
195
|
-
See `server.json` for all supported environment variables, CLI arguments, and defaults.
|
|
202
|
+
See [`server.json`](https://github.com/mcp-z/mcp-gmail/blob/master/server.json) for all supported environment variables, CLI arguments, and defaults.
|
|
196
203
|
|
|
197
204
|
## Storage backends
|
|
198
205
|
|
|
@@ -210,6 +217,6 @@ TOKEN_STORE_URI=redis://localhost:6379 mcp-gmail
|
|
|
210
217
|
|
|
211
218
|
A protocol whose adapter is missing fails at startup naming the package to install.
|
|
212
219
|
|
|
213
|
-
|
|
220
|
+
## Documentation
|
|
214
221
|
|
|
215
222
|
[API Docs](https://mcp-z.github.io/mcp-gmail)
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import type { ReadResourceResult, ServerContext } from '@mcp-z/server';
|
|
1
|
+
import type { ReadResourceResult, ResourceConfig, ServerContext } from '@mcp-z/server';
|
|
2
2
|
import { ResourceTemplate } from '@mcp-z/server';
|
|
3
3
|
export default function createResource(): {
|
|
4
4
|
name: string;
|
|
5
5
|
template: ResourceTemplate;
|
|
6
|
-
config:
|
|
7
|
-
cacheHint?: import("@mcp-z/server").CacheHint;
|
|
8
|
-
};
|
|
6
|
+
config: ResourceConfig;
|
|
9
7
|
handler: (uri: URL, variables: {
|
|
10
8
|
id: string;
|
|
11
9
|
}, extra: ServerContext) => Promise<ReadResourceResult>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import type { ReadResourceResult, ServerContext } from '@mcp-z/server';
|
|
1
|
+
import type { ReadResourceResult, ResourceConfig, ServerContext } from '@mcp-z/server';
|
|
2
2
|
import { ResourceTemplate } from '@mcp-z/server';
|
|
3
3
|
export default function createResource(): {
|
|
4
4
|
name: string;
|
|
5
5
|
template: ResourceTemplate;
|
|
6
|
-
config:
|
|
7
|
-
cacheHint?: import("@mcp-z/server").CacheHint;
|
|
8
|
-
};
|
|
6
|
+
config: ResourceConfig;
|
|
9
7
|
handler: (uri: URL, variables: {
|
|
10
8
|
id: string;
|
|
11
9
|
}, extra: ServerContext) => Promise<ReadResourceResult>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import type { ReadResourceResult, ServerContext } from '@mcp-z/server';
|
|
1
|
+
import type { ReadResourceResult, ResourceConfig, ServerContext } from '@mcp-z/server';
|
|
2
2
|
import { ResourceTemplate } from '@mcp-z/server';
|
|
3
3
|
export default function createResource(): {
|
|
4
4
|
name: string;
|
|
5
5
|
template: ResourceTemplate;
|
|
6
|
-
config:
|
|
7
|
-
cacheHint?: import("@mcp-z/server").CacheHint;
|
|
8
|
-
};
|
|
6
|
+
config: ResourceConfig;
|
|
9
7
|
handler: (uri: URL, variables: {
|
|
10
8
|
id: string;
|
|
11
9
|
}, extra: ServerContext) => Promise<ReadResourceResult>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-z/mcp-gmail",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "MCP server for Gmail integration with OAuth authentication, message search, batch operations, and Google Sheets export",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gmail",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"version": "tsds version"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@googleapis/gmail": "^
|
|
70
|
+
"@googleapis/gmail": "^21.0.0",
|
|
71
71
|
"@mcp-z/email": "^1.0.0",
|
|
72
72
|
"@mcp-z/oauth": "^2.0.0",
|
|
73
73
|
"@mcp-z/oauth-google": "^2.0.1",
|