Configure the Google Docs MCP Server
Overview
Google operates an official hosted MCP server for Docs at docsmcp.googleapis.com (currently in Developer Preview), exposing tools to read, create, and edit documents. Access is authorized through OAuth via a Google Cloud OAuth client you register yourself.
1. Configure Google Docs
- Go to console.cloud.google.com and use the project picker near the top of the page to create a new project (or select an existing one). Then, with that project selected, open APIs & Services from the left navigation, click + Enable APIs and services, search for “MCP”, and enable the Docs MCP API.
2. Add the MCP server to your gateway config
In the mcp_servers section of your gateway configuration add the following entry:
- name: google-docs
description: "Google's official hosted Docs MCP server for reading and editing documents."
url: https://docsmcp.googleapis.com/mcp/v1
transport_type: streamablehttp
authentication:
type: oauth
grant_type: authorization_code
scopes:
- https://www.googleapis.com/auth/documents.readonly
- https://www.googleapis.com/auth/documents
client_id: "<CLIENT_ID>"
client_secret: "<CLIENT_SECRET>"
authorization_url: "https://accounts.google.com/o/oauth2/v2/auth"
token_url: "https://oauth2.googleapis.com/token"
redirect_uri: "<CALLBACK_URL>"
Replace the placeholder values:
<CLIENT_ID>and<CLIENT_SECRET>— come from the OAuth client you created when configuring Google Workspace MCP Servers.<CALLBACK_URL>— the same OAuth callback URL you set there, found in the Configuration section for your gateway in the Dtwo UI.
3. Deploy and verify
Save the configuration and deploy the gateway.
Then, in your AI client, ask it to authorize Google Docs via the gateway. This opens the Google login screen — sign in as the user whose permissions the agent should inherit, and approve the consent prompt. Once authorized, confirm the server’s tools appear and run a quick call to make sure the connection works.
Having trouble? Email support@dtwo.ai.