GDrive MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "GOOGLE_SERVICE_ACCOUNT_KEY=${GOOGLE_SERVICE_ACCOUNT_KEY}" gdrive-mcp-server-af47 -- npx -y tsx https://raw.githubusercontent.com/shaikh3/gdrive-mcp-server/main/src/index.ts
Required:GOOGLE_SERVICE_ACCOUNT_KEY+ 3 optional
README.md

MCP server for Google Drive read/write operations.

GDrive MCP Server

MCP server for Google Drive read/write operations. Enables Claude to use Google Docs as project context files.

Works with: Claude Desktop (stdio) AND Claude Browser (HTTP/SSE)

Features

  • Read Google Docs (export to text/markdown)
  • Write/Update Google Docs (append or replace content)
  • Google Sheets (read/update cells, append rows)
  • Folder Operations (create, list, search)
  • File Upload/Download (any format)

Setup

1. Google Cloud Project

  1. Go to Google Cloud Console
  2. Create a new project (or use existing)
  3. Enable APIs:
    • Google Drive API
    • Google Docs API
    • Google Sheets API
  4. Create credentials → Service Account
  5. Download JSON key file
  6. Share your GDrive folders/files with the service account email (looks like: name@project.iam.gserviceaccount.com)

2. Claude Desktop (Local)

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "gdrive": {
      "command": "npx",
      "args": ["-y", "tsx", "https://raw.githubusercontent.com/shaikh3/gdrive-mcp-server/main/src/index.ts"],
      "env": {
        "GOOGLE_SERVICE_ACCOUNT_KEY": "{...your key...}"
      }
    }
  }
}

3. Claude Browser (Web) - Deploy to Vercel

For Claude browser, you need to deploy the server publicly.

Deploy to Vercel
  1. Fork this repo to your GitHub
  2. Connect to Vercel:
    npm i -g vercel
    vercel
    
  3. Add environment variable in Vercel Dashboard:
    • GOOGLE_SERVICE_ACCOUNT_KEY = your JSON key content
    • MCP_TRANSPORT = http
  4. Get your deployed URL: https://your-app.vercel.app
Claude Browser Config

In Claude browser (claude.ai), you need an MCP client that connects to your deployed endpoint. Configure it with:

Server URL: https://your-app.vercel.app/sse

Or if using a custom MCP client:

{
  "mcpServers": {
    "gdrive": {
      "url": "https://your-app.vercel.app/sse"
    }
  }
}

Environment Variables

Variable Required Description
GOOGLE_SERVICE_ACCOUNT_KEY Yes* JSON content of service account key
GOOGLE_SERVICE_ACCOUNT_PATH Alt* Path to JSON key file
MCP_TRANSPORT No stdio (default) or http
PORT No HTTP port (default: 3000)

*One of KEY or PATH is required

Tools

Document Operations

`gdrive_doc_read`

Read a Google Doc as text/markdown.

{
  "fileId": "1ABC123...",
  "format": "markdown"
}
`gdrive_doc_write`

Write/replace content in a Google Doc.

{
  "fileId": "1ABC123...",
  "content": "# Project Context\n\nUpdated from chat...",
  "mode": "replace"
}
`gdrive_doc_create`

Create a new Google Doc.

{
  "title": "Claude Project - Context",
  "folderId": "1FolderID...",
  "content": "Initial project context..."
}

Sheet Operations

`gdrive_sheet_read`

Read range from Google Sheet.

{
  "spreadsheetId": "1SheetID...",
  "range": "Sheet1!A1:D10"
}
`gdrive_sheet_write`

Write to range in Google Sheet.

{
  "spreadsheetId": "1SheetID...",
  "range": "Sheet1!A1",
  "values": [["Name", "Status"], ["Task 1", "Done"]]
}

Folder Operations

`gdrive_folder_create`

Create a new folder.

{
  "name": "Claude Projects",
  "parentId": "root"
}
`gdrive_search`

Search for files/folders.

{
  "query": "name contains 'Project' and mimeType = 'application/vnd.google-apps.document'"
}

Development

# Install dependencies
npm install

# Build
npm run build

# Run locally (stdio mode - for Claude Desktop)
npm start

# Run in HTTP mode (for Claude Browser)
MCP_TRANSPORT=http npm start

# Dev mode
npm run dev

Your Use Case: Project Context Files

Claude Desktop:

You: "Update my project context doc with what we just discussed"
Claude: *calls gdrive_doc_write on your context file*

Claude Browser:

You: "Read the project context from gdrive://doc/1ABC123..."
Claude: *fetches and reads via deployed MCP server*

The doc updates in real-time - accessible from any chat, any device.

License

MIT

Tools (7)

gdrive_doc_readRead a Google Doc as text/markdown.
gdrive_doc_writeWrite/replace content in a Google Doc.
gdrive_doc_createCreate a new Google Doc.
gdrive_sheet_readRead range from Google Sheet.
gdrive_sheet_writeWrite to range in Google Sheet.
gdrive_folder_createCreate a new folder.
gdrive_searchSearch for files/folders.

Environment Variables

GOOGLE_SERVICE_ACCOUNT_KEYrequiredJSON content of service account key
GOOGLE_SERVICE_ACCOUNT_PATHPath to JSON key file
MCP_TRANSPORTstdio (default) or http
PORTHTTP port (default: 3000)

Configuration

claude_desktop_config.json
{"mcpServers": {"gdrive": {"command": "npx", "args": ["-y", "tsx", "https://raw.githubusercontent.com/shaikh3/gdrive-mcp-server/main/src/index.ts"], "env": {"GOOGLE_SERVICE_ACCOUNT_KEY": "{...your key...}"}}}}

Try it

Update my project context doc with what we just discussed.
Read the project context from gdrive://doc/1ABC123...
Search for all Google Docs in my 'Claude Projects' folder that contain the word 'Architecture'.
Append the latest meeting notes to the 'Project Status' Google Sheet.
Create a new Google Doc titled 'Meeting Summary' in the root folder with the current conversation transcript.

Frequently Asked Questions

What are the key features of GDrive MCP Server?

Read and export Google Docs to text or markdown. Write and update Google Doc content. Read and update cells in Google Sheets. Create and manage Google Drive folders. Search for files and folders using Google Drive query syntax.

What can I use GDrive MCP Server for?

Maintaining live project documentation that Claude can read and update directly.. Automating the logging of chat summaries into a centralized Google Sheet.. Organizing AI-generated project artifacts into specific Google Drive folders.. Using Google Docs as a persistent memory store for long-running projects..

How do I install GDrive MCP Server?

Install GDrive MCP Server by running: npx -y tsx https://raw.githubusercontent.com/shaikh3/gdrive-mcp-server/main/src/index.ts

What MCP clients work with GDrive MCP Server?

GDrive MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep GDrive MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare