Google Workspace MCP Server

Google Workspace MCP Server

Enables sending and drafting emails via Gmail and appending content to Google Docs through the Model Context Protocol.

Category
Visit Server

README

Google Workspace MCP Server

A generic Model Context Protocol (MCP) Server that exposes Google Workspace capabilities to AI agents. Currently, it supports sending and drafting emails via Gmail and appending content to Google Docs.

Prerequisites

  1. Node.js (v18 or higher recommended)
  2. Google Cloud Project with the following APIs enabled:
    • Gmail API
    • Google Docs API

Setup Instructions

1. Configure Google Cloud OAuth

  1. Go to the Google Cloud Console.
  2. Create a new project or select an existing one.
  3. Navigate to APIs & Services > Library and enable Gmail API and Google Docs API.
  4. Navigate to APIs & Services > OAuth consent screen and configure it. Add your email address as a test user if the app is in "Testing" mode.
  5. Navigate to APIs & Services > Credentials.
  6. Click Create Credentials > OAuth client ID.
  7. Select Desktop app as the application type and create it.
  8. Download the client ID and client secret.

2. Configure Environment Variables

  1. Copy .env.example to .env:
    cp .env.example .env
    
  2. Update .env with your GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET.

3. Install Dependencies

npm install

4. Authenticate

Run the authentication script to generate and save your OAuth tokens locally:

npm run auth

Follow the prompt in your terminal. It will provide a URL for you to visit. Log in with your Google account, authorize the requested scopes, and copy the provided code back into the terminal.

This will generate a .credentials.json file in the root of the project. Keep this file secure and do not commit it to version control.

5. Build and Run Locally

To compile the TypeScript code:

npm run build

To run the MCP server (starts an Express server on port 3000 by default):

npm start

For development, you can use:

npm run dev

6. Deploy to Railway

  1. Push your repository to GitHub.
  2. Create a new project on Railway and deploy from your GitHub repo.
  3. In the Railway Variables dashboard, add the following variables:
    • GOOGLE_CLIENT_ID: Your Google OAuth Client ID.
    • GOOGLE_CLIENT_SECRET: Your Google OAuth Client Secret.
    • GOOGLE_OAUTH_CREDENTIALS: Copy the entire contents of your local .credentials.json and paste it here.
  4. Railway will automatically build and start the Express server.

Configuring an MCP Client

This server uses Server-Sent Events (SSE) over HTTP, meaning it is meant to be accessed via a URL rather than a local command.

If your AI client supports connecting to remote MCP servers via SSE (like some custom clients or extensions), point it to your Railway URL (or localhost if running locally):

SSE URL: https://your-app-name.up.railway.app/sse

If you are using a client that requires a local executable (like Claude Desktop), you will need a proxy or wrapper that bridges stdio to the remote SSE endpoints, as Claude Desktop currently natively spawns local processes via stdio.

Available Tools

  • send_email: Sends an email using the authenticated user's Gmail account.
  • draft_email: Creates a draft email in the authenticated user's Gmail account.
  • append_to_doc: Appends text to the end of an existing Google Document.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured