Connector guide7-minute read7 MCP tools7 languages

Connect Google Docs to Microsoft Copilot via MCP

Let your AI work with Google Docs: read a document as plain text or as headings and paragraphs with positions, create new documents, append or insert text and replace text everywhere, for example to fill a template. Personal Google accounts and Google Workspace.

HCBy HelpCode teamUpdated 7 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

Google Docs

Google Docs

Let your AI work with Google Docs: read a document as plain text or as headings and paragraphs with positions, create new documents, append or insert text and replace text everywhere, for example to fill a template. Personal Google accounts and Google Workspace.

tools

7

Region

INTL

Category

Productivity

Authentication

OAuth 2.0

Required env vars

GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRET
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Summary

Let your AI work with Google Docs: read a document as plain text or as headings and paragraphs with positions, create new documents, append or insert text and replace text everywhere, for example to fill a template. Personal Google accounts and Google Workspace.

Guided setup

Connect Google Docs to Microsoft Copilot in 2 minutes

Start a free trial on AnythingMCP Cloud, connect Google Docs in the guided setup, then add your MCP URL to Microsoft Copilot. No code and no server to run.

No credit card · 7-day trial · Self-host alternative available

Try asking

Example prompts for Google Docs

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

Google Docs · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Google Docs, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

Google Docs + Microsoft Copilot

Let your AI work with Google Docs: read a document as plain text or as headings and paragraphs with positions, create new documents, append or insert text and replace text everywhere, for example to fill a template. Personal Google accounts and Google Workspace.

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET

Step 1 — Get credentials

  1. Open console.cloud.google.com, pick or create a project, then go to APIs & Services → Library and enable the Google Docs API.
  2. Open APIs & Services → OAuth consent screen. Choose Internal if you are on Google Workspace (the simplest option), otherwise External. For External, set the publishing status to In production: while the app is in Testing, Google revokes its refresh tokens after 7 days and the connector stops working every week. For your own account you can click through the "unverified app" warning.
  3. Open APIs & Services → Credentials → Create credentials → OAuth client ID, choose the application type Web application and add the authorized redirect URI https://cloud.anythingmcp.com/api/mcp-oauth/callback. If you host AnythingMCP yourself, enter https://your-anythingmcp-host/api/mcp-oauth/callback instead.
  4. Paste the client ID into GOOGLE_CLIENT_ID and the client secret into GOOGLE_CLIENT_SECRET, then install the connector.
  5. On the connector page, click Authorize with Provider and sign in with the Google account whose documents the AI should use. The refresh token is stored encrypted and access tokens are renewed automatically.

One Google client for all Google connectors: the same Cloud project and OAuth client can serve every Google connector: Gmail, Google Calendar, Google Drive, Google Sheets, Google Docs, Google Tasks, Search Console, Analytics and Ads. Enable each API in that project, reuse the same client ID and secret, and authorize each connector once. Each one asks only for its own permissions.

Finding a document: paste the document's link into the chat; its id is the long string in https://docs.google.com/document/d/<id>/edit. To find documents by name, add the Google Drive connector as well. The connector reads a document's first tab; very long documents or documents with several tabs read better through the Google Drive connector. Replacing text everywhere is the reliable way to fill a template with placeholders such as [Customer name].

Permissions: the connector asks for https://www.googleapis.com/auth/documents: read and edit every document your account can open. It does not include Google Drive, so the connector cannot list, search, share or delete documents.

Read-only setup: change the scope in the connector's OAuth settings to https://www.googleapis.com/auth/documents.readonly, authorize again and disable gdocs_create_document, gdocs_append_text, gdocs_insert_text and gdocs_replace_all_text.

Switched off at install: gdocs_batch_update, which accepts any Docs API request, including deleting content. Turn it on only if the AI needs it.

Common errors: 401 means the authorization expired or was revoked (always after 7 days while the consent screen is in Testing): click Authorize with Provider again. 403 PERMISSION_DENIED means the account cannot open or edit that document, or the scope is read-only; 403 "Docs API has not been used in project" means the Google Docs API is not enabled in the Cloud project. 404 means the id is wrong or belongs to another file type, such as a Sheet or a Word file uploaded to Drive.

The connector does not handle comments and suggestions, does not share, move or delete documents (the Google Drive connector does that) and does not edit Word files stored in Drive.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in Microsoft Copilot

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

Microsoft Copilot uses MCP servers through agents built in Copilot Studio: you add AnythingMCP to an agent as a tool, then publish the agent to Microsoft 365 Copilot and Teams. Copilot Studio connects from Microsoft's cloud over Streamable HTTP, which AnythingMCP supports.

  1. In Copilot Studio, open your agent (or create one), go to Tools and choose Add a tool → New tool → Model Context Protocol.
  2. Enter a Server name (for example AnythingMCP), a Server description that says what the connector does, and the Server URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID. Copilot Studio uses the description to decide when to call the server.
  3. Under authentication, choose API key, set Type to Header and the header name to X-API-Key, then select Create.
  4. In Add tool, choose Create a new connection, paste an MCP API key from AnythingMCP (MCP Servers → your server → API keys) and select Add to agent.
  5. Try it in the agent's Test pane: ask for something that needs the Google Docs tools.
  6. Select Publish, then Channels → Microsoft 365 and Microsoft Teams, keep Make agent available in Microsoft Copilot selected and choose Add channel. See agent in Teams installs it for you; in Microsoft 365 Copilot, type @ and pick the agent.

Prefer per-user sign-in? Choose OAuth 2.0 → Dynamic discovery instead of an API key: each user then signs in to AnythingMCP the first time the agent calls it.

Self-hosting? Use your instance's public HTTPS address instead of https://cloud.anythingmcp.com. Copilot Studio connects from Microsoft's cloud, so localhost does not work.

Available tools

ToolWhat it does
gdocs_get_document_textRead a Google Doc as plain text: documentId, title, revisionId, endIndex and text, the body's paragraphs and table cells in order (images…
gdocs_get_document_structureRead a Google Doc as a list of blocks with their positions, for precise edits: each paragraph or table with startIndex, endIndex, type…
gdocs_create_documentCreate a new, empty Google Doc with a title, in the root of the user's My Drive
gdocs_append_textAppend text at the end of a document's body
gdocs_insert_textInsert text at a position in the body. index counts UTF-16 code units from 1 (the very start of the body) and must fall inside a paragraph…
gdocs_replace_all_textReplace every occurrence of a text in the document (all tabs, headers and footers included) with another text; an empty replace_with…
gdocs_batch_updateRun Docs API batchUpdate requests for edits the other tools do not cover: deleting ranges (deleteContentRange), styling text or paragraphs…

Example prompts

  • "Read these meeting notes and list every action item with its owner."
  • "Fill in the contract template: replace [Customer name] with Acme GmbH and [Start date] with 1 November 2026."
  • "Add a Next steps section at the end of the project brief."
  • "Create a new document called Onboarding checklist and write a first draft in it."

FAQ

Which Copilot is this for? Microsoft 365 Copilot at work, through agents built in Copilot Studio. The Microsoft Copilot app for personal accounts has no option to add your own MCP server.

What do I need? A work account with access to Copilot Studio (a license or a trial) to build the agent. People who use it in Microsoft 365 Copilot or Teams need access to the agent: share it with them, or ask an admin to publish it to the organization. If your organization applies data policies to Power Platform connectors, they cover MCP servers too.

The agent doesn't call the tools. Check that the header name is exactly X-API-Key and that the key belongs to the same MCP server as the URL, and make the server description specific: Copilot Studio uses it to decide when to call the server. Publish the agent again after each change; in an open chat, type "start over" to get the new version.

Next steps

Was this guide helpful?

Connect Google Docs to Microsoft Copilot in 2 minutes

Start a free trial on AnythingMCP Cloud, connect Google Docs in the guided setup, then add your MCP URL to Microsoft Copilot. No code and no server to run.

Related guides

Connectors

Connect Google Docs to ChatGPT via MCP

Let your AI work with Google Docs: read a document as plain text or as headings and paragraphs with positions, create new documents, append or insert text and replace text everywhere, for example to fill a template. Personal Google accounts and Google Workspace.

Connectors

Connect Google Docs to Claude via MCP

Let your AI work with Google Docs: read a document as plain text or as headings and paragraphs with positions, create new documents, append or insert text and replace text everywhere, for example to fill a template. Personal Google accounts and Google Workspace.

Connectors

Connect Google Docs to Cursor via MCP

Let your AI work with Google Docs: read a document as plain text or as headings and paragraphs with positions, create new documents, append or insert text and replace text everywhere, for example to fill a template. Personal Google accounts and Google Workspace.

Connectors

Connect Google Docs to Gemini CLI via MCP

Let your AI work with Google Docs: read a document as plain text or as headings and paragraphs with positions, create new documents, append or insert text and replace text everywhere, for example to fill a template. Personal Google accounts and Google Workspace.

Connectors

Connect Google Docs to Meta Muse via MCP

Let your AI work with Google Docs: read a document as plain text or as headings and paragraphs with positions, create new documents, append or insert text and replace text everywhere, for example to fill a template. Personal Google accounts and Google Workspace.

Connectors

Google Docs MCP Server: Read, Create and Edit Documents

Let your AI work with Google Docs: read a document as plain text or as headings and paragraphs with positions, create new documents, append or insert text and replace text everywhere, for example to fill a template. Personal Google accounts and Google Workspace.