Skip to main content
Glama
Google Workspace MCP Server

Google Workspace MCP Server

by epaproditus

Google Workspace MCP 서버

Gmail 및 캘린더 API와 상호작용하는 도구를 제공하는 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이 서버를 사용하면 MCP 인터페이스를 통해 이메일과 캘린더 일정을 프로그래밍 방식으로 관리할 수 있습니다.

특징

Gmail 도구

  • list_emails : 선택적 필터링을 사용하여 받은 편지함의 최근 이메일을 나열합니다.

  • search_emails : Gmail 쿼리 구문을 사용한 고급 이메일 검색

  • send_email : CC 및 BCC를 지원하는 새 이메일을 보냅니다.

  • modify_email : 이메일 라벨 수정(보관, 휴지통, 읽음/읽지 않음 표시)

캘린더 도구

  • list_events : 날짜 범위 필터링을 사용하여 예정된 캘린더 이벤트를 나열합니다.

  • create_event : 참석자를 포함한 새로운 캘린더 이벤트를 만듭니다.

  • update_event : 기존 캘린더 이벤트 업데이트

  • delete_event : 캘린더 이벤트 삭제

Related MCP server: Google Workspace MCP Server

필수 조건

  1. Node.js : Node.js 버전 14 이상을 설치하세요

  2. Google Cloud Console 설정 :

    • Google Cloud Console 로 이동

    • 새 프로젝트를 만들거나 기존 프로젝트를 선택하세요

    • Gmail API와 Google 캘린더 API를 활성화하세요.

      1. "API 및 서비스" > "라이브러리"로 이동하세요.

      2. "Gmail API"를 검색하여 활성화하세요.

      3. "Google 캘린더 API"를 검색하여 활성화하세요.

    • OAuth 2.0 자격 증명을 설정하세요.

      1. "API 및 서비스" > "자격 증명"으로 이동하세요.

      2. "자격 증명 만들기" > "OAuth 클라이언트 ID"를 클릭하세요.

      3. "웹 애플리케이션"을 선택하세요

      4. "인증된 리디렉션 URI"를 http://localhost:4100/code 포함하도록 설정합니다.

      5. 클라이언트 ID와 클라이언트 비밀번호를 기록해 두세요.

설치 지침

  1. 복제 및 설치 :

    지엑스피1

  2. OAuth 자격 증명 만들기 : 루트 디렉토리에 credentials.json 파일을 만듭니다.

    {
        "web": {
            "client_id": "YOUR_CLIENT_ID",
            "client_secret": "YOUR_CLIENT_SECRET",
            "redirect_uris": ["http://localhost:4100/code"],
            "auth_uri": "https://accounts.google.com/o/oauth2/auth",
            "token_uri": "https://oauth2.googleapis.com/token"
        }
    }
  3. 새로고침 토큰 받기 :

    node get-refresh-token.js

    이렇게 하면:

    • Google OAuth 인증을 위해 브라우저를 엽니다.

    • 다음 권한을 요청합니다.

      • https://www.googleapis.com/auth/gmail.modify

      • https://www.googleapis.com/auth/calendar

      • https://www.googleapis.com/auth/gmail.send

    • 자격 증명을 token.json 에 저장합니다.

    • 콘솔에 새로 고침 토큰 표시

  4. MCP 설정 구성 : MCP 설정 파일에 서버 구성을 추가합니다.

    • VSCode Claude 확장 프로그램의 경우: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

    • Claude 데스크톱 앱의 경우: ~/Library/Application Support/Claude/claude_desktop_config.json

    mcpServers 개체에 다음을 추가합니다.

    {
      "mcpServers": {
        "google-workspace": {
          "command": "node",
          "args": ["/path/to/google-workspace-server/build/index.js"],
          "env": {
            "GOOGLE_CLIENT_ID": "your_client_id",
            "GOOGLE_CLIENT_SECRET": "your_client_secret",
            "GOOGLE_REFRESH_TOKEN": "your_refresh_token"
          }
        }
      }
    }
  5. 빌드 및 실행 :

    npm run build

사용 예

Gmail 운영

  1. 최근 이메일 목록 :

    {
      "maxResults": 5,
      "query": "is:unread"
    }
  2. 이메일 검색 :

    {
      "query": "from:example@gmail.com has:attachment",
      "maxResults": 10
    }
  3. 이메일 보내기 :

    {
      "to": "recipient@example.com",
      "subject": "Hello",
      "body": "Message content",
      "cc": "cc@example.com",
      "bcc": "bcc@example.com"
    }
  4. 이메일 수정 :

    {
      "id": "message_id",
      "addLabels": ["UNREAD"],
      "removeLabels": ["INBOX"]
    }

캘린더 작업

  1. 이벤트 목록 :

    {
      "maxResults": 10,
      "timeMin": "2024-01-01T00:00:00Z",
      "timeMax": "2024-12-31T23:59:59Z"
    }
  2. 이벤트 만들기 :

    {
      "summary": "Team Meeting",
      "location": "Conference Room",
      "description": "Weekly sync-up",
      "start": "2024-01-24T10:00:00Z",
      "end": "2024-01-24T11:00:00Z",
      "attendees": ["colleague@example.com"]
    }
  3. 이벤트 업데이트 :

    {
      "eventId": "event_id",
      "summary": "Updated Meeting Title",
      "location": "Virtual",
      "start": "2024-01-24T11:00:00Z",
      "end": "2024-01-24T12:00:00Z"
    }
  4. 이벤트 삭제 :

    {
      "eventId": "event_id"
    }

문제 해결

  1. 인증 문제 :

    • 모든 필수 OAuth 범위가 부여되었는지 확인하세요.

    • 클라이언트 ID와 비밀번호가 올바른지 확인하세요

    • 새로고침 토큰이 유효한지 확인하세요

  2. API 오류 :

    • API 할당량 및 제한 사항을 확인하려면 Google Cloud Console을 확인하세요.

    • 프로젝트에 API가 활성화되어 있는지 확인하세요.

    • 요청 매개변수가 필요한 형식과 일치하는지 확인하세요.

특허

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다.

Available Tools

8 tools
create_eventC

Create a new calendar event

Inputs: end (required), start (required), summary (required), location, +2 more.

delete_eventB

Delete a calendar event

Inputs: eventId (required).

list_emailsB

List recent emails from Gmail inbox

Inputs: query, maxResults.

list_eventsC

List upcoming calendar events

Inputs: timeMax, timeMin, maxResults.

modify_emailA

Modify email labels (archive, trash, mark read/unread)

Inputs: id (required), addLabels, removeLabels.

search_emailsC

Search emails with advanced query

Inputs: query (required), maxResults.

send_emailC

Send a new email

Inputs: to (required), body (required), subject (required), cc, +1 more.

update_eventB

Update an existing calendar event

Inputs: eventId (required), end, start, summary, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 8 tools

    Disambiguation5/5

    Tools are clearly separated into two domains: calendar (create/delete/list/update events) and email (list/search/send/modify labels). No overlapping purposes, making it easy for an agent to select the correct tool.

    Naming Consistency5/5

    All tool names follow an excellent verb_noun pattern (e.g., create_event, list_emails). There is no mixing of conventions or inconsistent verb styles.

    Tool Count5/5

    With 8 tools, the set is well-scoped for covering two major Google Workspace services. Neither too few nor too many, each tool serves a distinct purpose.

    Completeness4/5

    Calendar operations are complete (CRUD). Email operations cover list, search, send, and label modification, but are missing permanent deletion and the ability to fetch detailed content of a single email. Still, core workflows are well-covered.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers