Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Provides read/write access to Google Sheets and Google Docs through MCP tools, enabling operations like reading sheets, appending rows, and editing documents.

README.md

Google Workspace MCP Server

An MCP (Model Context Protocol) server that provides read/write access to Google Sheets and Google Docs.

Available Tools

| Tool | Description | |------|-------------| | read_sheet | Read data from a Google Sheets spreadsheet | | read_doc | Read text content from a Google Doc | | list_sheets | List all sheets/tabs in a spreadsheet | | append_to_doc | Prepend content to a Google Doc | | append_to_sheet | Append rows to a spreadsheet | | update_sheet | Update a specific range in a spreadsheet |

Quick Start

1. Install from GitHub

npm install -g github:HarleyCoops/google-workspace-mcp

Or clone and build locally:

git clone https://github.com/HarleyCoops/google-workspace-mcp.git
cd google-workspace-mcp
npm install
npm run build

2. Set Up Google OAuth Credentials

  1. Go to Google Cloud Console
  2. Create a new project (or select existing)
  3. Enable these APIs:
  • Google Sheets API
  • Google Docs API
  • Google Drive API
  1. Create OAuth 2.0 credentials (Desktop app type)
  2. Download as credentials.json

3. Generate OAuth Token

pip install google-auth-oauthlib google-api-python-client
python regenerate_google_token.py

This creates token.json with your OAuth credentials.

4. Configure Your MCP Client

Set the GOOGLE_TOKEN_PATH environment variable to point to your token.json file.

---

MCP Configuration

Standard JSON Config (Claude Desktop, Cursor, VS Code, etc.)

{
  "mcpServers": {
    "google-workspace": {
      "command": "npx",
      "args": ["github:HarleyCoops/google-workspace-mcp"],
      "env": {
        "GOOGLE_TOKEN_PATH": "/path/to/your/token.json"
      }
    }
  }
}

If installed globally

{
  "mcpServers": {
    "google-workspace": {
      "command": "google-workspace-mcp",
      "env": {
        "GOOGLE_TOKEN_PATH": "/path/to/your/token.json"
      }
    }
  }
}

If cloned locally

{
  "mcpServers": {
    "google-workspace": {
      "command": "node",
      "args": ["/path/to/google-workspace-mcp/build/index.js"],
      "env": {
        "GOOGLE_TOKEN_PATH": "/path/to/your/token.json"
      }
    }
  }
}

---

Emergent.sh Setup

For Emergent.sh, you have two options:

Option A: Use as stdio MCP (if supported)

In Emergent's MCP configuration:

{
  "command": "npx",
  "args": ["github:HarleyCoops/google-workspace-mcp"],
  "env": {
    "GOOGLE_TOKEN_PATH": "/path/to/token.json"
  }
}

Option B: Self-host as HTTP endpoint

If Emergent requires an HTTP/SSE endpoint, you'll need to wrap this server. See the MCP HTTP Transport docs for details.

---

Environment Variables

| Variable | Description | Default | |----------|-------------|---------| | GOOGLE_TOKEN_PATH | Path to OAuth token.json | ./token.json | | DAILY_REPO_PATH | Base path for .env loading | C:\Users\chris\Daily |

---

Token Generation Script

Save this as regenerate_google_token.py:

from google_auth_oauthlib.flow import InstalledAppFlow

SCOPES = [
    'https://www.googleapis.com/auth/drive.readonly',
    'https://www.googleapis.com/auth/documents.readonly',
    'https://www.googleapis.com/auth/spreadsheets.readonly',
    'https://www.googleapis.com/auth/drive.file'
]

def main():
    flow = InstalledAppFlow.from_client_secrets_file('credentials.json', SCOPES)
    creds = flow.run_local_server(port=0)
    with open('token.json', 'w') as f:
        f.write(creds.to_json())
    print("Token saved to token.json")

if __name__ == '__main__':
    main()

---

Usage Examples

Reading a Sheet

Extract the spreadsheet ID from the URL: `` https://docs.google.com/spreadsheets/d/1Zlxn88pgMi0WAKFo.../edit ^^^^^^^^^^^^^^^^ This is the ID ``

Reading a Doc

Extract the document ID from the URL: `` https://docs.google.com/document/d/17p5DfXbyEYhsMy.../edit ^^^^^^^^^^^^^^^ This is the ID ``

---

Security Notes

  • Never commit credentials.json or token.json to version control
  • token.json contains refresh tokens that provide persistent access
  • Revoke access anytime at: https://myaccount.google.com/permissions

---

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Files & Docs servers.