A minimal MCP server and CLI for downloading Gmail attachments to disk. Three tools, read-only OAuth scope, MIT license.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add gmail-attachments --env GMAIL_MCP_TOKEN='<GMAIL_MCP_TOKEN>' -- uvx gmail-attachments-mcp~/.codex/config.toml
[mcp_servers.gmail-attachments]
command = "uvx"
args = ["gmail-attachments-mcp"]
env = { GMAIL_MCP_TOKEN = "<GMAIL_MCP_TOKEN>" }
# codex mcp add gmail-attachments --env GMAIL_MCP_TOKEN='<GMAIL_MCP_TOKEN>' -- uvx gmail-attachments-mcp~/.cursor/mcp.json
{
"mcpServers": {
"gmail-attachments": {
"command": "uvx",
"args": [
"gmail-attachments-mcp"
],
"env": {
"GMAIL_MCP_TOKEN": "<GMAIL_MCP_TOKEN>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"gmail-attachments": {
"type": "stdio",
"command": "uvx",
"args": [
"gmail-attachments-mcp"
],
"env": {
"GMAIL_MCP_TOKEN": "<GMAIL_MCP_TOKEN>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"gmail-attachments": {
"command": "uvx",
"args": [
"gmail-attachments-mcp"
],
"env": {
"GMAIL_MCP_TOKEN": "<GMAIL_MCP_TOKEN>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"gmail-attachments": {
"command": "uvx",
"args": [
"gmail-attachments-mcp"
],
"env": {
"GMAIL_MCP_TOKEN": "<GMAIL_MCP_TOKEN>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"gmail-attachments": {
"command": "uvx",
"args": [
"gmail-attachments-mcp"
],
"env": {
"GMAIL_MCP_TOKEN": "<GMAIL_MCP_TOKEN>"
}
}
}
}Environment variables
GMAIL_MCP_TOKEN
Replace the placeholders with your own credentials and keep them out of version control.