Skip to main content
Glama
Steph-ux

gmail-mcp

by Steph-ux

gmail-mcp v1.0.0

Gmail용 통합 멀티 계정 Google OAuth2 MCP 서버입니다. 여러 Google 계정에서 이메일을 검색, 읽기, 작성, 전송, 초안 작성, 정리할 수 있습니다.

기능 (통합 도구 4개)

  • gmail_search: 공식 Gmail 검색 구문으로 이메일 검색 (is:unread, from:boss@corp.com, subject:invoice, newer_than:2d, has:attachment)

  • gmail_read: 전체 이메일 내용 및 메타데이터 읽기 (제목, 발신자, 본문 텍스트, HTML, CC, BCC, 라벨, 첨부 파일 목록)

  • gmail_send: 이메일 전송 또는 초안 작성 (HTML, CC, BCC, 스레드 답장, 파일 첨부 지원)

  • gmail_manage: 라벨링, 보관, 휴지통 관리, 읽음/읽지 않음 토글, 영구 삭제, 멀티 계정 인벤토리

Related MCP server: Moist

멀티 계정 아키텍처

단일 Google Cloud OAuth 클라이언트(credentials.json)로 여러 Gmail 계정을 인증할 수 있습니다. 토큰은 계정별로 ~/.secrets/gmail/tokens/<account_name>.json에 저장됩니다.

1. Google OAuth 자격 증명 설정 (1회)

  1. Google Cloud Console에서 프로젝트를 생성합니다.

  2. Gmail API를 활성화합니다.

  3. OAuth 2.0 클라이언트 ID(데스크톱 애플리케이션)를 생성합니다.

  4. 클라이언트 시크릿 JSON 파일을 다운로드하여 ~/.secrets/gmail/credentials.json으로 저장합니다 (또는 GMAIL_CREDENTIALS_JSON 설정).

2. 계정 인증

각 계정에 대해 대화형 인증 CLI를 실행합니다:

gmail-auth default    # Authenticates primary account
gmail-auth work       # Authenticates secondary work account
gmail-auth client_x   # Authenticates any additional account

인증된 모든 계정 목록 보기:

gmail-auth --list

MCP 클라이언트에 설치 (Claude Desktop, OpenCode, Cursor, Windsurf)

옵션 1: uvx로 즉시 실행 (권장)

{
  "mcpServers": {
    "gmail": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/Steph-ux/gmail-mcp.git", "gmail-mcp"]
    }
  }
}

옵션 2: pip install 사용

pip install git+https://github.com/Steph-ux/gmail-mcp.git

그런 다음 MCP 구성에 추가:

{
  "mcpServers": {
    "gmail": {
      "command": "gmail-mcp"
    }
  }
}

옵션 3: 로컬 클론 (개발)

{
  "mcpServers": {
    "gmail": {
      "command": "python",
      "args": ["D:\\Steph\\script\\gmail-mcp\\server.py"]
    }
  }
}

사용 예시

1. 메시지 검색

# Search in default account:
gmail_search(query='is:unread from:github')

# Search in work account:
gmail_search(account='work', query='subject:invoice newer_than:7d')

2. 메시지 읽기

gmail_read(account='work', message_id='18f2a9b4c10d')

3. 이메일 전송 또는 초안 작성

# Send direct email:
gmail_send(
    account='default',
    to='colleague@example.com',
    subject='Project Update',
    body_text='Here is the latest status...',
    body_html='<h1>Project Update</h1><p>Here is the latest status...</p>'
)

# Create a draft:
gmail_send(
    account='work',
    to='client@example.com',
    subject='Proposal draft',
    body_text='Please review the proposal.',
    draft=True
)

4. 정리 및 관리

# Archive email:
gmail_manage(account='work', action='archive', message_id='18f2a9b4c10d')

# Mark as unread:
gmail_manage(account='default', action='mark_unread', message_id='18f2a9b4c10d')

# Move to trash:
gmail_manage(account='default', action='trash', message_id='18f2a9b4c10d')

# List active accounts:
gmail_manage(action='list_accounts')

테스트

pytest tests

라이선스

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables interaction with Gmail through the MCP protocol, supporting sending, reading, searching, replying, forwarding, managing drafts and labels, and saving attachments.
    12
    3
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables Gmail operations such as reading, sending, searching, and managing emails, threads, labels, and drafts via MCP tools.
    1
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables reading, searching, sending, and drafting Gmail emails via MCP tools, with support for multiple accounts and background notifications.

View all related MCP servers

Related MCP Connectors

  • Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.

  • 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…

View all MCP Connectors

Latest Blog Posts

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/Steph-ux/gmail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server