mcpField
G
Google Drive MCP

Google Drive MCP

Local
github.comFiles & Storage231Updated 2w ago

About Google Drive MCP

Google Drive MCP is a self-hosted MCP server for Google Drive, Docs, Sheets, Slides, and Calendar. It suits users who want MCP clients to work with Drive files and Workspace content. It supports local, remote, and team deployment modes.

Key features

  1. 01Drive file management and Shared Drives operations
  2. 02Creating and editing Docs, Sheets, and Slides content
  3. 03Calendar event management
  4. 04Local OAuth with multiple Google accounts
  5. 05stdio and Streamable HTTP transports
  6. 06Optional gdrive:/// resource interface

Use cases

  1. 01Organizing Drive folders and moving older files into archives
  2. 02Building Sheets, Docs, and Slides from the same data
  3. 03Editing document text and adding comments
  4. 04Creating Calendar events with Meet links and Drive attachments

MCP support

This project is an MCP server that exposes about 130 tools for Drive, Docs, Sheets, Slides, and Calendar operations to MCP clients. It also offers a gdrive:/// resource interface for reading and discovery.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"piotr-agier-google-drive": {
"command": "npx",
"args": [
"-y",
"@piotr-agier/google-drive-mcp"
],
"env": {
"GOOGLE_DRIVE_OAUTH_CREDENTIALS": "<GOOGLE_DRIVE_OAUTH_CREDENTIALS>"
}
}
}
}
Run commandnpx -y @piotr-agier/google-drive-mcp
Environment variables to set
GOOGLE_DRIVE_OAUTH_CREDENTIALSSecretPath to a Google OAuth 2.0 Desktop app credentials JSON file.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@piotr-agier/google-drive-mcp2.12.0

Tools

130

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
querystringYesSearch query. When rawQuery=true, this is passed directly to the Google Drive API as the q parameter.
accountstringNoAlias of the Google account to target. Optional — defaults to the session/global default account, or the sole authenticated account. Run manage_accounts list to see available aliases.
orderByenumNoSort order for results. Keys without 'desc' sort ascending, so 'modifiedTime' is oldest-first. When paging, repeat the same value on every pageToken call.modifiedTime desc | modifiedTime | createdTime desc | createdTime | recency desc | recency | name | name_natural
pageSizenumberNoResults per page (default 50, max 100)
rawQuerybooleanNoIf true, pass query directly to Google Drive API without wrapping in fullText contains. Enables date filters, mimeType filters, etc.
pageTokenstringNoToken for next page of results

Details

From the project README

Google Drive MCP Server

MCP Toplist

Connect an MCP client to Google Drive, Docs, Sheets, Slides, and Calendar through one self-hosted server. Search and organize files, create and edit Workspace content, manage sharing, and automate multi-step workflows while keeping control of the Google identity and credentials used for every call.

Why this server

  • Drive-first workflows: 130 tools cover file management, Shared Drives, permissions, revisions, rich Docs editing, Sheets formatting, Slides authoring, and Calendar events.
  • Local or hosted: use stdio for a personal desktop client, Streamable HTTP for a hosted integration, or OAuth-protected team mode for a shared service.
  • Identity control: local OAuth supports multiple Google accounts and per-tool account selection; service accounts and externally managed OAuth tokens are also supported.
  • Agent-friendly access: tools expose targeted operations, while the optional gdrive:/// resource interface supports direct reading and discovery.
  • Open and self-hosted: credentials and tokens stay in the environment you operate.

This project remains focused on deep Drive and editor workflows rather than attempting to expose every Google Workspace API.

Client compatibility

Compatibility is determined by the transport and authentication flow a client supports.

Client typeTransportRecommended mode
Claude DesktopstdioLocal OAuth
Other local MCP clients, including Gemini CLIstdioLocal OAuth
claude.ai custom connectorsStreamable HTTPTeam mode
Other remote MCP clientsStreamable HTTPSingle identity behind access control, or team mode with OAuth 2.1

See Client configuration for configuration examples and transport requirements.

Quick start

1. Create Google OAuth credentials

In a Google Cloud project:

  1. Enable the Drive, Docs, Sheets, Slides, and Calendar APIs.
  2. Configure the OAuth consent screen and add your Google account as a test user when the app is in testing.
  3. Create an OAuth client with application type Desktop app.
  4. Download the JSON file and save it as:
~/.config/google-drive-mcp/gcp-oauth.keys.json

The setup guide has the complete Google Cloud walkthrough and alternative credential locations.

2. Authenticate
npx -y @piotr-agier/google-drive-mcp auth

Complete the Google consent flow in the browser. Tokens are stored by default at ~/.config/google-drive-mcp/tokens.json.

3. Add the server to your MCP client

For clients that use the common mcpServers configuration shape:

{
  "mcpServers": {
    "google-drive": {
      "command": "npx",
      "args": ["-y", "@piotr-agier/google-drive-mcp"]
    }
  }
}

Restart the client after saving its configuration. Claude Desktop paths and HTTP examples are documented in Client configuration.

4. Make a first tool call

Ask your client:

Run authGetStatus and tell me which Google account is active.

Then try a read-only Drive request:

Search my Google Drive for files modified in the last seven days.

If the identity is wrong or search returns no files, use the troubleshooting guide.

What you can do

Organize Drive
Find PDF files in /Reports, create an Archive folder there, and move files older
than one year into it.
Build a report
Create a Google Sheet for monthly results, summarize it in a Google Doc, and
create a short Google Slides presentation from the summary.
Edit a document
Find the "Project Plan" document, replace the old launch date, format the new
date in bold, and add a comment describing the change.
Prepare a meeting
Create a Calendar event with a Google Meet link and attach the project brief
from Drive.

Documentation

Every section that used to live in this README is now in one of these guides.

GuideContents
SetupRequirements, Google Cloud APIs, OAuth credentials, and installation
Client configurationSupported transports and client configuration
AuthenticationLocal OAuth, multi-account, service accounts, external tokens, and scopes
ConfigurationCLI flags, environment variables, defaults, and precedence
DeploymentDocker, Streamable HTTP, team mode, and reverse-proxy security
Tool referenceAll Drive, Docs, Sheets, Slides, Calendar, and account tools
TroubleshootingAuthentication, API, identity, Docker, and rate-limit problems
DevelopmentRepository structure, build commands, tests, and contributions

Security

  • Never commit OAuth credentials, service-account keys, access tokens, refresh tokens, or tokens.json.
  • Use the narrowest OAuth scopes that support the tools you need.
  • Keep the default HTTP bind address on 127.0.0.1 unless the server is protected by TLS and access control.
  • Use team mode for shared deployments so every request is authenticated as its caller.
  • Treat team-store.json as a secret because it contains members' Google refresh tokens.

See Authentication and Deployment for the complete security and identity model.

Development and support

See the development guide to build and test the project.

  • Report defects and request features in GitHub Issues.
  • Review released changes in the changelog.
  • Contributions are welcome through pull requests.

License

MIT

Acknowledgments

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.