Get the FREE Ultimate OpenClaw Setup Guide →

google

Comprehensive Google MCP server in Rust — 41 tools for Google Drive (Gmail & more planned). Stdio + Streamable HTTP with multi-user OAuth.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio cafercangundogdu-google-mcp gdrive-mcp-server --credentials-file client_secret.json \
  --env GDRIVE_MCP_HTTP_ADDR="127.0.0.1:3000" \
  --env GDRIVE_MCP_LOG_LEVEL="info" \
  --env GDRIVE_MCP_TRANSPORT="stdio or http depending on usage" \
  --env GDRIVE_MCP_CREDENTIALS="Path to OAuth2 credentials JSON" \
  --env GDRIVE_MCP_TOKEN_CACHE="~/.gdrive-mcp-token.json"

How to use

This MCP server implements a comprehensive Google Drive-based Model Context Protocol (MCP) server written in Rust. It exposes 41 tools across multiple domains (Files, Permissions, Comments, Replies, Revisions, Shared Drives, Changes, About, and Labels) and supports both stdio (single-user) and HTTP (multi-user) transports with OAuth2. You can run the server in stdio mode for local usage with the UI or tooling that communicates over standard input/output, or run it in HTTP mode to act as an OAuth proxy and MCP endpoint reachable by clients at an HTTP address. The repository includes integration points for Claude Desktop, MCP Inspector, and other MCP clients. Once running, clients can access the MCP endpoint to perform Drive operations via the provided tools and templates, and can employ prompts to assist with Drive organization and sharing tasks.

To use the server, start it with credentials, enabling either stdio or HTTP transport depending on your deployment needs. In stdio mode, a browser-based OAuth flow is opened on first run to authorize the application with Google Drive. In HTTP mode, each user authenticates through the MCP OAuth flow, with the server acting as an OAuth proxy to Google, and per-user tokens are scoped to their Google Drive access. Tools are exposed under the MCP endpoint, and the prompts help guide user-friendly interactions when performing tasks like file listing, creation, sharing, and content conversion.

How to install

Prerequisites:

  • Rust toolchain (recommended: rustc 1.80+)
  • Cargo installed (comes with Rust)
  • Google Cloud Project with Drive API enabled
  • OAuth2 credentials JSON file named client_secret.json (or service account JSON for server-to-server usage)
  1. Install the MCP server binary
cargo install gdrive-mcp-server
  1. Ensure you have the credentials file in your project root or provide the path when starting the server

  2. Run the server (stdio transport by default)

gdrive-mcp-server --credentials-file client_secret.json
  1. Optional: Run with HTTP transport for multi-user access
gdrive-mcp-server --transport http --http-addr 0.0.0.0:3000 --credentials-file client_secret.json
  1. Access the MCP endpoint (for HTTP mode) at http://localhost:3000/mcp

Additional notes

Tips and common considerations:

  • The server supports both stdio and HTTP transports. Set the desired transport via CLI options or environment variables as shown in the mcp_config example.
  • Environment variables can override CLI options. Common vars: GDRIVE_MCP_TRANSPORT (stdio|http), GDRIVE_MCP_HTTP_ADDR, GDRIVE_MCP_CREDENTIALS, GDRIVE_MCP_TOKEN_CACHE, GDRIVE_MCP_LOG_LEVEL.
  • For HTTP mode, the server acts as an OAuth proxy and issues per-user MCP tokens bound to Google tokens. Ensure your Google Cloud project has Drive API enabled and the correct OAuth client type configured (Desktop or Web app).
  • If you update credentials, you may need to restart the server so it picks up the new token/certificates.
  • The repository exposes a Claude Desktop integration example that shows how to register the MCP server under claude_desktop_config.json and how to invoke the MCP Inspector tooling.
  • If you plan to deploy publicly, consider securing the HTTP endpoint with TLS and configuring appropriate CORS and OAuth settings in line with your deployment requirements.

Related MCP Servers

Sponsor this space

Reach thousands of developers