Connect your AI Agents to Google Docs in minutes

Merge lets you securely connect your agents to Google Docs and thousands of tools instantly

Available tools

insert_image

Insert an inline image at a specific location

create_named_range

Create a named range (bookmark) in a document

delete_named_range

Delete a named range from a document

create_header

Create a header section at a section break in a document

delete_header

Delete a header section from a document

create_footer

Create a footer section at a section break in a document

delete_footer

Delete a footer section from a document

create_document

Create a new Google Docs document with optional title

get_document

Retrieve a Google Docs document by ID

get_document_end_index

Get the end index for appending content to a document

insert_image_in_table_cell

Insert an image into a table cell by table position

insert_text_in_table_cell

Insert text into a table cell by table position

create_and_populate_table

Create and populate a table with data in one operation

batch_update_document

Apply multiple updates to a document in a single operation

insert_text

Insert text at a specific location in a document

delete_text

Delete text from a specified range in a document

replace_text

Find and replace all occurrences of text in a document

format_text

Apply text formatting to a range in a document

format_paragraph

Apply paragraph formatting to a range in a document

append_text

Append text to the end of a document

list_tabs

List all tabs in a Google Docs document, including tab IDs and titles

create_tab

Create a new tab in a Google Docs document

delete_tab

Delete a tab from a Google Docs document by tab ID. Use list_tabs to find tab IDs

update_tab_properties

Update a tab's properties (e.g. rename it) in a Google Docs document

insert_table

Insert a table with specified rows and columns

insert_table_row

Insert a new row into an existing table

insert_table_column

Insert a new column into an existing table

delete_table_row

Delete a row from an existing table

delete_table_column

Delete a column from an existing table

validate_credential

Validate Google Docs credentials. Verifies credentials during setup.

View all tools by creating a free accountSee more tools

How to set up Merge Agent Handler

In an mcp.json file, add the configuration below, and restart Cursor.

Learn more in the official documentation ↗

1{
2  "mcpServers": {
3    "agent-handler": {
4      "url": "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
5      "headers": {
6        "Authorization": "Bearer yMt*****"
7      }
8    }
9  }
10}
11
Copy Code

Open your Claude Desktop configuration file and add the server configuration below. You'll also need to restart the application for the changes to take effect.

Make sure Claude is using the Node v20+.

Learn more in the official documentation ↗

1{
2  "mcpServers": {
3    "agent-handler": {
4      "command": "npx",
5      "args": [
6        "-y",
7        "mcp-remote@latest",
8        "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
9        "--header",
10        "Authorization: Bearer ${AUTH_TOKEN}"
11      ],
12      "env": {
13        "AUTH_TOKEN": "yMt*****"
14      }
15    }
16  }
17}
Copy Code
Copied!

Open your Windsurf MCP configuration file and add the server configuration below.
Click on the refresh button in the top right of the Manage MCP server page or in the top right of the chat box in the box icon.

Learn more in the official documentation ↗

1{
2    "mcpServers": {
3      "agent-handler": {
4        "command": "npx",
5        "args": [
6          "-y",
7          "mcp-remote@latest",
8          "https://ah-api.merge.dev/api/v1/tool-packs/<tool-pack-id>/registered-users/<registered-user-id>/mcp",
9          "--header",
10          "Authorization: Bearer ${AUTH_TOKEN}"
11        ],
12        "env": {
13          "AUTH_TOKEN": "<ah-production-access-key>"
14        }
15      }
16    }
17  }
Copy Code

In Command Palette (Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows), run "MCP: Open User Configuration".

You can then add the configuration below and press "start" right under servers. Enter the auth token when prompted.

Learn more in the official documentation ↗

1{
2  "inputs": [
3    {
4      "type": "promptString",
5      "id": "agent-handler-auth",
6      "description": "Agent Handler AUTH_TOKEN", // "yMt*****" when prompt
7      "password": true
8    }
9  ],
10  "servers": {
11    "agent-handler": {
12      "type": "stdio",
13      "command": "npx",
14      "args": [
15        "-y",
16        "mcp-remote@latest",
17        "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
18        "--header",
19        "Authorization: Bearer ${input:agent-handler-auth}"
20      ]
21    }
22  }
23}
Copy Code

FAQs on using Merge's Google Docs  MCP server

FAQs on using Merge's Google Docs  MCP server

What is a Google Docs MCP?

It's an MCP server that connects your agents to Google Docs via tools. Your agents can invoke these tools to create documents, insert and format text, manage tables, add headers and footers, and more.

Google doesn't offer a standalone MCP server purpose built for Google Docs, but you can use one from a third-party platform, like Merge Agent Handler.

How can I use the Google Docs MCP server?

The use cases naturally depend on the agent you've built, but here are a few common ones:

  • Automated report generation: When a data pipeline finishes processing, an agent calls <code class="blog_inline-code">create_document</code> and uses <code class="blog_inline-code">append_text</code> and <code class="blog_inline-code">create_and_populate_table</code> to generate a formatted report with section headers and data tables, ready to share without anyone touching a doc manually
  • Contract population from CRM data: When a deal closes in Salesforce, an agent calls <code class="blog_inline-code">replace_text</code> to fill in placeholders in a template document with the customer name, contract terms, and start date, producing a draft ready for review in seconds
  • Meeting notes structuring: After a call transcript is available, an agent calls <code class="blog_inline-code">insert_text</code> and <code class="blog_inline-code">format_paragraph</code> to organize raw content into a clean Google Doc with section headings, a summary, and a clearly formatted action item list
  • Running project log updates: When a Jira ticket is resolved, an agent calls <code class="blog_inline-code">append_text</code> to add a formatted entry to a shared project log document, keeping a persistent record without requiring anyone to manually update the doc after each change

What are popular tools for Google Docs' MCP server?

Here are some of the most commonly used tools:

  • <code class="blog_inline-code">create_document</code> creates a new Google Doc with a specified title. Use this when an agent needs to generate a fresh document in response to a trigger, like a new project kickoff or a completed data run
  • <code class="blog_inline-code">append_text</code> adds text to the end of an existing document. Good for agents that maintain a running log or need to accumulate entries over time without overwriting previous content
  • <code class="blog_inline-code">insert_text</code> places text at a specific position in the document body. Call this when an agent needs to inject content at a precise location rather than at the end of the document
  • <code class="blog_inline-code">replace_text</code> finds all instances of a string in the document and swaps them with a new value. Useful for agents that fill in template documents with data pulled from an external system at generation time
  • <code class="blog_inline-code">format_text</code> applies character-level formatting such as bold, italic, font size, or color to a specified text range. Helpful when an agent needs to produce a consistently styled document rather than plain unformatted output
  • <code class="blog_inline-code">create_and_populate_table</code> inserts a new table into the document and fills it with provided row and column data in one call. Use this when an agent needs to embed structured data, like a summary table or comparison grid, directly in a document

What makes Merge Agent Handler's Google Docs MCP server better than alternative Google Docs MCP servers?

A few things distinguish Merge Agent Handler's Google Docs MCP server from building your own or relying on a standalone option:

  • Enterprise-grade security and DLP: Merge Agent Handler includes built-in data loss prevention controls that let you block or redact sensitive fields before they reach an agent. For Google Docs, this means you can prevent document body content, named ranges, and personally identifiable text from being read or written by an agent even when it has broad access to your Drive
  • Managed authentication and credentials: Merge stores and refreshes Google Docs OAuth credentials on your behalf. You never expose tokens to an agent or manage the complexity of Google's token refresh cycles manually
  • Real-time observability and audit trail: Every tool call made against Google Docs is logged with timestamp, tool name, input parameters, and response metadata. You can audit exactly what text an agent inserted, replaced, or formatted without adding any instrumentation to your own stack
  • Tool Packs and controlled access: Tool Packs let you bundle specific Google Docs tools with tools from other connectors into a single MCP endpoint, scoped to a specific use case. An agent gets exactly the tools it needs, nothing more

How can I start using Merge Agent Handler's Google Docs MCP server?

You can take the following steps:

1. Create or log into your Merge Agent Handler account and navigate to Tool Packs (collections of connector tools scoped to a specific use case).

2. Create a new Tool Pack, then find and enable the Google Docs connector. Choose which tools to include: enable read tools like <code class="blog_inline-code">get_document</code> for retrieval use cases, or add write tools like <code class="blog_inline-code">create_document</code> and <code class="blog_inline-code">append_text</code> if your agent needs to generate or modify documents.

3. Add a Registered User inside the Tool Pack. This is the identity context under which your agent operates. Merge generates a unique MCP URL scoped to this user once it's created.

4. From the Registered User detail page, authenticate Google Docs by completing the OAuth flow. Merge stores and manages the credentials going forward.

5. Copy the MCP URL from the Tool Pack detail page and generate an API key from Settings. You'll need both to connect your agent.

6. Add the MCP server to your agent or IDE using the MCP URL and API key. Your Google Docs tools are now accessible through that endpoint.

Explore other MCP servers built and managed by Merge

activecampaign
ActiveCampaign
ahrefs
Ahrefs
airtable
Airtable
amadeus
Amadeus
amazon_s3
Amazon S3
amplitude
Amplitude
anaplan
Anaplan
apollo
Apollo
arize
Arize
articulate
Articulate Reach 360
asana
Asana
attio
Attio
aviationstack
Aviationstack
bamboohr
BambooHR
basecamp
Basecamp
biorxiv
bioRxiv
bitbucket
Bitbucket
bitly
Bitly
box
Box
calendly
Calendly
canva
Canva
clickup
ClickUp
clinicaltrials
ClinicalTrials.gov
cloudflare
Cloudflare

Ready to try it out?

Whether you're an engineer experimenting with agents or a product manager looking to add tools, you can get started for free now