Skip to main content
Glama
n21jindal-maker

MCP Google Workspace Server

MCP Google Workspace Server

A generic Model Context Protocol (MCP) server that enables AI agents to interact with Gmail and Google Docs through well-defined MCP tools.

The primary goal of this project is to provide a reusable integration layer so that any MCP-compatible AI agent can perform email and Google Docs operations without implementing Gmail or Google Docs APIs themselves.

Features

The server currently supports the following capabilities exposed as MCP tools:

Gmail

  • gmail_draft_email: Draft an email in the authenticated user's Gmail account.

  • gmail_send_email: Send an email directly using the authenticated user's Gmail account.

Google Docs

  • google_docs_append: Append text content to the end of an existing Google Doc.

Related MCP server: Google Workspace MCP Server

Prerequisites

  • Node.js (v18 or higher recommended)

  • Google Cloud Platform account

  • Gmail API and Google Docs API enabled in your GCP project

  • OAuth 2.0 Client credentials (Desktop application type)

Installation

  1. Clone the repository:

    git clone https://github.com/n21jindal-maker/MCP-Server.git
    cd MCP-Server
  2. Install dependencies:

    npm install
  3. Build the project:

    npm run build

Configuration & Authentication

The server uses Google OAuth 2.0 for authentication. You need to set up your credentials before running the server.

  1. Obtain your OAuth 2.0 Client ID and Secret from the Google Cloud Console.

  2. Save your credentials as Credentials.json in the root directory, or configure the environment variables as shown in .env.example.

  3. Generate the OAuth token:

    npx tsx generate-token.ts

    Follow the prompts to authorize the application. This will generate a token.json file.

Running the Server

Start the server using:

npm start

Or for development (with automatic TypeScript compilation):

npm run dev

Using with an MCP Client

Configure your MCP client to start this server. The server communicates over stdio.

Example configuration for Claude Desktop or similar MCP clients:

{
  "mcpServers": {
    "google-workspace": {
      "command": "node",
      "args": ["/absolute/path/to/MCP-Server/dist/index.js"]
    }
  }
}

Available Tools

gmail_draft_email

Drafts an email but does not send it.

  • Parameters:

    • to (string[]): One or more recipient email addresses.

    • subject (string): Email subject.

    • body (string): Email body.

gmail_send_email

Sends an email immediately.

  • Parameters:

    • to (string[]): One or more recipient email addresses.

    • subject (string): Email subject.

    • body (string): Email body.

google_docs_append

Appends content to a Google Doc.

  • Parameters:

    • documentId (string): The ID of the Google Doc (found in the URL).

    • content (string): Text content to append.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/n21jindal-maker/MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server