MCP Google Drive Server

MCP Google Drive Server

Seamlessly connect Google Drive and Sheets with MCP tools for file access and editing.

228
Stars
85
Forks
228
Watchers
10
Issues
The MCP Google Drive Server enables integration with Google Drive and Google Sheets, allowing users to search, read, and retrieve files, as well as interact with spreadsheets. It provides MCP-compatible tools for searching files, reading file contents, reading spreadsheet ranges, and updating spreadsheet cells. Files in Google Drive are made accessible through standardized resources, supporting multiple export formats for Google Workspace files. Designed for easy authentication and configuration with Google Cloud, the server streamlines interactions between external systems and Google Drive resources.

Key Features

Search files in Google Drive via query parameters
Read file contents from Google Drive
Read data from specified ranges in Google Sheets
Update cell values in Google Sheets
Automated export of Google Workspace file formats (Docs, Sheets, Presentations, Drawings)
OAuth-based authentication with Google APIs
Pagination and page size control in file search
Support for native file formats and exported resources
Clear environment variable setup and configuration
Integration using standardized MCP tool definitions

Use Cases

Automating retrieval of reports and documents from Google Drive for model input
Reading and processing spreadsheet data to inform decision-making systems
Searching for relevant files by keyword or query within Google Drive
Programmatically updating inventory or tracking sheets in workflows
Exporting Google Docs to markdown for data ingestion
Extracting CSV data from Google Sheets for downstream analytics
Batch reading content from user or organizational drives
Integrating drive and sheets data into conversational or AI-powered applications
Simplifying file and spreadsheet management in automated pipelines
Facilitating context augmentation for AI systems leveraging enterprise Google resources

README

Google Drive server

This MCP server integrates with Google Drive to allow listing, reading, and searching files, as well as the ability to read and write to Google Sheets.

This project includes code originally developed by Anthropic, PBC, licensed under the MIT License from this repo.

Components

Tools

  • gdrive_search

    • Description: Search for files in Google Drive.
    • Input:
      • query (string): Search query.
      • pageToken (string, optional): Token for the next page of results.
      • pageSize (number, optional): Number of results per page (max 100).
    • Output: Returns file names and MIME types of matching files.
  • gdrive_read_file

    • Description: Read contents of a file from Google Drive.
    • Input:
      • fileId (string): ID of the file to read.
    • Output: Returns the contents of the specified file.
  • gsheets_read

    • Description: Read data from a Google Spreadsheet with flexible options for ranges and formatting.
    • Input:
      • spreadsheetId (string): The ID of the spreadsheet to read.
      • ranges (array of strings, optional): Optional array of A1 notation ranges (e.g., ['Sheet1!A1:B10']). If not provided, reads the entire sheet.
      • sheetId (number, optional): Specific sheet ID to read. If not provided with ranges, reads the first sheet.
    • Output: Returns the specified data from the spreadsheet.
  • gsheets_update_cell

    • Description: Update a cell value in a Google Spreadsheet.
    • Input:
      • fileId (string): ID of the spreadsheet.
      • range (string): Cell range in A1 notation (e.g., 'Sheet1!A1').
      • value (string): New cell value.
    • Output: Confirms the updated value in the specified cell.

Resources

The server provides access to Google Drive files:

  • Files (gdrive:///<file_id>)
    • Supports all file types
    • Google Workspace files are automatically exported:
      • Docs → Markdown
      • Sheets → CSV
      • Presentations → Plain text
      • Drawings → PNG
    • Other files are provided in their native format

Getting started

  1. Create a new Google Cloud project
  2. Enable the Google Drive API
  3. Configure an OAuth consent screen ("internal" is fine for testing)
  4. Add OAuth scopes https://www.googleapis.com/auth/drive.readonly, https://www.googleapis.com/auth/spreadsheets
  5. In order to allow interaction with sheets and docs you will also need to enable the Google Sheets API and Google Docs API in your workspaces Enabled API and Services section.
  6. Create an OAuth Client ID for application type "Desktop App"
  7. Download the JSON file of your client's OAuth keys
  8. Rename the key file to gcp-oauth.keys.json and place into the path you specify with GDRIVE_CREDS_DIR (i.e. /Users/username/.config/mcp-gdrive)
  9. Note your OAuth Client ID and Client Secret. They must be provided as environment variables along with your configuration directory.
  10. You will also need to setup a .env file within the project with the following fields. You can find the Client ID and Client Secret in the Credentials section of the Google Cloud Console.
GDRIVE_CREDS_DIR=/path/to/config/directory
CLIENT_ID=<CLIENT_ID>
CLIENT_SECRET=<CLIENT_SECRET>

Make sure to build the server with either npm run build or npm run watch.

Authentication

Next you will need to run node ./dist/index.js to trigger the authentication step

You will be prompted to authenticate with your browser. You must authenticate with an account in the same organization as your Google Cloud project.

Your OAuth token is saved in the directory specified by the GDRIVE_CREDS_DIR environment variable.

Authentication Prompt

Usage with Desktop App

To integrate this server with the desktop app, add the following to your app's server configuration:

json
{
  "mcpServers": {
    "gdrive": {
      "command": "npx",
      "args": ["-y", "@isaacphi/mcp-gdrive"],
      "env": {
        "CLIENT_ID": "<CLIENT_ID>",
        "CLIENT_SECRET": "<CLIENT_SECRET>",
        "GDRIVE_CREDS_DIR": "/path/to/config/directory"
      }
    }
  }
}

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

Star History

Star History Chart

Repository Owner

isaacphi
isaacphi

User

Repository Details

Language TypeScript
Default Branch main
Size 16,923 KB
Contributors 3
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

TypeScript
81.39%
JavaScript
18.61%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • Google Workspace MCP Server

    Google Workspace MCP Server

    A secure MCP server bridging Google Workspace and AI clients.

    Google Workspace MCP Server implements the Model Context Protocol to enable secure integration between Google Workspace services—such as Gmail, Calendar, and Drive—and any MCP-compatible AI client. It allows users to read, search, create, update, and delete Google Calendar events, emails, and Drive files directly through an AI agent interface. The tool ensures authentication via Google OAuth and provides a seamless setup process for both server and client sides. This makes it easier for AI-powered workflows to interact with Google Workspace data securely and contextually.

    • 20
    • MCP
    • giuseppe-coco/Google-Workspace-MCP-Server
  • Google MCP Tools

    Google MCP Tools

    Seamless Google Workspace integration for AI-driven clients via the MCP protocol

    Google MCP Tools enables AI clients to interact with Google services like Gmail, Calendar, and Drive using the Model Context Protocol (MCP). It provides secure OAuth and service account support for managing emails, calendar events, and drive files. Core capabilities include sending and drafting emails with attachments, managing labels, scheduling calendar events, and handling files in Google Drive. Designed for smooth integration with AI assistants such as Claude and Cursor.

    • 12
    • MCP
    • vakharwalad23/google-mcp
  • Google Workspace MCP Server

    Google Workspace MCP Server

    Full natural language control of Google Workspace through the Model Context Protocol.

    Google Workspace MCP Server enables comprehensive natural language interaction with Google services such as Calendar, Drive, Gmail, Docs, Sheets, Slides, Forms, Tasks, and Chat via any MCP-compatible client or AI assistant. It supports both single-user and secure multi-user OAuth 2.1 authentication, providing a production-ready backend for custom apps. Built on FastMCP, it delivers high performance and advanced context handling, offering deep integration with the entire Google Workspace suite.

    • 890
    • MCP
    • taylorwilsdon/google_workspace_mcp
  • mcp-gsuite

    mcp-gsuite

    MCP server for integrating Google Gmail and Calendar with AI tools

    mcp-gsuite enables seamless integration of Google Workspace products, such as Gmail and Calendar, with AI models via the Model Context Protocol (MCP). It supports multiple Google accounts, OAuth2 authentication, and a variety of email and calendar management functions. Users can retrieve, compose, and manage emails or calendar events, and provide rich contextual information to AI systems.

    • 457
    • MCP
    • MarkusPfundstein/mcp-gsuite
  • Google Ads MCP Server

    Google Ads MCP Server

    Seamlessly connect Google Ads API to MCP clients with automatic authentication and querying.

    Google Ads MCP Server is a FastMCP-powered Model Context Protocol server designed to integrate Google Ads API with MCP clients such as Claude Desktop. It provides automatic OAuth 2.0 authentication, smart token management, GAQL query execution, and keyword research tools. The server enables users to manage accounts, run advanced queries, and generate keyword ideas while maintaining secure local token storage. Optimized for one-click setup, it offers robust features for advertisers and developers looking to leverage Google Ads data with MCP-compatible tools.

    • 76
    • MCP
    • gomarble-ai/google-ads-mcp-server
  • Scrapeless MCP Server

    Scrapeless MCP Server

    A real-time web integration layer for LLMs and AI agents built on the open MCP standard.

    Scrapeless MCP Server is a powerful integration layer enabling large language models, AI agents, and applications to interact with the web in real time. Built on the open Model Context Protocol, it facilitates seamless connections between models like ChatGPT, Claude, and tools such as Cursor to external web capabilities, including Google services, browser automation, and advanced data extraction. The system supports multiple transport modes and is designed to provide dynamic, real-world context to AI workflows. Robust scraping, dynamic content handling, and flexible export formats are core parts of the feature set.

    • 57
    • MCP
    • scrapeless-ai/scrapeless-mcp-server
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results