---
title: "Deploy Google Workspace MCP"
description: "Remote MCP server for Gmail, Calendar, Drive, Docs and Sheets, OAuth 2.1"
category: "AI/ML"
url: https://railway.com/deploy/google-workspace-mcp
---

# Deploy Google Workspace MCP

Remote MCP server for Gmail, Calendar, Drive, Docs and Sheets, OAuth 2.1

**[Deploy Google Workspace MCP on Railway](https://railway.com/template/google-workspace-mcp)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/google-workspace-mcp/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** AI/ML

## Template content

### Google Workspace MCP https://workspacemcp.com/apple-touch-icon.png

- **Source:** https://github.com/aalfath/google-workspace-mcp-railway-template
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host Google Workspace MCP on Railway

Google Workspace MCP is an open-source MCP (Model Context Protocol) server that lets AI assistants such as Claude, ChatGPT, Cursor or VS Code work with Gmail, Google Calendar, Drive, Docs, Sheets, Slides, Forms, Tasks, Contacts, Chat and Apps Script. It offers more than 100 tools, and every user signs in with their own Google account through OAuth 2.1.

## About Hosting Google Workspace MCP

This template runs the official Google Workspace MCP 2.6.0 image as one Railway service in remote mode: streamable HTTP at `https://YOUR-DOMAIN/mcp`, protected by OAuth 2.1. You bring a Google OAuth client (free in Google Cloud). The server acts as the OAuth proxy, so MCP clients register themselves, show a consent page and send the user to Google. Client registrations and the encrypted token store are kept on a Railway volume at `/data`, so logins survive restarts and redeploys. The signing key that protects issued tokens is generated at deploy time. A health check on `/health` gates each deploy. It idles at about 120–170 MB of RAM, so it fits Railway's 0.5 GB plans.

## Common Use Cases

* Let Claude (desktop, web or Claude Code) read, search and draft Gmail, and schedule Calendar events, from one hosted URL
* Give a team one shared MCP endpoint where each person signs in with their own Google Workspace account
* Let AI agents create and edit Google Docs, Sheets and Slides, and search Drive, without running anything locally

## Dependencies for Google Workspace MCP Hosting

* A Google Cloud project with an OAuth client ID and secret (type "Web application") and the Google APIs you want enabled
* An MCP client that supports remote servers with OAuth (Claude, Claude Code, ChatGPT connectors, Cursor, VS Code)

### Deployment Dependencies

* Google Workspace MCP source and docs: https://github.com/taylorwilsdon/google_workspace_mcp
* Release 2.6.0: https://github.com/taylorwilsdon/google_workspace_mcp/releases/tag/v2.6.0
* Deployment and environment variable reference: https://workspacemcp.com/docs/deployment
* Template repo (Dockerfile, start script, changelog): https://github.com/aalfath/google-workspace-mcp-railway-template

### Implementation Details

**Before you deploy:** in Google Cloud Console, open APIs &amp; Services. Enable the APIs you need (Gmail, Calendar, Drive, Docs, Sheets and so on), set up the OAuth consent screen (in "Testing" mode only the test users you list can sign in), and create Credentials, then an OAuth client ID of type **Web application**. Paste its client ID and secret into `GOOGLE_OAUTH_CLIENT_ID` and `GOOGLE_OAUTH_CLIENT_SECRET`.

**After deploy:** copy the service's Railway domain and add this as an **Authorized redirect URI** on the same Google OAuth client:

```
https://YOUR-DOMAIN/oauth2callback
```

**Connect a client.** Claude Code:

```
claude mcp add --transport http google-workspace https://YOUR-DOMAIN/mcp
```

In Claude (desktop or web), go to Settings, then Connectors, then Add custom connector, and enter `https://YOUR-DOMAIN/mcp`. Other clients take the same URL as a remote "streamable HTTP" MCP server. The first tool call opens a consent page and then Google's sign-in.

**Who can use it:** the MCP endpoint answers 401 until a user completes OAuth, and each user only reaches their own Google data. Limit who can sign in with the consent screen's test-user list, or by making it an Internal app in Google Workspace.

**Optional settings** (service variables): `WORKSPACE_MCP_TOOL_TIER` (`core`, `extended` or `complete`) or `WORKSPACE_MCP_TOOLS` (for example `gmail calendar drive`) to expose fewer tools, `WORKSPACE_MCP_READ_ONLY=true` for read-only scopes, `WORKSPACE_MCP_OAUTH_PROXY_REQUIRE_CONSENT=remember` to show the consent page only once per browser.

**Updates:** the service builds from the template repo, so Railway offers an update when the repo bumps the pinned image. Read the repo's CHANGELOG before you apply it.

## Why Deploy Google Workspace MCP on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Google Workspace MCP on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.



## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/google-workspace-mcp
