
theposch/gmail-mcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Gmail MCP 서버
개요
Python에서 작성된 Gmail 통합을 위한 강력한 기능과 풍부한 Model Context Protocol (MCP) 서버. 이 서버는 Claude와 같은 AI 조수가 자연 언어를 통해 Gmail과 상호 작용하여 종합적인 이메일 관리 기능을 제공합니다. - 맞춤 주제, 내용 및 수신자가있는 이메일 보내기 - 전체 메타 데이터로 이메일 내용을 읽고 검색하고 검색 - 확인으로 trash로 이메일을 이동 - 읽기 / 읽기로 표시 이메일 - 브라우저에서 직접 이메일을 엽니 다 - 나중에 검토를위한 초안 이메일 만들기 - 모든 초안 이메일 목록 - 기존 초안 편집 - 모든 사용 가능한 라벨 목록 - 사용자 정의 라벨 만들기 - 이메일에서 적용 / 제거 라벨 - 기존 라벨 이름 - 사용되지 않은 라벨 삭제 - 라벨에 의한 검색 - 새 폴더 만들기 (Gmail 라벨로 단순화) - 폴더 사이 이메일 이동 - 모든 사용 가능한 폴더 목록 - Gmail의 고급 쿼리 구문을 사용하여 이메일 검색 - 생성, 관리, 삭제 이메일 필터 - 보낸 사람, 수신자, 제목, 내용 및 더 -...
개요(AI 번역)
Python에서 작성된 Gmail 통합을 위한 강력한 기능과 풍부한 Model Context Protocol (MCP) 서버. 이 서버는 Claude와 같은 AI 조수가 자연 언어를 통해 Gmail과 상호 작용하여 종합적인 이메일 관리 기능을 제공합니다.
! 키 기능
## ☸ 이메일 관리
- Customizable subject, content, 수신자 부담으로 이메일을 보내
- 전체 metadata로 이메일 내용을 읽고 검색
- 확인을 가진 trash에 이메일 이동
- read/unread로 표시 이메일
- 브라우저에서 직접 이메일 열기
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- 나중에 리뷰에 대한 초안 이메일 만들기
- 모든 새 글 목록
- 기존 초안 편집
️ 고급 라벨 관리
- 모든 사용 가능한 라벨 목록
- 사용자 정의 라벨 만들기
- 이메일에서 적용/제거 라벨
- 기존 라벨 이름을 변경
- 사용되지 않은 라벨 삭제
- 상표로 이메일 검색
F 폴더 조직
- 새 폴더 만들기 (Gmail 라벨로 단순화)
- 폴더 사이 이메일 이동
- 모든 사용 가능한 폴더 목록
강력한 검색 및 필터링
- Gmail의 고급 쿼리 구문을 사용하여 이메일 검색
- 생성, 관리, 삭제 이메일 필터
- 발송인, 수령인, 제목, 내용 등 필터
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
Enhanced Gmail MCP Server
A powerful and feature-rich Model Context Protocol (MCP) server for Gmail integration, written in Python. This server enables AI assistants like Claude to interact with Gmail through natural language, providing comprehensive email management capabilities.
🌟 Key Features
📧 Complete Email Management
- Send emails with customizable subject, content, and recipients
- Read and retrieve email content with full metadata
- Move emails to trash with confirmation
- Mark emails as read/unread
- Open emails directly in browser
📝 Draft Management
- Create draft emails for later review
- List all draft emails
- Edit existing drafts
🏷️ Advanced Label Management
- List all available labels
- Create custom labels
- Apply/remove labels from emails
- Rename existing labels
- Delete unused labels
- Search emails by label
📁 Folder Organization
- Create new folders (implemented as Gmail labels)
- Move emails between folders
- List all available folders
🔍 Powerful Search & Filtering
- Search emails using Gmail’s advanced query syntax
- Create, manage, and delete email filters
- Filter by sender, recipient, subject, content, and more
- Customize search results with flexible parameters
🗄️ Archive Management
- Archive emails (remove from inbox without deleting)
- Batch archive multiple emails matching search criteria
- List all archived emails
- Restore archived emails to inbox
🚀 Getting Started
Prerequisites
- Python 3.12+
- Python MCP SDK >= 2.0
- Google Cloud project with Gmail API enabled
- OAuth 2.0 credentials
Installation
# Clone the repository
git clone https://github.com/theposch/gmail-mcp.git
cd gmail-mcp
# Set up a virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install the package
pip install -e .
Google Cloud Setup
- Create a new Google Cloud project
- Enable the Gmail API
- Configure the OAuth consent screen:
- Select “External” user type
- Add your email as a test user
- Add the scope:
https://www.googleapis.com/auth/gmail/modify
- Create OAuth 2.0 credentials:
- Choose “Desktop app” as the application type
- Download the JSON credentials file
Configuration
Store your credentials securely and specify their location when running the server:
# Example directory structure for credentials
mkdir -p ~/.gmail-mcp
# Move your downloaded credentials file
mv ~/Downloads/client_secret_*.json ~/.gmail-mcp/credentials.json
🔧 Usage
Running with Claude Desktop
Add the following to your Claude Desktop configuration file (typically at ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
설치
npx @modelcontextprotocol/inspector uv run /path/to/gmail-mcp/src/gmail/server.py --creds-file-path /path/to/credentials.json --token-path /path/to/tokens.json설정
{
"mcpServers": {
"gmail": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/gmail-mcp",
"run",
"gmail",
"--creds-file-path",
"/absolute/path/to/credentials.json",
"--token-path",
"/absolute/path/to/tokens.json"
]
}
}
}