Google Drive MCP Server

Google Drive MCP Server

A read-only Model Context Protocol server that enables LLMs to search, list, and read files from Google Drive and shared drives. It automatically converts Google Workspace documents like Docs, Sheets, and Slides into Markdown, CSV, and plain text formats for easy processing.

Category
Visit Server

README

Google Drive MCP Server

A read-only Model Context Protocol server that gives LLM-powered tools (Claude Code CLI, Cursor, Claude Desktop, etc.) access to your Google Drive.

Search, list, and read files — including automatic export of Google Docs (as Markdown), Sheets (as CSV), and Slides (as plain text). Works with both personal drives and shared drives.

Quick start

1. Install

git clone https://github.com/wagnerlabs/gdrive-mcp.git
cd gdrive-mcp
npm install
npm run build

2. Set up Google Cloud credentials

  1. Go to Google Cloud Console
  2. Create a project (e.g. gdrive-mcp) or select an existing one
  3. Enable the Google Drive API
    • Navigate to APIs & Services > Library
    • Search for "Google Drive API" and click Enable
  4. Configure the OAuth consent screen
    • Navigate to APIs & Services > OAuth consent screen and click Get started
    • Enter an app name (e.g. gdrive-mcp), select your email as the support email, and click Next
    • Audience: select Internal (Workspace users) or External (personal Gmail), then click Next
    • Contact Information: enter your email and click Next
    • Finish: check the policy agreement box and click Create
  5. Add the Drive scope
    • In the left sidebar, go to Data Access
    • Click Add or remove scopes
    • Add: https://www.googleapis.com/auth/drive.readonly
    • Save
  6. Create OAuth credentials
    • In the left sidebar, go to Clients and click Create Client
    • Application type: Desktop app
    • Name: gdrive-mcp (this is just a console label to help you identify this client later)
    • Click Create
    • Download the JSON file and save it to the credentials/ folder at the root of this repo:
      gdrive-mcp/credentials/gcp-oauth.keys.json
      

3. Authenticate

node dist/index.js auth

A browser window will open for Google sign-in. After approval the token is saved to credentials/.gdrive-server-credentials.json.

4. Add to your MCP client

Claude Code CLI

claude mcp add --scope user wagnerlabs-gdrive -- node /absolute/path/to/gdrive-mcp/dist/index.js

The --scope user flag installs the server globally, so the MCP server will be available in Claude Code as wagnerlabs-gdrive from any directory you run Claude Code in.

To remove:

claude mcp remove wagnerlabs-gdrive

Cursor

Add to .cursor/mcp.json in any project (or globally):

{
  "mcpServers": {
    "gdrive": {
      "command": "node",
      "args": ["/absolute/path/to/gdrive-mcp/dist/index.js"]
    }
  }
}

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "gdrive": {
      "command": "node",
      "args": ["/absolute/path/to/gdrive-mcp/dist/index.js"]
    }
  }
}

Tools

All tools are read-only.

Tool Description
gdrive_search Search files using full-text search or Drive query syntax
gdrive_get_file Get detailed metadata for a file by ID
gdrive_read_file Read file content (Docs → Markdown, Sheets → CSV, Slides → plain text)
gdrive_list_files List files in a folder with sorting and pagination

File format handling

When reading files, Google Workspace documents are automatically exported:

Source format Exported as
Google Docs Markdown
Google Sheets CSV (first sheet)
Google Slides Plain text
Google Drawings PNG (metadata only)
Text files (.txt, .json, .js, etc.) Read directly as UTF-8
Binary files (images, PDFs, etc.) Returns metadata with browser link

Configuration

Credential paths can be customized via environment variables:

Variable Default Description
GDRIVE_OAUTH_PATH credentials/gcp-oauth.keys.json Path to OAuth client secret
GDRIVE_CREDENTIALS_PATH credentials/.gdrive-server-credentials.json Path to saved token

Updating

After pulling new changes, rebuild and the MCP server will pick up the update on next launch — no need to re-register it:

cd /path/to/gdrive-mcp
git pull
npm install
npm run build

Development

# Install dependencies
npm install

# Run in dev mode (uses tsx, no build step)
npm run dev

# Build
npm run build

# Run tests
npm test

# Run tests in watch mode
npm run test:watch

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured