Gmail MCP for VS Code
io.github.a1-x-tech/mcp-google-gmail
MCP server for the Gmail API: search, read and send email, manage drafts, labels and the trash.
client:VS Code
transport:stdio
runtime:npm
Install Gmail MCP in VS Code
.vscode/mcp.json
{
"inputs": [
{
"type": "promptString",
"id": "google-gmail-client-id",
"description": "GOOGLE_GMAIL_CLIENT_ID",
"password": true
},
{
"type": "promptString",
"id": "google-gmail-client-secret",
"description": "GOOGLE_GMAIL_CLIENT_SECRET",
"password": true
},
{
"type": "promptString",
"id": "google-gmail-refresh-token",
"description": "GOOGLE_GMAIL_REFRESH_TOKEN",
"password": true
},
{
"type": "promptString",
"id": "google-gmail-access-token",
"description": "GOOGLE_GMAIL_ACCESS_TOKEN",
"password": true
},
{
"type": "promptString",
"id": "google-gmail-oauth-port",
"description": "GOOGLE_GMAIL_OAUTH_PORT",
"password": true
},
{
"type": "promptString",
"id": "google-gmail-api-base",
"description": "GOOGLE_GMAIL_API_BASE",
"password": true
},
{
"type": "promptString",
"id": "google-gmail-timeout-ms",
"description": "GOOGLE_GMAIL_TIMEOUT_MS",
"password": true
},
{
"type": "promptString",
"id": "google-gmail-max-retries",
"description": "GOOGLE_GMAIL_MAX_RETRIES",
"password": true
}
],
"servers": {
"mcp-google-gmail": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-google-gmail"
],
"env": {
"GOOGLE_GMAIL_CLIENT_ID": "${input:google-gmail-client-id}",
"GOOGLE_GMAIL_CLIENT_SECRET": "${input:google-gmail-client-secret}",
"GOOGLE_GMAIL_REFRESH_TOKEN": "${input:google-gmail-refresh-token}",
"GOOGLE_GMAIL_ACCESS_TOKEN": "${input:google-gmail-access-token}",
"GOOGLE_GMAIL_OAUTH_PORT": "${input:google-gmail-oauth-port}",
"GOOGLE_GMAIL_API_BASE": "${input:google-gmail-api-base}",
"GOOGLE_GMAIL_TIMEOUT_MS": "${input:google-gmail-timeout-ms}",
"GOOGLE_GMAIL_MAX_RETRIES": "${input:google-gmail-max-retries}"
}
}
}
}
VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs