gmail-cleanup-mcp
Gmail 정리 MCP 서버
이메일 정리를 위한 Model Context Protocol 서버 — 이메일 휴지통 이동, 필터 관리, 구독 취소 링크 추출 기능을 제공합니다. 이메일 검색, 읽기, 초안 작성, 보내기를 처리하는 Anthropic의 내장 Gmail 커넥터를 보완하도록 설계되었습니다.
dc/gmail-cleanup-mcp의 패치 버전 (MIT 라이선스). 이 포크는
search_and_trash및batch_trash_emails가 실패를 자동으로 재시도하지 않고 조용히 무시하던 버그를 수정합니다 — 동시에 50개의 휴지통 요청을 보내면 Gmail의 속도 제한에 걸려 오류 메시지 없이 약 절반의 요청이 유실될 수 있습니다. 이제 두 도구 모두 배치 크기를 줄이고, 백오프(backoff)를 적용하며, 자동 재시도하고, 실패한 각 메시지에 대해 실제 오류를 보고합니다.
도구
도구 | 설명 |
| 단일 이메일을 휴지통으로 이동 (30일 보관 기간) |
| 메시지 ID로 최대 500개의 이메일을 휴지통으로 이동 (50개씩 배치 처리) |
| Gmail 쿼리로 이메일을 찾아 휴지통으로 이동 — 시험 실행(dry-run) 지원 |
| 자동 보관, 라벨 지정, 삭제 또는 전달을 위한 필터 생성 |
| 기준 및 작업을 포함한 모든 기존 Gmail 필터 나열 |
| ID로 Gmail 필터 삭제 |
| 이메일에서 |
Related MCP server: Gmail AutoAuth MCP Server
사전 요구 사항
Node.js 18+
Gmail API가 활성화된 Google Cloud 프로젝트
OAuth 2.0 자격 증명 (데스크톱 앱 유형)
설정
1. Google Cloud OAuth
이미 다른 Gmail MCP 서버에서
~/.gmail-mcp/gcp-oauth.keys.json파일을 가지고 있나요? 2단계로 건너뛰세요 — 이 서버는 동일한 자격 증명 위치를 사용합니다.
Google Cloud 콘솔로 이동
프로젝트 생성 (또는 기존 프로젝트 사용) 및 Gmail API 활성화
사용자 인증 정보 → 사용자 인증 정보 만들기 → OAuth 클라이언트 ID로 이동
데스크톱 앱 선택, JSON 다운로드
~/.gmail-mcp/gcp-oauth.keys.json으로 저장 (또는 프로젝트 디렉토리에gcp-oauth.keys.json배치 — 첫 실행 시 자동으로 복사됩니다)
2. 설치 및 빌드
git clone https://github.com/davidcerniglia/gmail-cleanup-mcp.git
cd gmail-cleanup-mcp
npm install
npm run build3. 인증
npm run auth브라우저에서 Google OAuth 동의 화면이 열립니다. 자격 증명은 0600 권한(소유자만 읽기/쓰기)으로 ~/.gmail-mcp/credentials.json에 저장됩니다.
4. Claude Desktop에 추가
~/Library/Application Support/Claude/claude_desktop_config.json에 추가 (macOS):
{
"mcpServers": {
"gmail-cleanup": {
"command": "node",
"args": ["/absolute/path/to/gmail-cleanup-mcp/dist/index.js"]
}
}
}또는 Claude Code의 경우 .claude/settings.json에 추가:
{
"mcpServers": {
"gmail-cleanup": {
"command": "node",
"args": ["/absolute/path/to/gmail-cleanup-mcp/dist/index.js"]
}
}
}사용 예시
프롬프트 | 동작 |
"6개월 이상 된 newsletter@spam.com의 모든 이메일 휴지통으로 이동" | Gmail 쿼리 구문으로 |
"LinkedIn에서 온 이메일 중 삭제될 항목을 미리 보여줘" |
|
"nextdoor.com에서 온 이메일을 자동으로 보관하는 필터 생성" |
|
"그 마케팅 이메일에 구독 취소 링크가 있는지 확인해줘" |
|
내장 Gmail 커넥터와의 연동 방식
내장 Gmail 커넥터 | 이 서버 | |
검색 및 읽기 | 지원 | — |
초안 작성 및 보내기 | 지원 | — |
이메일 휴지통 이동 | — | 지원 |
대량 정리 | — | 지원 (호출당 최대 500개) |
필터 관리 | — | 지원 |
구독 취소 추출 | — | 지원 |
보안
최소 권한 범위:
gmail.modify+gmail.settings.basic— 휴지통 및 필터 작업에 필요한 최소한의 권한휴지통 이동, 영구 삭제 아님: 모든 삭제 작업은 Gmail의 휴지통(30일 복구 기간)을 사용하며, 영구 삭제는 절대 수행하지 않습니다
시험 실행 모드:
search_and_trash는 실행 전에 일치 항목을 미리 볼 수 있습니다제한적인 파일 권한: 자격 증명은
0600권한(소유자만 읽기/쓰기)으로 저장됩니다첨부 파일 미처리: 첨부 파일을 다루지 않아 경로 탐색(path traversal) 위험이 없습니다
파일 시스템 접근 없음:
~/.gmail-mcp/의 자격 증명 저장 외에는 파일 시스템에 접근하지 않습니다
환경 변수
변수 | 기본값 | 설명 |
|
| OAuth 클라이언트 키 경로 |
|
| 저장된 자격 증명 경로 |
라이선스
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables comprehensive Gmail management through the Gmail API, including sending/receiving emails, organizing labels and threads, managing drafts, and configuring account settings with secure OAuth2 authentication.641,3981MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Gmail through natural language interactions, supporting email operations (send, read, search, draft), comprehensive attachment handling (send, receive, download), label management, filters, and batch operations with automatic OAuth2 authentication.192MIT
- AlicenseNot gradedqualityFmaintenanceProvides comprehensive Gmail integration with 25+ tools for intelligent email management, including AI-powered categorization, advanced search and filtering, automated archiving and cleanup, analytics, and secure OAuth2 authentication.1922MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Gmail through natural language, supporting operations like sending, searching, and reading emails. It includes comprehensive label management, batch processing, and a streamlined OAuth2 auto-authentication flow.MIT
Related MCP Connectors
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Manage Gmail messages, threads, labels, drafts, and settings from your workflows. Send and organiz…
AI email automation, follow-ups, training, previews, and mailbox troubleshooting.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/adityai4/gmail-cleanup-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server