NG

ngs/google-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

4 stars 8 forks 质量 71 趋势 20MIT

MCP server for Google Workspace APIs - Calendar, Drive, Gmail, Sheets, Docs, and Slides integration

概览

A Model Context Protocol (MCP) server that integrates with Google APIs (Calendar, Drive, Gmail, Sheets, Docs) to provide seamless access to Google services through MCP-compatible clients. - : Manage multiple Google accounts with automatic context-aware selection - : Integrated support for Google Calendar, Drive, Gmail, Sheets, and Docs - : Secure authentication with automatic token refresh - : Fully compliant with the Model Context Protocol specification - : Works on Windows, macOS, and Linux - : Flexible configuration through JSON files or environment variables For detailed setup instructions, see below. 1. Google Cloud Project with APIs enabled 2. OAuth 2.0 credentials from Google Cloud Console 3. Go 1.23 or later (only for building from source) Download pre-built binaries from the releases page for: - macOS (Intel & Apple Silicon) - Linux (x86_64 & ARM64) - Windows (x86_64) 1.

README

以下为原文 README 节选,完整内容请查看原文。

Google MCP Server

A Model Context Protocol (MCP) server that integrates with Google APIs (Calendar, Drive, Gmail, Sheets, Docs) to provide seamless access to Google services through MCP-compatible clients.

Features

  • Multiple Account Support: Manage multiple Google accounts with automatic context-aware selection
  • Multi-Service Support: Integrated support for Google Calendar, Drive, Gmail, Sheets, and Docs
  • OAuth 2.0 Authentication: Secure authentication with automatic token refresh
  • MCP Protocol Compliant: Fully compliant with the Model Context Protocol specification
  • Cross-Platform: Works on Windows, macOS, and Linux
  • Configurable: Flexible configuration through JSON files or environment variables

Quick Start

# Install via Homebrew
brew tap ngs/tap
brew install google-mcp-server

# Configure Claude Desktop (Apple Silicon)
echo '{
  "mcpServers": {
    "google": {
      "command": "/opt/homebrew/bin/google-mcp-server"
    }
  }
}' > ~/Library/Application\ Support/Claude/claude_desktop_config.json

# Run to authenticate (first time only)
google-mcp-server

For detailed setup instructions, see below.

Prerequisites

  1. Google Cloud Project with APIs enabled
  2. OAuth 2.0 credentials from Google Cloud Console
  3. Go 1.23 or later (only for building from source)

Installation

Using Homebrew (macOS/Linux)

brew tap ngs/tap
brew install google-mcp-server

From Source

git clone https://github.com/ngs/google-mcp-server.git
cd google-mcp-server
go build

Using Go Install

go install go.ngs.io/google-mcp-server@latest

Pre-built Binaries

Download pre-built binaries from the releases page for:

  • macOS (Intel & Apple Silicon)
  • Linux (x86_64 & ARM64)
  • Windows (x86_64)

Setup

  1. Create a Google Cloud Project

    • Go to Google Cloud Console
    • Create a new project or select an existing one
    • Enable the required APIs:
      • Google Calendar API
      • Google Drive API
      • Gmail API
      • Google Sheets API
      • Google Docs API
      • Google Slides API
  2. Create OAuth 2.0 Credentials

    • In Google Cloud Console, go to “APIs & Services” > “Credentials”
    • Click “Create Credentials” > “OAuth client ID”
    • Choose “Desktop app” as the application type
    • Download the credentials JSON file
  3. Configure the Server

    Create a config.json file:

    {
      "oauth": {
        "client_id": "YOUR_CLIENT_ID.apps.googleusercontent.com",
        "client_secret": "YOUR_CLIENT_SECRET",
        "redirect_uri": "http://localhost:8080/callback"
      },
      "services": {
        "calendar": {"enabled": true},
        "drive": {"enabled": true},
        "gmail": {"enabled": true},
        "sheets": {"enabled": true},
        "docs": {"enabled": true},
        "slides": {"enabled": true}
      }
    }
在 GitHub 查看完整 README

安装

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

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

# Install via Homebrew brew tap ngs/tap brew install google-mcp-server # Configure Claude Desktop (Apple Silicon) echo '{ "mcpServers": { "google": { "command": "/opt/homebrew/bin/google-mcp-server" } } }' > ~/Library/Application\ Support/Claude/claude_desktop_config.json # Run to authenticate (first time only) google-mcp-server