Google Workspace MCP Server

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Provides tools for listing, searching, sending, and modifying emails, including support for managing labels, attachments, and email filtering

  • Enables creating, listing, updating, and deleting calendar events with support for attendees, date range filtering, and event management

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 : 캘린더 이벤트 삭제

필수 조건

  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와 클라이언트 비밀번호를 기록해 두세요.

설치 지침

Smithery를 통해 설치

Smithery를 통해 Claude Desktop용 gsuite-mcp를 자동으로 설치하려면:

지엑스피1

수동 설치

  1. 복제 및 설치 :
    git clone https://github.com/epaproditus/google-workspace-mcp-server.git cd google-workspace-mcp-server npm install
  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 라이선스에 따라 라이선스가 부여되었습니다.

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Gmail 및 캘린더 API와 상호 작용할 수 있는 도구를 제공하는 모델 컨텍스트 프로토콜 서버로, 이메일 및 캘린더 이벤트의 프로그래밍 방식 관리를 지원합니다.

  1. Features
    1. Gmail Tools
    2. Calendar Tools
  2. Prerequisites
    1. Setup Instructions
      1. Installing via Smithery
      2. Installing Manually
    2. Usage Examples
      1. Gmail Operations
      2. Calendar Operations
    3. Troubleshooting
      1. License
        ID: 8nrlttca99