Gmail
About
Gmail integration with OAuth authentication, message search, batch operations, and Sheets export
Use this server
Add it to your MCP client. The catalogue lists this config verbatim from its source — it does not run, download, or vouch for the server. Review the command before you run it.
Transportstdio (runs a local command)
Env vars
GOOGLE_CLIENT_ID GOOGLE_CLIENT_SECRET GOOGLE_SERVICE_ACCOUNT_KEY_FILE AUTH_MODE HEADLESS REDIRECT_URI RESOURCE_STORE_URI PORT BASE_URL LOG_LEVELClaude Code
claude mcp add --env GOOGLE_CLIENT_ID= --env GOOGLE_CLIENT_SECRET= --env GOOGLE_SERVICE_ACCOUNT_KEY_FILE= --env AUTH_MODE= --env HEADLESS= --env REDIRECT_URI= --env RESOURCE_STORE_URI= --env PORT= --env BASE_URL= --env LOG_LEVEL= mcp-gmail -- npx @mcp-z/mcp-gmail
Cursor
If the button doesn't open Cursor, use the JSON below — Cursor accepts the same mcpServers config.
VS Code
code --add-mcp '{"name":"mcp-gmail","command":"npx","args":["@mcp-z/mcp-gmail"],"env":{"GOOGLE_CLIENT_ID":"","GOOGLE_CLIENT_SECRET":"","GOOGLE_SERVICE_ACCOUNT_KEY_FILE":"","AUTH_MODE":"","HEADLESS":"","REDIRECT_URI":"","RESOURCE_STORE_URI":"","PORT":"","BASE_URL":"","LOG_LEVEL":""}}'
JSON
{
"mcpServers": {
"mcp-gmail": {
"command": "npx",
"args": [
"@mcp-z/mcp-gmail"
],
"env": {
"GOOGLE_CLIENT_ID": "",
"GOOGLE_CLIENT_SECRET": "",
"GOOGLE_SERVICE_ACCOUNT_KEY_FILE": "",
"AUTH_MODE": "",
"HEADLESS": "",
"REDIRECT_URI": "",
"RESOURCE_STORE_URI": "",
"PORT": "",
"BASE_URL": "",
"LOG_LEVEL": ""
}
}
}
}
Environment variables are listed by name only — fill in your own values. Entries never carry secrets.