跳到正文
DEV Community· Dhrubojyoti Gangopadhyay·· 41 分鐘前精選AI 評分78

Google Workspace 將自 2027 年 2 月 1 日限制 AI Agent 直接呼叫 REST API 的配額

Your agent uses Gmail REST APIs. Google just put it on a timer.

AI 導讀

Google Workspace 規定 AI Agent 自 2027 年 2 月 1 日起直接呼叫 REST API,將受 Standard Tier 配額限制;平台已為八款核心應用推出 GA MCP 伺服器及官方 gwscli。

推薦理由

文章把 OAuth 用戶端設定、Workspace 衍生資料的 30 日保留限制,以及 MCP 配額和計費規則整理成遷移清單,便於團隊核對改造範圍。

正文

Your agent uses Gmail REST APIs. Google just put it on a timer.

Most AI teams integrated Google Workspace the conventional way: create one OAuth 2.0 client ID, call Gmail/Drive/Calendar REST endpoints directly, and store message embeddings in a vector database for long-term agent memory.

On 24–25 November 2026, Google Workspace shipped General Availability for Workspace MCP servers across eight core apps, the official gwscli terminal client, standardized Standard vs. Scaled pricing tiers, and the new Workspace AI Tools Addendum. Together, they change auth, data retention, architecture, and unit economics for every agent touching Google Workspace.


Five rules that break conventional Workspace agents

1. Your legacy OAuth client is already permanently non-agentic

Starting 11 November 2026 (announced in the October 12 release notes), Google Workspace MCP servers reject requests from any OAuth 2.0 client that does not have "Use this client for an AI-powered agent" (is_agentic) enabled in Google Auth Platform > Clients.

Two sharp gotchas from configure-mcp-servers:

  • The flag is immutable after creation. Any OAuth client left unmarked past 12 November 2026 remains permanently non-agentic and can never call Workspace MCP servers.
  • You cannot share one client ID across human UI and agent workflows. Keep your legacy client for non-agent features and mint a separate agent-marked OAuth client ID for MCP or gwscli:
{
  "mcpServers": {
    "gmail": {
      "serverUrl": "https://gmailmcp.googleapis.com/mcp/v1",
      "oauth": {
        "clientId": "AGENT_OAUTH_CLIENT_ID",
        "clientSecret": "AGENT_OAUTH_CLIENT_SECRET"
      }
    },
    "drive": {
      "serverUrl": "https://drivemcp.googleapis.com/mcp/v1",
      "oauth": {
        "clientId": "AGENT_OAUTH_CLIENT_ID",
        "clientSecret": "AGENT_OAUTH_CLIENT_SECRET"
      }
    }
  }
}

2. Direct REST API calls from AI agents hit a hard quota ceiling on 1 Feb 2027

Clause 1 of the Workspace AI Tools Addendum requires any AI Agent, AI Harness, or AI-driven access tool to route through Google MCP servers (gmailmcp.googleapis.com/mcp/v1, drivemcp, docsmcp, sheetsmcp, slidesmcp, calendarmcp, chatmcp, tasksmcp) or gwscli:

"You may not obfuscate or otherwise allow any GWS Access Tool to avoid classification as a GWS Access Tool or to circumvent this requirement to use a Google MCP."

From 1 February 2027, AI agents calling Workspace REST APIs directly are throttled to Standard Tier quotas regardless of the project's billing tier. For terminal and sandboxed agents, Google also shipped gwscli (GA 24 Nov 2026):

# Install official Google Workspace CLI and agent skills
curl -fsSL https://dl.google.com/workspace-cli/install.sh | bash
gwscli skills install --dir ~/.agents/skills

Note Google's explicit stability warning in the gwscli docs: command signatures and JSON output schemas are discovered dynamically at runtime and may change without backward compatibility—do not hardcode fixed CLI flags in brittle scripts.

3. Vector embeddings and agent memory now carry a 30-day hard TTL

Clause 2 of the Addendum targets AI memory pipelines directly. It defines "Google Technical Information" as non-user metadata derived from interacting with Workspace access points—explicitly listing vector embeddings, memory indexes, user profiles, organizational graphs, and failure patterns—and prohibits:

  • Storing any Google Technical Information for more than 30 days (Clause 2(b)).
  • Retaining either user data or derived technical information after disconnection or access revocation (Clause 2(d)).
  • Using user data or derived technical information for model training, fine-tuning, evaluation dataset building, or model distillation (Clause 2(f)).

If your agent indexes Gmail threads or Drive docs into pgvector or Mem0 without automated 30-day TTL eviction and webhook-triggered purge on OAuth revocation, it is out of compliance on 1 February 2027.

4. Switching to Scaled Tier drops your free MCP allowance to $0

Look closely at Understand Google Workspace API and MCP server pricing and billing tiers (updated 24 Nov 2026):

Tier MCP Daily Free Allowance Billing Behavior (from 1 Apr 2027) Scope
Standard Tier 5,000 req/day per project per product (8 GA MCP servers) Always $0 (no billing account; ineligible for internal-use quota exceptions on MCP) Project default
Scaled Tier $0 / zero daily free allowance on Gmail, Calendar, Drive MCP Billed from first 2xx request (4xx errors excluded) Whole Cloud project

While REST APIs on the Scaled Tier keep massive daily no-charge thresholds (e.g., 70M/day Gmail Light, 10M/day Gmail Medium, 1M/day Gmail Premium), Scaled Tier MCP servers have no daily free allowance at all:

  • Light ($0.10 / 1K): get_file_metadata, get_file_permissions, list_labels
  • Medium ($0.20 / 1K): create_draft, label_message, create_file, copy_file
  • Plus ($0.25 / 1K): list_recent_files, search_files, all Calendar MCP tools
  • Premium ($0.50 / 1K): download_file_content, read_file_content, get_thread, search_threads

Critically, composite MCP tools count as multiple billing units because one tool invocation triggers multiple underlying API calls—and Scaled Tier applies to the entire Google Cloud project, not per API. Put experimental agent workloads in a separate Standard Tier project so enabling Scaled Tier for a REST backend doesn't silently bill your MCP calls from request #1.

5. Admin governance & Form Elicitation sit in Google's perimeter

In Workspace Admin Console (Security > API Controls), admins can now block or trust AI agents per OAuth Client ID, apply existing DLP and classification rules to every MCP tool response, inspect agent audit logs, and enforce MCP Form Elicitation confirmations before external writes. External agents are barred from permanent deletion altogether.


Practical migration checklist before 1 February 2027

  1. Split OAuth Client IDs: Create a dedicated is_agentic OAuth client (Use this client for an AI-powered agent) for MCP / gwscli; never mix human UI traffic and agent traffic on the same client ID.
  2. Isolate Cloud Projects by Tier: Keep dev and low-volume agent flows on free Standard Tier (5,000 req/day per product) separate from Scaled Tier production REST projects.
  3. Enforce 30-Day Memory Eviction: Tag every Workspace-derived embedding/memory chunk with source timestamp + user token hash, expire at <= 30 days, and wipe immediately on OAuth disconnect.

Honest limitation & primary sources

Honest limitation: I audited Google's official 24–25 November 2026 developer documentation, pricing tables, and Terms addendum directly; I have not run high-concurrency production load tests against gmailmcp.googleapis.com yet.

Primary sources:

Applied AI Series — Day 41 (Part 16).

來源:DEV Community · dev.to