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. It provides a streamlined way to access and manipulate Google Drive content through a standardized protocol interface.
https://www.googleapis.com/auth/drive.readonly
https://www.googleapis.com/auth/spreadsheets
gcp-oauth.keys.json
and place it in your configuration directorynpm install
npm run build
For an automated installation with Claude Desktop:
npx -y @smithery/cli install @rishipradeep-think41/drive-mcp --client claude
When making your first request, you'll be prompted to authenticate in your browser. You must use an account within the same organization as your Google Cloud project.
Your OAuth token will be saved in the directory specified by the GDRIVE_CREDS_DIR
environment variable for future use.
Add the following to your app's server configuration:
{
"mcpServers": {
"gdrive": {
"command": "npx",
"args": [
"-y",
"@isaacphi/mcp-gdrive"
],
"env": {
"CLIENT_ID": "<YOUR_CLIENT_ID>",
"CLIENT_SECRET": "<YOUR_CLIENT_SECRET>",
"GDRIVE_CREDS_DIR": "/path/to/config/directory"
}
}
}
}
Search for files in your Google Drive:
query
(string): Search querypageToken
(string, optional): Token for paginationpageSize
(number, optional): Number of results per page (max 100)Read contents of a file from Google Drive:
fileId
(string): ID of the file to readRead data from a Google Spreadsheet:
spreadsheetId
(string): The ID of the spreadsheetranges
(array of strings, optional): A1 notation ranges (e.g., ['Sheet1!A1:B10']
)sheetId
(number, optional): Specific sheet ID to readUpdate cell values in a Google Spreadsheet:
fileId
(string): ID of the spreadsheetrange
(string): Cell range in A1 notation (e.g., 'Sheet1!A1'
)value
(string): New cell valueThe server provides access to Google Drive files using the resource identifier format:
gdrive:///<file_id>
Supported file types and conversions:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "gdrive" '{"command":"npx","args":["-y","@isaacphi/mcp-gdrive"],"env":{"CLIENT_ID":"<CLIENT_ID>","CLIENT_SECRET":"<CLIENT_SECRET>","GDRIVE_CREDS_DIR":"/path/to/config/directory"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"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"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"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"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect