# google disk

> Automate OAuth token verification and refresh for mcp-google-disk integrations.

google disk is a free AI agent skill on Agensi by Дмитрий Варчак, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Дмитрий Варчак](https://www.agensi.io/creators/creator-1394)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-11-22
- Security: scan passed (2026-11-22); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/google-disk
- Tags: llm-ops, python, google-drive, oauth2, mcp-server

## About this skill

Broken OAuth connections to Google Drive stall automation workflows. This skill manages the verification and renewal of Google Drive API credentials using the `mcp-google-disk` server.

### What it does
- **Connection verification** runs a script to validate the current OAuth session and retrieve the authenticated user email.
- **Error handling** detects `invalid_grant` and `RefreshError` exceptions to trigger the re-authentication flow.
- **Token renewal** generates a new refresh token using local client secrets and browser-based authorization.
- **Configuration updates** writes updated credentials directly to the JSON configuration file to restore server access.

### How it works
1. **Validate session** by executing a Python one-liner to fetch account details from the Google Drive API.
2. **Handle expiration** by locating the local client secret JSON and initiating the `get_refresh_token.py` helper.
3. **Authorize access** through the generated URL and capture the new token from the terminal output.
4. **Persist credentials** by updating the `mcp-google-disk-config.json` file at the specified system path.

### Frameworks & tools
This skill requires Python 3.x, the `google-api-python-client`, and the `mcp-google-disk` server implementation.

### Why this beats prompting it yourself
Manually debugging OAuth flow errors often leads to incorrect scope handling or misconfigured JSON paths. This skill provides the exact CLI commands and logic to cycle tokens without checking API documentation.

### Use cases
- **Restore broken integrations** when an automated agent loses access to a Google Drive directory.
- **Initial server setup** by guiding the user through the first-time OAuth handshake.
- **Credential maintenance** to verify service health before running batch file operations.

### Known limitations
The user must provide their own machine-specific paths for the config and client secret JSON files. Token refresh requires manual browser interaction to complete the OAuth flow.

## Requires

- Python
- Google Disk Config MCP
- Git

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the google disk skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What specific problem does the google disk skill solve for my AI agent?

This skill automates the verification and renewal of expired or broken OAuth tokens, specifically for the `mcp-google-disk` server, preventing automation workflows from stalling due to authentication errors.

### What are the technical prerequisites for using this skill?

You will need Python 3.x installed on your machine, along with the `google-api-python-client` library and the `mcp-google-disk` server implementation.

### Which AI agents or frameworks is this skill compatible with?

The skill is designed to work with any AI agent or platform capable of executing local CLI commands and interacting with the Model Context Protocol (MCP) framework.

### Is the OAuth renewal process fully automated, or do I need to do anything manually?

While the skill automates the detection and configuration updates, Google's security policy requires a human to manually approve the access request in a web browser during the initial or renewal handshake.

### What exactly is included in this skill package?

You receive the logic and CLI workflows needed to validate sessions, handle 'invalid_grant' errors, and update your `mcp-google-disk-config.json` file to restore server access.

### Do I need to provide my own API credentials to use this?

Yes, you must provide the local file paths for your `client_secret.json` and your MCP configuration file so the skill can correctly target your specific environment.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
