Back to Home
abhinav20sep icon

gmail-mcp-server-rust

by abhinav20sep

Overview

Integrate AI models (e.g., Claude) with Gmail for email management and automation via the Model Context Protocol.

Installation

Run Command
./target/release/gmail-mcp-server

Environment Variables

  • GMAIL_OAUTH_PATH
  • GMAIL_CREDENTIALS_PATH
  • GMAIL_OAUTH_PORT
  • RUST_LOG

Security Notes

The `download_attachment` tool allows the AI (and thus potentially an attacker through a crafted prompt) to specify an arbitrary `save_path` and `filename`. While the `Path::join` method correctly handles path segments to prevent simple path traversal within the filename, it does not validate or restrict the base `save_path` argument. This means an attachment could be downloaded to sensitive system directories (e.g., `/etc`, `~/.ssh`) if the AI is prompted to do so, posing a significant risk for arbitrary file writes.

Similar Servers

Stats

Interest Score0
Security Score4
Cost ClassMedium
Avg Tokens750
Stars0
Forks0
Last Update2025-11-26

Tags

GmailAIModel Context ProtocolRustEmail Automation