Overview
You turn Google's setup instructions for the Drive MCP server into a local Python checker that reviews synthetic connection settings. It separates complete settings from missing declarations and excessive scopes, and it labels every result as a configuration review that still needs a live access test.
- A
checker.pyscript that reviews a proposed read-only Drive MCP connection described in JSON. - Four synthetic configurations that produce complete, missing, excessive and noted results.
- Console output and a
review.jsonfile in which every result carries the labelconfiguration review, awaiting live access test. - A link to the relevant Google setup page beside every check.
Tool
Google Workspace MCP servers
The mock checker needs no account connection or paid API calls. Real connections require Google project and OAuth setup; Standard usage has quotas, while Scaled charges begin April 1, 2027.
Announcement
Google announced generally available MCP servers and an agent access requirement beginning February 1, 2027. Agentic OAuth identification is part of the documented setup.
Before you begin
Python 3.10 or newer
Python is free from python.org or your package manager. The checker uses only the standard library, and you can confirm your version with python --version.
A text editor
You write four small JSON files and one Python script.
Basic OAuth vocabulary
You should know what an OAuth client and its scopes are. No Google account or Cloud project is needed for this build.
Time to read Google's MCP setup guide
The checks come from it, so keep the page open while you work.
Stage 01 · setup10 minutes
Set up the checker folder
Create the project folder and an isolated Python environment.
The checker reads local files and calls no Google service, so it needs no credentials and no paid API calls. A virtual environment keeps the folder self-contained for any later additions.
mkdir -p workspace-checklist/configs && cd workspace-checklist
python3 -m venv .venv
source .venv/bin/activate
python --versionNew-Item -ItemType Directory -Force workspace-checklist\configs
cd workspace-checklist
python -m venv .venv
.venv\Scripts\Activate.ps1
python --versionworkspace-checklist/
.venv/
configs/
complete.json
missing.json
excessive.json
readwrite.json
checker.py
review.json # written by the checkerYour prompt shows (.venv), python --version prints 3.10 or newer, and an empty configs folder exists.
Stage 02 · data20 minutes
Turn the setup guide into checks
List the declarations a read-only Drive connection needs, with the page that states each one.
Google's announcement says Workspace MCP servers are generally available, and from February 1, 2027 agents must reach Workspace data through those servers or the Workspace CLI. It also asks developers to mark agent OAuth clients with the option Use this client for an AI-powered agent.
The MCP setup guide supplies the concrete values. Read its Drive entries and the OAuth client steps, then compare them with the table below.
| Check | Expected value | Source page |
|---|---|---|
| Server URL | https://drivemcp.googleapis.com/mcp/v1 | Configure the MCP servers |
| Enabled services | drivemcp.googleapis.com and drive.googleapis.com | Configure the MCP servers |
| Client type | Web application, required by the Claude and Antigravity hosts | Configure the MCP servers |
| Agent identification | Use this client for an AI-powered agent ticked | OAuth client help, agentic clients |
| Redirect URI | The host's callback, such as https://claude.ai/api/mcp/auth_callback | Configure the MCP servers |
| Read scope | https://www.googleapis.com/auth/drive.readonly | Configure the MCP servers |
| Listed write scope | https://www.googleapis.com/auth/drive.file, reported as a note | Drive API scopes |
Any other scope is excessive for this proposal. That covers the full drive scope, which can view and manage all Drive files, and scopes for other products such as Gmail.
You can name, for each row of the table, the page that states the expected value.
Stage 03 · data15 minutes
Write synthetic settings
Create four JSON files that each exercise a different outcome.
Each file describes one proposed connection. The agentic field stands for the console checkbox, since the checker cannot see the console.
{
"name": "synthetic read-only Drive review",
"mcp_server_url": "https://drivemcp.googleapis.com/mcp/v1",
"enabled_services": ["drivemcp.googleapis.com", "drive.googleapis.com"],
"oauth_client": {
"application_type": "web_application",
"agentic": true,
"redirect_uris": ["https://claude.ai/api/mcp/auth_callback"]
},
"scopes": ["https://www.googleapis.com/auth/drive.readonly"]
}
{
"name": "synthetic client without agent identification",
"mcp_server_url": "https://drivemcp.googleapis.com/mcp/v1",
"enabled_services": ["drive.googleapis.com"],
"oauth_client": {
"application_type": "web_application",
"redirect_uris": ["https://claude.ai/api/mcp/auth_callback"]
},
"scopes": []
}
{
"name": "synthetic client asking for too much",
"mcp_server_url": "https://drivemcp.googleapis.com/mcp/v1",
"enabled_services": ["drivemcp.googleapis.com", "drive.googleapis.com"],
"oauth_client": {
"application_type": "web_application",
"agentic": true,
"redirect_uris": ["https://claude.ai/api/mcp/auth_callback"]
},
"scopes": [
"https://www.googleapis.com/auth/drive.readonly",
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/gmail.modify"
]
}
{
"name": "synthetic client with the drive.file scope",
"mcp_server_url": "https://drivemcp.googleapis.com/mcp/v1",
"enabled_services": ["drivemcp.googleapis.com", "drive.googleapis.com"],
"oauth_client": {
"application_type": "web_application",
"agentic": true,
"redirect_uris": ["https://claude.ai/api/mcp/auth_callback"]
},
"scopes": [
"https://www.googleapis.com/auth/drive.readonly",
"https://www.googleapis.com/auth/drive.file"
]
}
The missing case declares no scopes and leaves out both the MCP service and the agent flag. The excessive case asks for full Drive access and a Gmail scope on top of the read scope.
configs holds four files, and python -m json.tool configs/missing.json prints the file back without an error.
Stage 04 · build20 minutes
Write the checks
Encode each declaration as a check that returns a status and detail with a link to its source page.
Every result is a small dictionary with the same label value. That keeps the review status attached to each result wherever it ends up, including in saved JSON.
"""Review a proposed read-only Drive MCP connection from a local JSON file."""
import json
import sys
from pathlib import Path
GUIDE = "https://developers.google.com/workspace/guides/configure-mcp-servers"
AGENT_CLIENT = "https://support.google.com/cloud/answer/15549257#agentic-client"
DRIVE_SCOPES = "https://developers.google.com/workspace/drive/api/guides/api-specific-auth"
SERVER_URL = "https://drivemcp.googleapis.com/mcp/v1"
SERVICES = {"drivemcp.googleapis.com", "drive.googleapis.com"}
REQUIRED_SCOPES = {"https://www.googleapis.com/auth/drive.readonly"}
LISTED_SCOPES = {"https://www.googleapis.com/auth/drive.file"}
LABEL = "configuration review, awaiting live access test"
def result(status: str, check: str, detail: str, link: str) -> dict:
return {"status": status, "check": check, "detail": detail, "link": link, "label": LABEL}
def review(cfg: dict) -> list:
out = []
url = cfg.get("mcp_server_url")
out.append(result("complete" if url == SERVER_URL else "missing", "server URL",
f"expected {SERVER_URL}, found {url!r}", GUIDE))
absent = SERVICES - set(cfg.get("enabled_services", []))
out.append(result("missing" if absent else "complete", "enabled services",
f"not declared: {sorted(absent)}" if absent else "MCP service and API declared", GUIDE))
client = cfg.get("oauth_client", {})
agentic = client.get("agentic") is True
out.append(result("complete" if agentic else "missing", "agentic OAuth client",
"client is marked for an AI-powered agent" if agentic
else "set oauth_client.agentic to true after ticking the console option", AGENT_CLIENT))
kind = client.get("application_type")
out.append(result("complete" if kind == "web_application" else "missing", "client type",
f"expected web_application, found {kind!r}", GUIDE))
uris = client.get("redirect_uris", [])
out.append(result("complete" if uris else "missing", "redirect URIs",
f"{len(uris)} declared", GUIDE))
scopes = set(cfg.get("scopes", []))
for scope in sorted(REQUIRED_SCOPES):
found = scope in scopes
out.append(result("complete" if found else "missing", "scope",
f"{'declared' if found else 'required scope absent'}: {scope}", GUIDE))
for scope in sorted(scopes & LISTED_SCOPES):
out.append(result("note", "scope", f"{scope} is listed for the Drive server and allows "
"changes to files the app opens or creates", DRIVE_SCOPES))
for scope in sorted(scopes - REQUIRED_SCOPES - LISTED_SCOPES):
out.append(result("excessive", "scope", f"not needed for a read-only Drive review: {scope}",
DRIVE_SCOPES))
return out
Scopes are sorted by group. The read scope must be present and drive.file raises a note; any scope outside those two is excessive.
python -c "import checker, json; print(len(checker.review(json.load(open('configs/complete.json')))))" prints 6.
Stage 05 · test15 minutes
Add verdicts and run every case
Summarise each configuration in review.json and confirm the four outcomes.
Add the verdict and the entry point to the end of checker.py. Excessive permissions outrank missing declarations in the verdict, because an over-broad grant is the riskier mistake to approve.
def verdict(results: list) -> str:
statuses = {r["status"] for r in results}
if "excessive" in statuses:
return "excessive permissions"
if "missing" in statuses:
return "missing declarations"
return "complete settings"
def main(paths: list) -> int:
worst, saved = 0, []
for name in paths:
cfg = json.loads(Path(name).read_text(encoding="utf-8"))
results = review(cfg)
print(f"== {name}: {verdict(results)} [{LABEL}]")
for r in results:
print(f" {r['status'].upper():9} {r['check']}: {r['detail']}")
print(f" see {r['link']}")
if verdict(results) != "complete settings":
worst = 1
saved.append({"file": name, "verdict": verdict(results), "label": LABEL, "results": results})
Path("review.json").write_text(json.dumps(saved, indent=2) + "\n", encoding="utf-8")
print(f"wrote review.json for {len(saved)} configuration(s)")
return worst
if __name__ == "__main__":
sys.exit(main(sys.argv[1:] or sorted(str(p) for p in Path("configs").glob("*.json"))))
python checker.py configs/complete.json configs/missing.json configs/excessive.json configs/readwrite.json== configs/complete.json: complete settings [configuration review, awaiting live access test] COMPLETE server URL: expected https://drivemcp.googleapis.com/mcp/v1, found 'https://drivemcp.googleapis.com/mcp/v1' ... == configs/missing.json: missing declarations [configuration review, awaiting live access test] MISSING enabled services: not declared: ['drivemcp.googleapis.com'] MISSING agentic OAuth client: set oauth_client.agentic to true after ticking the console option ... == configs/excessive.json: excessive permissions [configuration review, awaiting live access test] EXCESSIVE scope: not needed for a read-only Drive review: https://www.googleapis.com/auth/drive EXCESSIVE scope: not needed for a read-only Drive review: https://www.googleapis.com/auth/gmail.modify == configs/readwrite.json: complete settings [configuration review, awaiting live access test] NOTE scope: https://www.googleapis.com/auth/drive.file is listed for the Drive server ... wrote review.json for 4 configuration(s)
The script exits with status 1 when any file is missing declarations or asks for too much. Run complete.json on its own to see a clean exit.
python checker.py configs/complete.json; echo "exit $?"python checker.py configs\complete.json; "exit $LASTEXITCODE"The four verdict lines read complete, missing, excessive and complete, and the single-file run ends with exit 0.
Stage 06 · ship10 minutes
Check the labels and hand off
Prove every saved result is marked as awaiting a live test and record what that test needs.
python checker.py configs/complete.json configs/missing.json configs/excessive.json configs/readwrite.json
python -c "import json; r = json.load(open('review.json')); print(all(x['label'] == 'configuration review, awaiting live access test' for c in r for x in c['results']))"True
A passing review says only that the declared settings match the documentation. Whether the client signs in and whether its scopes reach the files you need are questions for a live test in a real project.
Keep review.json with the proposal it describes. When someone runs the live test, they can mark each check confirmed or failed against the same file.
The label check prints True and review.json holds four entries. Each entry lists the page to read for every failed check.
Troubleshooting
json.decoder.JSONDecodeError on one of the configs.
The message names a line and column. Look there for a trailing comma or a missing quote, then rerun python -m json.tool on that file.
A complete config is reported as missing the server URL.
Compare the URL character by character with https://drivemcp.googleapis.com/mcp/v1. A trailing slash or the /mcp/v1self fallback path counts as a mismatch in this checker.
PowerShell refuses to run Activate.ps1.
Run Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser, as the Python venv documentation suggests, then activate again.
ModuleNotFoundError: No module named 'checker' in the checkpoint command.
Run the command from the workspace-checklist folder, where checker.py sits.
Google's setup page shows different scopes from this guide.
The page is the authority. Update REQUIRED_SCOPES and LISTED_SCOPES in checker.py to match it, and note the date you read it in review.json or your proposal.
Done when
- The checker distinguishes complete settings from missing declarations and excessive permissions. Its output labels every result as a configuration review awaiting a live access test.
Going further
- Add the Docs, Sheets and Slides servers, which the setup guide says also need the Drive scopes.
- Accept the output of
gcloud services listas an input so the enabled-services check reads a real project instead of a declared list. - Write a Markdown summary from
review.jsonfor a reviewer who does not read JSON. - Add a check that flags an OAuth client shared between agent and non-agent features, which Google recommends keeping separate.
References
An AI guide writer drafted this walkthrough against the official documentation above, automated template and style checks validated every block, and an independent AI reviewer verified commands, flags and claims before publication.
