Table of contents

Thousands of companies trust Merge to accelerate AI from PoC to production.
Get a demo

How to connect to the Google Drive MCP with Claude Code (4 steps)

Jon Gitlin
Senior Content Marketing Manager
at Merge

Developers store a surprising amount of the context they need to write good code in Google Drive: API specs, architecture diagrams, onboarding docs, sprint briefs, product requirements, etc. 

To help your developers access this context within a terminal like Claude Code, you can connect the AI coding tool with the Google Drive MCP.

We’ll help you do just that via Merge Agent Handler's Google Drive MCP server.

How it works

Merge Agent Handler connects Claude Code to Google Drive through a single CLI setup. You install the Merge CLI, authenticate once, and register the connection with one command. Agent Handler handles OAuth token management and API calls to Google Drive on the backend. You don't manage Google OAuth tokens in your local environment or wire up Drive credentials into your codebase.

Here's the command that registers the connection:

merge setup claude-code

Related: How to use a Google Drive MCP in Cursor

Prerequisites

Before getting started, you'll need the following:

  • A Merge Agent Handler account
  • Claude Code installed (run claude --version to confirm)
  • pipx installed (run pipx --version to confirm, or install via pip install pipx)
  • A Google account with access to the Drive you want to connect

If you want to connect Merge Agent Handler's Google Drive MCP with internal or customer-facing agentic products, you can follow the steps in our docs.

1. Install the Merge CLI

Install with pipx: pipx install merge-api

How to add pipx install merge-api in Claude Code

Verify your installation: merge --version

2. Configure the CLI and log in

This links the CLI to your Merge account and authenticates your session: merge login

Once logged in, the CLI is ready to make authorized requests on your behalf.

3. Add Agent Handler to Claude Code

Run the following to register the Agent Handler MCP server with Claude Code:

merge setup claude-code

Or, if you prefer to register manually:

claude mcp add 
--transport http agent-handler https://ah-api.merge.dev/mcp

Verify it registered correctly. Open Claude Code and run: /mcp

agent-handler should appear under Local MCPs with a connected status.

Verifying the connection registered

Related: How to use the Notion MCP in Claude Code

4. Authenticate Google Drive

Open a Claude Code session and run a test query like: "Search my Google Drive for the API spec doc and summarize the authentication section."

The first time you invoke a Google Drive tool, a Magic Link will appear to complete connector authentication.

Authenticating to Google Drive

You should then see something like the following:

Screenshot of a Google Drive MCP use case in Claude Code

{{this-blog-only-cta}}

Google Drive MCP FAQ

In case you have any more questions on connecting and using the Google Drive MCP in Claude Code, we’ve addressed several more below.

What can you do once the Google Drive MCP is connected to Claude Code?

With Google Drive connected, Claude Code can:

  • Search and retrieve documents: pull up specs, READMEs, architecture docs, or any Drive file by name or content without leaving the terminal
  • Read file contents: have Claude summarize, extract, or reason over the contents of Docs, PDFs, and other files stored in Drive
  • List folder contents: browse project folders to find the right file when you're not sure of the exact name
  • Create and update files: write code output, summaries, or generated content directly to Drive (if write tools are enabled in your Tool Pack)
  • Cross-reference docs while coding: ground Claude's suggestions in your team's actual documentation rather than generic training data

This is particularly useful on teams where product requirements, API contracts, or architecture decisions live in Shared Drives. Instead of asking "what does this endpoint do?" and waiting for a teammate to respond, Claude Code can look it up in the source doc directly.

Why use Merge Agent Handler vs. a self-hosted MCP server?

You can self-host a Google Drive MCP server using community packages like @modelcontextprotocol/server-gdrive. That works, but it requires you to manage OAuth credentials locally, handle token refresh, and maintain the server yourself.

Merge Agent Handler takes a different approach: it's a managed MCP layer that adds enterprise-grade security controls, real-time observability, and multi-user support on top of the integration. 

You can scope exactly which files and folders each Registered User can access, monitor what your agents are reading and writing, and swap in other connectors (Slack, Jira, GitHub, and more) without touching your Claude Code configuration.

Why is it important to connect a Google Drive MCP to Claude Code?

Google Drive is where teams store the context that makes code meaningful: API specs, architecture decisions, product requirements, onboarding docs, sprint briefs.

That content exists in Drive but is invisible to Claude Code by default; your developers either context-switch to a browser to find it or paste it in manually.

Connecting Google Drive via MCP closes that gap.

Claude Code can search, read, and reference Drive files directly in the terminal, grounding its suggestions in your team's actual documentation rather than generic assumptions. Instead of asking a teammate what an endpoint does or what the agreed-upon data model is, Claude can look it up in the source doc and answer immediately. 

This translates to faster code reviews that reference the actual spec, onboarding that pulls real internal docs rather than hallucinated ones, and agent workflows that can read from Drive and write back without leaving the terminal.

Jon Gitlin
Senior Content Marketing Manager
@Merge

Jon Gitlin is the Managing Editor of Merge's blog. He has several years of experience in the integration and automation space; before Merge, he worked at Workato, an integration platform as a service (iPaaS) solution, where he also managed the company's blog. In his free time he loves to watch soccer matches, go on long runs in parks, and explore local restaurants.

Read more

Introducing the new Merge

Company

How to use SCIM for AI

AI

How to connect a Google Drive MCP to Cursor (4 steps)

AI

Subscribe to the Merge Blog

Get stories from Merge straight to your inbox

Subscribe

Connect your agents to thousands of tools in minutes

Use Merge Agent Handler’s 150+ connectors (including Google Drive) to power reliable, secure, and powerful agents.

Get started
But Merge isn’t just a Unified 
API product. Merge is an integration platform to also manage customer integrations.  gradient text
But Merge isn’t just a Unified 
API product. Merge is an integration platform to also manage customer integrations.  gradient text
But Merge isn’t just a Unified 
API product. Merge is an integration platform to also manage customer integrations.  gradient text
But Merge isn’t just a Unified 
API product. Merge is an integration platform to also manage customer integrations.  gradient text