Quick Configuration
Choose the setup that matches your environment.
Before You Start
- Confirm you have the account, endpoint, or API key required for Google Drive.
- Start with minimum scopes and read-only access where possible.
- Keep secrets in environment variables instead of hardcoding them in JSON.
Last verified: 2026-04-27
Environment: Archived reference server @modelcontextprotocol/server-gdrive with OAuth credentials
Install command:
npx -y @modelcontextprotocol/server-gdrive authLocal config
JSON Local config json
{
"google-drive": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-gdrive"]
}
} Verify prompt
Search my Google Drive for files with "meeting notes" in the title and summarize the first 3 matches.
Expected success output
You should see Drive file matches with names or document snippets after OAuth is completed.
Common Pitfalls & Fixes
- ⚠️ Watch out: OAuth flow complexity; scopes; enterprise policies.
- 🔑 Always store API keys in environment variables, never hardcode them in JSON.
- 🛡️ Start with read-only scopes if available to verify connection safely.
Security checklist
- Start with read/search workflows before enabling any write-capable Drive integration.
- Use a dedicated Google account for automation when team policy allows it.
Common errors
| Error | Cause | Fix |
|---|---|---|
Credentials not found | OAuth credentials were not generated before starting the server. | Run the auth command, complete the browser flow, then restart OpenClaw. |
Access blocked | Google Workspace or OAuth app policy blocks the requested scopes. | Ask the workspace admin to approve the OAuth app or use a personal test account. |
File not found | The account is authenticated but does not have access to the target file or shared drive. | Confirm the signed-in Google account and share the file with that account. |
Example Prompts
Once connected, try these prompts to test capabilities:
- List the latest documents and summarize them.
- Find documents related to "Q1 planning".
- Create a new note titled "Weekly Summary".
Verification Checklist
- Run 1-2 real prompts to confirm Google Drive returns usable data.
- Check that error messages are clear enough for troubleshooting.
- Document the required scopes, dependencies, and env vars for future reuse.