This MCP server integrates with Google Drive to allow listing, reading, and searching files, as well as the ability to read and write to Google Sheets.
This project includes code originally developed by Anthropic, PBC, licensed under the MIT License from this repo.
gdrive_search
query
(string): Search query.pageToken
(string, optional): Token for the next page of results.pageSize
(number, optional): Number of results per page (max 100).gdrive_read_file
fileId
(string): ID of the file to read.gsheets_read
spreadsheetId
(string): The ID of the spreadsheet to read.ranges
(array of strings, optional): Optional array of A1 notation ranges (e.g., ['Sheet1!A1:B10']
). If not provided, reads the entire sheet.sheetId
(number, optional): Specific sheet ID to read. If not provided with ranges, reads the first sheet.gsheets_update_cell
fileId
(string): ID of the spreadsheet.range
(string): Cell range in A1 notation (e.g., 'Sheet1!A1'
).value
(string): New cell value.The server provides access to Google Drive files:
gdrive:///<file_id>
)
https://www.googleapis.com/auth/drive.readonly
, https://www.googleapis.com/auth/spreadsheets
gcp-oauth.keys.json
and place into the path you specify with GDRIVE_CREDS_DIR
(i.e. /Users/username/.config/mcp-gdrive
)GDRIVE_CREDS_DIR=/path/to/config/directory
CLIENT_ID=<CLIENT_ID>
CLIENT_SECRET=<CLIENT_SECRET>
Make sure to build the server with either npm run build
or npm run watch
.
Next you will need to run node ./dist/index.js
to trigger the authentication step
You will be prompted to authenticate with your browser. You must authenticate with an account in the same organization as your Google Cloud project.
Your OAuth token is saved in the directory specified by the GDRIVE_CREDS_DIR
environment variable.
To integrate this server with the desktop app, add the following to your app's server configuration:
{
"mcpServers": {
"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 is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Seamless access to top MCP servers powering the future of AI integration.