Configure the Google Sheets MCP Server
Overview
Google operates an official hosted MCP server for Sheets at sheetsmcp.googleapis.com (currently in Developer Preview), exposing tools to read, create, and edit spreadsheets. Access is authorized through OAuth via a Google Cloud OAuth client you register yourself.
1. Configure Google Sheets
- 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 Sheets 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-sheets
description: "Google's official hosted Sheets MCP server for reading and editing spreadsheets."
url: https://sheetsmcp.googleapis.com/mcp/v1
transport_type: streamablehttp
authentication:
type: oauth
grant_type: authorization_code
scopes:
- https://www.googleapis.com/auth/spreadsheets.readonly
- https://www.googleapis.com/auth/spreadsheets
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 Sheets 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.