MCP cover image
See in Github
2025-02-27

A Model Context Protocol (MCP) server built in Rust for interacting with Google Drive and Google Sheets.

1

Github Watches

1

Github Forks

1

Github Stars

Google Drive & Sheets MCP Server

A Model Context Protocol (MCP) server built in Rust for interacting with Google Drive and Google Sheets. This tool provides MCP-compatible interfaces for Google Workspace services, allowing it to be used as part of larger agent workflows and compositions.

Features

Google Drive Operations

  • List files in Google Drive with filtering options:
    • Filter by MIME type
    • Custom search queries
    • Configurable page size
    • Custom ordering

Google Sheets Operations

  • Read data from Google Sheets with options:
    • Specify range
    • Choose major dimension (ROWS or COLUMNS)
  • Write data to Google Sheets
  • Create new spreadsheets with:
    • Custom title
    • Multiple sheets
  • Clear values from ranges in spreadsheets

MCP Integration

This server implements the Model Context Protocol (MCP), making it compatible with agent frameworks like Distri. Each service exposes its capabilities as MCP tools:

Drive Tools

  • list_files: List and filter Drive files with customizable parameters
  • Available capabilities exposed via resources/list endpoint

Sheets Tools

  • read_values: Read spreadsheet data with dimension control
  • write_values: Write data to spreadsheets
  • create_spreadsheet: Create new spreadsheets
  • clear_values: Clear ranges in spreadsheets
  • Available capabilities exposed via resources/list endpoint

Prerequisites

  • Rust (latest stable version)
  • Google Cloud Project with Drive and Sheets APIs enabled
  • OAuth 2.0 credentials configured for your Google Cloud Project

Installation

Install the mcp-google binary directly from GitHub using Cargo:

cargo install --git https://github.com/distrihub/mcp-google-workspace.git

This will install the mcp-google command to your system.

Configuration

Before using the server, you need to:

  1. Set up a Google Cloud Project
  2. Enable Google Drive and Google Sheets APIss
  3. Create OAuth 2.0 credentials
  4. Set up your environment variables:
    • ACCESS_TOKEN: Your Google OAuth access token
    • GOOGLE_CLIENT_ID: Your OAuth client ID
    • GOOGLE_CLIENT_SECRET: Your OAuth client secret
    • GOOGLE_REFRESH_TOKEN: Your OAuth refresh token

Usage

As MCP Server

The servers can be started independently and will communicate using the MCP protocol over stdio:

Start the Drive MCP server:

mcp-google drive --access-token <your-access-token>

Start the Sheets MCP server:

mcp-google sheets --access-token <your-access-token>

Using with Distri

This server can be used as part of a Distri agent configuration:

agents:
  google_workspace:
    drive:
      type: mcp
      command: ["mcp-google", "drive", "--access-token", "${ACCESS_TOKEN}"]
    sheets:
      type: mcp
      command: ["mcp-google", "sheets", "--access-token", "${ACCESS_TOKEN}"]

Token Management

Refresh your OAuth token:

mcp-google refresh \
  --client-id <your-client-id> \
  --client-secret <your-client-secret> \
  --refresh-token <your-refresh-token>

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Note

This is an MCP-compatible server that interacts with Google services. Make sure you have appropriate permissions and credentials before using the tool.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • apappascs
  • Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.

  • Mintplex-Labs
  • The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.

  • modelcontextprotocol
  • Model Context Protocol Servers

  • ShrimpingIt
  • Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

  • OffchainLabs
  • Go implementation of Ethereum proof of stake

  • n8n-io
  • Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的LLM资料总结(Agent框架、辅助编程、数据处理、模型训练、模型推理、o1 模型、MCP、小语言模型、视觉语言模型) | Summary of the world's best LLM resources.

    Reviews

    4 (1)
    Avatar
    user_XWtfB70a
    2025-04-16

    I've been using mcp-google-workspace by distrihub and it has significantly improved my workflow efficiency. The seamless integration with Google Workspace is impressive, and the setup is straightforward. This tool saves me a lot of time and effort, making collaboration smoother than ever. Highly recommended for anyone looking to enhance their productivity with Google Workspace! Check it out on GitHub: https://github.com/distrihub/mcp-google-workspace