A minimal MCP server and CLI for downloading Gmail attachments to disk. Three tools, read-only OAuth scope, MIT license.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
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>"
}
}
}
}需要的环境变量
GMAIL_MCP_TOKEN
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。