Search for files in Google Drive
The Google Drive MCP server provides seamless integration with Google Drive, allowing you to list, read, and search through your files directly from AI assistants. It supports all file types, with automatic conversion of Google Workspace files to appropriate formats (Docs to Markdown, Sheets to CSV, etc.). With this integration, you can leverage your existing Google Drive content as context for AI interactions, making it easier to reference documents, spreadsheets, and other files during conversations without having to manually copy and paste content.
The Google Drive MCP server enables AI assistants to access and search your Google Drive files. This integration allows you to reference documents, spreadsheets, presentations, and other files stored in your Google Drive directly in your AI conversations.
Before using the Google Drive MCP server, you need to set up OAuth credentials:
https://www.googleapis.com/auth/drive.readonly
gcp-oauth.keys.json
After setting up your OAuth credentials, you need to authenticate the server:
auth
argument: node ./dist auth
or using the appropriate Docker commandAdd the following configuration to your AI assistant's settings:
{
"mcpServers": {
"gdrive": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gdrive"
],
"env": {
"GDRIVE_CREDENTIALS_PATH": "/path/to/.gdrive-server-credentials.json"
}
}
}
}
Replace /path/to/.gdrive-server-credentials.json
with the actual path to your credentials file.
If you prefer using Docker, add this configuration instead:
{
"mcpServers": {
"gdrive": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"mcp-gdrive:/gdrive-server",
"-e",
"GDRIVE_CREDENTIALS_PATH=/gdrive-server/credentials.json",
"mcp/gdrive"
]
}
}
}
Once installed and authenticated, you can use the Google Drive MCP server to:
search
toolgdrive:///<file_id>
The server will automatically handle file type conversions as needed, making the content accessible to your AI assistant in the most appropriate format.
https://www.googleapis.com/auth/drive.readonly
)