[/blog]AI & Full-Stack7 min read

Google Workspace MCP for AI Agents: TypeScript Migration Guide Before February 2027

Google requires AI agents to use Workspace MCP servers instead of REST APIs from 1 February 2027. Practical TypeScript guide covering official remote endpoints, OAuth for agents, migration checklist, and how to connect or build complementary MCP clients with the official SDK.

By Mussawar Hayat

Why Google Workspace MCP Matters for TypeScript Agent Builders Right Now

On 24 November 2026 Google made its Workspace MCP servers and the official Workspace CLI generally available. Starting 1 February 2027, any tool that is or is driven by an AI agent, AI harness, or AI model must reach Gmail, Drive, Docs, Sheets, Slides, Calendar, Chat, and Tasks through those Google-hosted MCP servers or the CLI — not by calling the Workspace REST APIs directly.

Ordinary non-agent applications can continue using REST. Agents that keep calling REST will be limited to Standard Tier quotas regardless of the tier the project pays for, and the new Workspace AI Tools Addendum takes effect the same day. Scaled Tier billing for certain products begins 1 April 2027.

What You Will Learn

  • Exact deadlines and what changes on 1 February and 1 April 2027
  • How Google’s remote Workspace MCP servers work and which tools are public
  • Connecting a TypeScript agent or MCP client to gmailmcp.googleapis.com and the other endpoints
  • OAuth client configuration for agentic access and identity requirements
  • Migration checklist, security boundaries, and common pitfalls
  • When to build your own complementary MCP server versus using Google’s

1. What Google Announced and the Two Dates That Matter

Google shipped eight dedicated remote MCP servers (Gmail, Drive, Docs, Sheets, Slides, Calendar, Chat, Tasks) plus the Workspace CLI. Each product has an endpoint such as https://gmailmcp.googleapis.com/mcp/v1. The servers speak standard MCP over Streamable HTTP / JSON-RPC.

Key enforcement points from Google’s announcement and documentation:

  • 1 February 2027 — Technical enforcement begins. Agents must use MCP servers or the CLI. Direct REST calls from agents are capped at Standard Tier quotas. The Workspace AI Tools Addendum takes effect.
  • 1 April 2027 — Scaled Tier billing starts for Gmail, Calendar, Drive (and the MCP/CLI surfaces). Standard remains free within published limits.

Google states that more than 99% of active developers stay within Standard and pay nothing. The February date is the behaviour change; the April date is the billing change. Between them you can measure real usage.

The Addendum also prohibits certain scraping or long-term storage of derived Workspace data and requires agents to identify themselves. You may not obfuscate an agent to avoid the classification. Admins gain visibility and human-in-the-loop controls for sensitive actions.

Official sources: Google Workspace developer documentation on configuring MCP servers and the individual product MCP references (for example the Gmail MCP reference at developers.google.com).

2. Connecting a TypeScript MCP Client to Google’s Remote Servers

Use the official v2 client package. Remote Workspace servers require OAuth. Mark the OAuth client as being used for an AI-powered agent in the Google Cloud console so Google and Workspace admins can distinguish agent traffic.

npm install @modelcontextprotocol/client zod

Minimal client skeleton that lists tools (you still need a valid OAuth token for actual calls in production):

import { Client } from '@modelcontextprotocol/client';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/client/streamableHttp.js';

async function listGmailTools() {
  const client = new Client({ name: 'workspace-agent-client', version: '1.0.0' });
  const transport = new StreamableHTTPClientTransport(
    new URL('https://gmailmcp.googleapis.com/mcp/v1')
  );
  // Attach Authorization: Bearer  via transport options or headers
  // according to the current SDK transport API.
  await client.connect(transport);
  const { tools } = await client.listTools();
  console.error(tools.map(t => t.name));
  await client.close();
}

In real code, obtain the access token via the OAuth flow configured for agent use, refresh it, and pass it on every request. Enable the relevant MCP APIs (gmailmcp.googleapis.com, drivemcp.googleapis.com, etc.) in your Google Cloud project.

You can inspect the public tool catalog without a token using a simple POST of tools/list, which is useful for auditing what is available before writing handlers.

3. Migration Checklist for Existing TypeScript Agents

  1. Audit every Workspace REST call inside agent code, skills, prompts, and helper scripts. Search for gmail.googleapis.com, drive.googleapis.com, calendar.googleapis.com and similar.
  2. Split OAuth clients. Create or mark a dedicated client with the “Use this client for an AI-powered agent” flag. Keep non-agent features on a separate client.
  3. Map features to available MCP tools. Public Gmail tools cover search, threads, labels, drafts. Some write actions (send, reply, certain filter operations) may be partner-gated. Plan a degraded mode (draft instead of send) if needed.
  4. Point the agent at the MCP endpoints and measure usage against the Standard limits shown in the Workspace API usage dashboard.
  5. Test admin controls. If you sell to Workspace organisations, their admins can require human confirmation for sensitive actions. Handle pauses and elicitation gracefully.
  6. Review data retention. The Addendum limits how long derived Workspace data may be stored. Check embeddings, caches, and logs before the deadline.
  7. Update identity and logging. Agents must identify themselves. Log tool calls with user/agent id, latency, and success for audit.

For terminal-based agents (Claude Code, Codex-style, etc.) the Workspace CLI is an alternative path that brings the same tools into the local environment.

4. When to Build Your Own MCP Server Alongside Google’s

Google’s servers cover Workspace data. You still need your own MCP server for everything else: your Postgres database, internal APIs, Stripe, custom business logic, or private knowledge bases. The pattern that works is:

  • Use Google’s remote MCP servers for Gmail/Drive/Calendar etc.
  • Expose your domain tools via a small, Zod-validated MCP server built with @modelcontextprotocol/server (stdio for local agents, Streamable HTTP for remote).
  • Let the host (Claude Code, Cursor, your own agent runtime) connect to both.

See the earlier guide on building a production MCP server in TypeScript for the scaffolding, tool registration, and security patterns. Keep ownership checks and least privilege identical whether the tool talks to Google or to your database.

5. Security Considerations Specific to Workspace MCP

  • Agent identification — the OAuth client flag and proper scopes let admins see and control agent access the same way they control traditional apps.
  • Human-in-the-loop — sensitive actions (sending mail, sharing files) can require user confirmation. Design tool flows that can pause and resume.
  • Prompt injection — MCP does not magically protect against malicious content in emails or Drive files. Screen untrusted input before the model sees it; Google points to products such as Model Armor or equivalent layers.
  • Least privilege scopes — request only the scopes the tools actually need. Prefer read-only where possible.
  • No long-term hoarding — respect the Addendum retention rules for derived data.
  • Separate credentials — never reuse a user’s personal OAuth token for an autonomous agent without explicit consent and scoping.

6. Performance and Quota Notes

Standard tier for the generally available Workspace MCP servers is capped (Google documents roughly 5,000 requests per day per project per product). Return compact results. Prefer search + summary tools over dumping entire threads when the model only needs a decision. Cache non-sensitive metadata carefully and within retention limits. Monitor the usage dashboard so you know whether you need Scaled or an internal-project exemption before April.

7. Real Use Cases

  • Inbox triage agent — search threads, label, draft replies via Gmail MCP; human still sends.
  • Meeting scheduler — read Calendar availability, propose slots, create events under HITL confirmation.
  • Document research agent — search Drive and extract from Docs/Sheets MCP tools, then combine with your own knowledge-base MCP server.
  • Internal ops bot — Workspace MCP for company data + custom MCP server for ticketing and deploy status.

8. Common Mistakes

  • Leaving agent traffic on a non-agent OAuth client after the February deadline.
  • Assuming every Gmail write tool (send/reply) is public; verify the live catalog.
  • Ignoring admin HITL rules and letting the agent fail or loop when confirmation is required.
  • Storing full email bodies or embeddings beyond allowed retention.
  • Mixing agent and non-agent traffic on the same client so admins cannot distinguish them.
  • Treating the remote MCP endpoint as unauthenticated; production calls need proper OAuth.

9. FAQ

Do regular (non-agent) apps have to switch to MCP?

No. The requirement applies to tools that are or are driven by an AI agent, AI harness, or AI model. Traditional applications can keep using the REST APIs.

What happens if my agent still calls REST after 1 February 2027?

It is limited to Standard Tier quotas no matter which tier the project selected, and it violates the Workspace AI Tools Addendum. Google can also suspend access for repeated violations.

Is the Workspace CLI a full replacement for the MCP servers?

It is an alternative path aimed at terminal-based agents. It exposes the same governed tools. Choose MCP servers for remote/cloud agents and the CLI for local terminal agents.

Can I still build my own MCP server?

Yes. Google’s requirement is only for accessing Workspace data. Your own tools, databases, and APIs should still be exposed through your own MCP server when agents need them.

Where do I find the official tool lists?

Each product has an MCP reference on developers.google.com. The Gmail one lists tools available on /mcp/v1 and the self-mode endpoint. Always check the live catalog because availability can change during rollout.

10. Summary

The February 2027 Workspace MCP requirement is the clearest signal yet that major platforms will govern agent access through first-party MCP surfaces. For TypeScript teams the practical work is an audit of existing REST calls, a dedicated agent OAuth client, a switch to the official remote endpoints (or CLI), and measurement against quotas. Keep building your own MCP servers for everything outside Workspace, using the same least-privilege patterns.

Key Takeaway

Treat the 1 February 2027 date as a real migration deadline. Audit agent traffic, switch to Google’s MCP servers or CLI, and keep human confirmation and data-retention rules in mind. The protocol itself is straightforward; the operational and compliance layer is what matters.


Need help migrating agents or building production MCP integrations?

I design secure TypeScript agent backends, MCP servers, and Next.js integrations that stay within platform rules. Get in touch or explore full-stack and AI development services.

Related reading: Build a Production MCP Server in TypeScript and Treat AI Agents as Non-Human Identities.

Portrait of Mussawar Hayat

Written by

Mussawar Hayat

Next.js & Web3 Full-Stack Developer

I build production SaaS platforms, dashboards and smart-contract front ends with Next.js, TypeScript, PostgreSQL and Solidity, working remotely with teams in North America and Europe. The guides here come from problems I've solved on client and personal projects.