home / mcp / google drive mcp server

Google Drive MCP Server

Provides access to Google Drive and Sheets for listing, reading, searching files and updating Sheets data.

Installation
Add the following to your MCP client configuration file.

Configuration

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

This MCP server connects with Google Drive to list, read, and search files, and to read and write to Google Sheets. It lets you interact with Drive and Sheets from your MCP client as a flexible data source and workspace integration.

How to use

To use this MCP server with your MCP client, run it as a local process and configure your client to connect via stdio. You can start the server using the ready-made MCP script and supply your Google Cloud credentials through environment variables. A practical workflow is to launch the server from your development environment and then query Google Drive and Google Sheets endpoints from your client whenever you need to search files, read file contents, or read and update spreadsheet data.

How to install

Prerequisites: ensure you have Node.js and npm installed on your system.

How to install

# Prerequisites
node -v
npm -v

# 1) Create and configure the project (clone and install dependencies)
git clone https://github.com/konashevich/mcp-gdrive.git
cd mcp-gdrive
npm install

# 2) Build the project (TypeScript compilation)
npm run build

# 3) Start the server (stdio mode) via the provided MCP command
# The server may require environment setup for Google credentials as shown below
node dist/index.js

How to install

Configure your Google Cloud project and credentials as described in the Getting started steps.

How to install

Set up environment variables and optional config directory for Google credentials.

How to use

To integrate with a desktop MCP client, you can run the predefined MCP configuration shown below. This starts the server via npx and provides the necessary credentials through environment variables.

How to install

# Example environment configuration and start command
GDRIVE_CREDS_DIR=/path/to/config/directory
CLIENT_ID=YOUR_CLIENT_ID
CLIENT_SECRET=YOUR_CLIENT_SECRET

# Start the MCP server via the provided stdio command (from the snippet)
npx -y @isaacphi/mcp-gdrive

How to use

The server exposes tools that your MCP client can call to interact with Google Drive and Google Sheets.

Configuration and notes

Environment variables you will typically provide are GDRIVE_CREDS_DIR for the credentials directory, CLIENT_ID for the OAuth client, and CLIENT_SECRET for the OAuth client secret.

Troubleshooting and tips

If authentication does not complete, verify that the OAuth client ID and secret are correct and that the credentials directory contains the properly named key file (gcp-oauth.keys.json). Ensure the required Google Drive and Google Sheets APIs are enabled in your Google Cloud project.

Additional notes

The server includes tooling to search Drive files, read files, read spreadsheet ranges, and update spreadsheet cells. It is designed to be used from an MCP client via stdio as shown in the configuration example.

Available tools

gdrive_search

Search for files in Google Drive. Input: query (string), pageToken (optional), pageSize (optional). Output: matching file names and MIME types.

gdrive_read_file

Read contents of a file in Google Drive. Input: fileId. Output: contents of the file.

gsheets_read

Read data from a Google Spreadsheet with optional ranges and sheet selection. Input: spreadsheetId, ranges (optional), sheetId (optional). Output: requested data.

gsheets_update_cell

Update a cell value in a Google Spreadsheet. Input: fileId, range, value. Output: confirmation of the updated cell.