mcp-gdrive
Google Drive MCP server for integrating with Google Drive to allow listing, reading, and searching over files.
claude mcp add --transport stdio tonioshikanlu-mcp-gdrive-server node ./dist auth \ --env GDRIVE_OAUTH_PATH="<path-to-gcp-oauth-keys.json>" \ --env GDRIVE_CREDENTIALS_PATH="<path-to-credentials.json>"
How to use
This MCP server provides a Google Drive integration that lets you list, read, and search files stored in a Google Drive. The central capability is a gdrive resource you can access through the MCP interface, and a dedicated search tool that lets you query Drive contents by a textual query. Files are served in their native formats by default, while Google Workspace documents (Docs, Sheets, Presentations, Drawings) are automatically exported to widely usable formats such as Markdown, CSV, plain text, or PNG when retrieved. To authenticate with Google Drive, you run the server in authentication mode which opens a browser flow to grant access, and the credentials are saved locally for subsequent requests. The server is designed to be run with a built server command and supports running through npm/yarn in addition to Docker or NPX usage as shown in the installation section.
How to install
Prerequisites:
- Node.js (LTS) and npm installed on your system
- A Google Cloud project with Drive API enabled and OAuth 2.0 credentials (Desktop app)
- An environment or workspace where you can persist credentials
Steps:
- Clone or download the server repository
- Install dependencies
npm install - Build the server (for production use) or run in watch mode during development
npm run build # or for development watch mode npm run watch - Prepare OAuth keys
- Create a Google Cloud project, enable Drive API, configure OAuth consent screen, and create an OAuth Client ID for a Desktop App.
- Download the JSON key file and rename it to gcp-oauth.keys.json, placing it at the repository root under servers/gcp-oauth.keys.json
- Run the authentication flow to generate credentials
node ./dist auth - Start the server (post-auth) using the built dist entry
node ./dist
Alternative run methods shown in the README:
- NPX: use the NPX command to run the server without local install:
npx -y @modelcontextprotocol/server-gdrive - Docker (example for authenticated run): see the Docker command and usage in the README for mounting credentials and setting environment variables.
Prerequisites for Docker-based setup:
- Docker installed and running
- OAuth keys file available locally
Additional notes
Notes and tips:
- The server exposes a gdrive resource (gdrive:///<file_id>) for accessing files. Google Workspace documents are automatically exported to friendly formats when accessed.
- When running authentication, the credentials are stored locally (as described in the README). Ensure the credentials path is writable by the server process.
- If you encounter permission or API scope errors, double-check that the OAuth scope https://www.googleapis.com/auth/drive.readonly is configured in the Google Cloud Console and that the OAuth client is of type Desktop App.
- If running via Docker, remember to bind mount the OAuth keys file and export GDRIVE_OAUTH_PATH and GDRIVE_CREDENTIALS_PATH correctly as shown in the examples.
- For NPX usage, the server package name is typically @modelcontextprotocol/server-gdrive; ensure you use the correct package tag if the repository updates this value.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.