Google Drive MCP Server
This is a simple MCP server that integrates with Google Drive.
Prerequisites
- Node.js: Version 18 or higher is recommended (the current environment is using 16, so you might need to upgrade for full compatibility).
- Google Cloud Project:
- Go to the Google Cloud Console.
- Create a project.
- Enable the Google Drive API.
- Create a Service Account and download the JSON key file.
- Authentication:
- Set the environment variable
GOOGLE_APPLICATION_CREDENTIALSto the path of your JSON key file. - Alternatively, share the folder/files you want to access with the service account's email address.
- Set the environment variable
Configuration for Claude Desktop
Add the following to your Claude Desktop configuration file:
Windows: %APPDATA%\Claude\claude_desktop_config.jsonmacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"google-drive": {
"command": "node",
"args": [
"c:/git/projects/drive-mcp-connect/build/index.js"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "C:/path/to/your/service-account-key.json"
}
}
}
}
Tools Provided
list_files: List files in your Google Drive.get_file_info: Get metadata for a specific file by its ID.