Gmail MCP Server Configuration & Usage Guide
Installationnpx
Risk LevelHigh Risk
API KeyRequired
Clients2 supported
Gmail 邮件管理,支持读取、搜索、发送邮件和管理标签
Supported Clients
- Claude Desktop
- Cursor
Installation Command
npx -y @modelcontextprotocol/server-gmailConfiguration Example
{
"mcpServers": {
"gmail": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gmail"
],
"env": {
"GOOGLE_CLIENT_ID": "<your-client-id>",
"GOOGLE_CLIENT_SECRET": "<your-client-secret>"
}
}
}
}Environment variable required:GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET。Do not commit these values to public repositories.
Permission Scope & Security Notes
可读取和发送邮件,风险较高,建议仅授权只读权限进行测试
- network-access
- credential-required
- message-send
Risk Score:7/10
Common Errors
- OAuth 认证失败
- 确认 Google Cloud 项目已启用 Gmail API
- 发送失败
- 确认 OAuth scope 包含 gmail.send 权限
Sources
Recently Verified:2026-05-18。Client versions and configuration formats may change. Please refer to official documentation before use.