PG

paulfidika/gmail-mcp-server

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

22 stars 14 forks 품질 61 트렌드 0MIT

Gmail과 상호 작용하는 단일 파일 MCP-server. Claude Desktop 및 Cursor와 함께 작동합니다.

개요

AI 에이전트 검색 Gmail 스레드를 할 수있는 MCP 서버, 이메일 쓰기 스타일을 이해하고, 초안 이메일을 만듭니다. 1. Google Cloud 콘솔로 이동 2. 상단 3에서 "프로젝트 선택" 드롭 다운을 클릭합니다. 클릭 "새로운 프로젝트" 4. 프로젝트 이름을 입력하십시오 (예 : "Gmail MCP Server") 5. "Create"를 클릭하십시오 1. 새로운 프로젝트에서 "APIs & Services"로 이동 → "Library" 2. "Gmail API" 3. "Gmail API"를 클릭하고 "Enable"을 클릭하십시오 1. "APIs & Services"로 이동 → "Credentials" 2. 클릭 "Create Credentials" → "OAuth Client ID" 3. OAuth 동의 화면을 설정하면 - "External" 사용자 유형 선택 - 필요한 필드 (App 이름, 사용자 지원 이메일, 개발자 이메일) - "테스트 사용자"섹션에 이메일을 추가 - 모든 단계를 통해 저장하고 계속 4. Credentials에서 "Create Credentials" → "OAuth Client ID"를 클릭하십시오. 응용 프로그램 유형으로 "Desktop application"을 선택하십시오. 이름을 입력하십시오 (예, "Gmail MCP 클라이언트") 7. 클릭 "Create" 8.

개요(AI 번역)

AI 에이전트 검색 Gmail 스레드를 할 수있는 MCP 서버, 이메일 쓰기 스타일을 이해하고, 초안 이메일을 만듭니다.

1. Google 인증 받기

단계 1: 구글 클라우드 프로젝트 만들기

  1. Google Cloud 콘솔로 이동
  2. 상단의 “프로젝트 선택” 드롭다운
  3. "새로운 프로젝트"를 클릭하십시오
  4. 프로젝트 이름을 입력하십시오 (예 : “Gmail MCP Server”)
  5. "Create"를 클릭하십시오

단계 2: Gmail API 사용

  1. 새로운 프로젝트에서 "APIs & Services"로 이동 → “Library”
  2. “Gmail API” 검색
  3. "Gmail API"를 클릭하고 "Enable"을 클릭하십시오

단계 3: OAuth2 Credentials 만들기

  1. "APIs & Services"로 이동 → “Credentials”
  2. "Create Credentials"을 클릭하십시오 → “OAuth Client ID”
  3. 신속한 경우 OAuth 동의 화면을 구성하십시오.
  • "External"사용자 유형 선택
  • 필수 필드 작성 (앱 이름, 사용자 지원 이메일, 개발자 이메일)
  • "테스트 사용자"섹션에 이메일을 추가
  • 모든 단계를 통해 저장하고 계속
  1. Credentials에서 다시, 클릭 “Create Credentials” → “OAuth Client ID”
  2. 신청 유형으로 "Desktop application"을 선택하십시오.
  3. 이름을 입력하십시오 (예 : “Gmail MCP Client”)
  4. "Create"를 클릭하십시오
  5. 명세.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

Gmail MCP Server

An MCP server that lets AI agents search Gmail threads, understand your email writing style, and create draft emails.

1. Get Google Authentication

Step 1: Create a Google Cloud Project

  1. Go to Google Cloud Console
  2. Click “Select a project” dropdown at the top
  3. Click “New Project”
  4. Enter a project name (e.g., “Gmail MCP Server”)
  5. Click “Create”

Step 2: Enable Gmail API

  1. In your new project, go to “APIs & Services” → “Library”
  2. Search for “Gmail API”
  3. Click on “Gmail API” and click “Enable”

Step 3: Create OAuth2 Credentials

  1. Go to “APIs & Services” → “Credentials”
  2. Click “Create Credentials” → “OAuth Client ID”
  3. If prompted, configure the OAuth consent screen:
    • Choose “External” user type
    • Fill in required fields (App name, User support email, Developer email)
    • Add your email to “Test users” section
    • Save and continue through all steps
  4. Back in Credentials, click “Create Credentials” → “OAuth Client ID”
  5. Choose “Desktop application” as the application type
  6. Enter a name (e.g., “Gmail MCP Client”)
  7. Click “Create”
  8. Important: Copy the Client ID and Client Secret from the confirmation dialog (you’ll need these for configuration)

Step 4: Grant OAuth Scopes

When you first run the server, it will open your browser for authorization. The server requests only these minimal permissions:

What We Request:

  • ✅ Gmail Readonly Access (gmail.readonly)

    • Search and read your email messages
    • Download email attachments
    • View email metadata (subjects, senders, dates)
  • ✅ Gmail Compose Access (gmail.compose)

    • Create email drafts
    • Update existing drafts
    • Delete drafts
    • Send emails (permission granted but not used by this server)

What This Server Actualy Implements:

  • ✅ Search and read emails - Full search capabilities
  • ✅ Extract attachment text - Safe PDF/DOCX/TXT text extraction
  • ✅ Create/update drafts - Smart draft management with thread awareness
  • ❌ Send emails - Server doesn’t implement sending (though permission is granted)
  • ❌ Delete emails - Server doesn’t implement deletion
  • ❌ Modify labels - Server doesn’t implement label management

2. Add to MCP Clients

Build the server first: go build .

You’ll want to add this to your agent’s configuration file:

{
  "mcpServers": {
    "gmail": {
      "command": "C:/path/to/your/auto-gmail.exe",
      "env": {
        "GMAIL_CLIENT_ID": "your_client_id_here.apps.googleusercontent.com",
        "GMAIL_CLIENT_SECRET": "your_client_secret_here",
        "OPENAI_API_KEY": "your_openai_api_key_here"
      }
    }
  }
}

⚡ Persistent HTTP Mode (Recommended to Avoid OAuth Popups)

Problem: In stdio mode, Cursor starts a fresh server process each time (and for each tab), causing OAuth popup spam.

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "gmail": { "command": "C:/path/to/your/auto-gmail.exe", "env": { "GMAIL_CLIENT_ID": "your_client_id_here.apps.googleusercontent.com", "GMAIL_CLIENT_SECRET": "your_client_secret_here", "OPENAI_API_KEY": "your_openai_api_key_here" } } } }