Skip to content

Google Drive Storage

The Google Drive storage provider enables file operations (read, write, delete, list, exists) via the Google Drive API with OAuth2 authentication.

  • Google Cloud Console account
  • Google Cloud project with Drive API enabled
  • OAuth 2.0 credentials (client ID, client secret, refresh token)
  1. Create a Google Cloud Project

    Go to Google Cloud Console, create a new project (e.g., onlyoffice-mcp-integration).

  2. Enable the Google Drive API

    Navigate to APIs & Services > Library, search for “Google Drive API”, click Enable.

  3. 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) or https://www.googleapis.com/auth/drive.file (app-created files only)
  4. 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_id and client_secret)
  5. 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
{
"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")
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)