Google Drive Storage
Overview
Section titled “Overview”The Google Drive storage provider enables file operations (read, write, delete, list, exists) via the Google Drive API with OAuth2 authentication.
Prerequisites
Section titled “Prerequisites”- Google Cloud Console account
- Google Cloud project with Drive API enabled
- OAuth 2.0 credentials (client ID, client secret, refresh token)
-
Create a Google Cloud Project
Go to Google Cloud Console, create a new project (e.g.,
onlyoffice-mcp-integration). -
Enable the Google Drive API
Navigate to APIs & Services > Library, search for “Google Drive API”, click Enable.
-
Configure OAuth Consent Screen
Go to APIs & Services > OAuth consent screen:
- Select Internal (for Google Workspace) or External
- App name:
satware AI OnlyOffice MCP - Add scope:
https://www.googleapis.com/auth/drive(full access) orhttps://www.googleapis.com/auth/drive.file(app-created files only)
-
Create OAuth 2.0 Credentials
Go to APIs & Services > Credentials > Create Credentials > OAuth client ID:
- Application type: Desktop app
- Download the JSON file (contains
client_idandclient_secret)
-
Obtain a Refresh Token
Use the Google OAuth Playground:
- Click gear icon, check Use your own OAuth credentials
- Enter your Client ID and Client Secret
- Select Drive API v3 scope:
https://www.googleapis.com/auth/drive - Click Authorize APIs, sign in, grant permissions
- Click Exchange authorization code for tokens
- Copy the Refresh Token
Configuration
Section titled “Configuration”{ "type": "googledrive", "clientId": "123456789-abc.apps.googleusercontent.com", "clientSecret": "GOCSPX-xxx", "refreshToken": "1//0xxx", "rootFolderId": "1AbCdEfGhIjKlMnOpQrStUvWxYz"}| Parameter | Required | Description |
|---|---|---|
type |
Yes | Must be "googledrive" |
clientId |
Yes | OAuth2 Client ID |
clientSecret |
Yes | OAuth2 Client Secret |
refreshToken |
Yes | OAuth2 Refresh Token |
rootFolderId |
No | Root folder ID (default: "root") |
Environment Variables
Section titled “Environment Variables”| Variable | Description |
|---|---|
STORAGE_TYPE |
Set to googledrive |
GOOGLE_CLIENT_ID |
OAuth Client ID |
GOOGLE_CLIENT_SECRET |
OAuth Client Secret |
GOOGLE_REFRESH_TOKEN |
OAuth Refresh Token |
GOOGLE_ROOT_FOLDER_ID |
Root folder ID (optional) |
Related
Section titled “Related”- Storage Overview - All 7 providers
- Credential Management - Encrypted credential storage