Oleafly is a live collaborative LaTeX, Typst and Markdown editor for research that offers a local MCP server and an oleafly mcp stdio command so outside AI clients can use its project tools.

MCP Google Workspace Server
A Model Context Protocol server that provides tools to interact with Gmail and Google Calendar, with support for multiple Google accounts.
WHAT IT DOES
- •Searches and reads Gmail emails using Gmail query syntax, with bulk retrieval and attachment handling.
- •Creates and manages Gmail drafts, replies to emails, and archives messages individually or in bulk.
- •Lists calendars and events, creates events with attendees and timezone handling, and deletes events.
- •Lets users configure and switch between multiple Google accounts with custom metadata and descriptions.
BEST FOR
- •AI assistants that need to search, summarize, and draft replies to email.
- •Planning meetings and checking agendas across multiple calendars.
- •Managing multiple Google accounts, such as personal and work, from one assistant.
ABOUT MCP-GOOGLE-WORKSPACE
MCP Google Workspace Server is cataloged as an MCP server attributed to j3k0. A Model Context Protocol server that provides tools to interact with Gmail and Google Calendar, with support for multiple Google accounts. It is categorized under productivity work. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
HOW TO INSTALL
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
LICENSE
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
能力检查器
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
Tools (0)
暂无可展示的已审核记录。这不表示上游不支持此能力。
Resources (0)
暂无可展示的已审核记录。这不表示上游不支持此能力。
Prompts (0)
暂无可展示的已审核记录。这不表示上游不支持此能力。
Newsletter subscriptions are not open yet
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Community Reviews
Reviews for MCP Google Workspace Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
FREQUENTLY ASKED QUESTIONS
Can the server send emails, or only create drafts?
Sending is disabled by default; the gmail_send tool only sends when GMAIL_ALLOW_SENDING is set to true, and draft creation tools are likewise disabled unless GMAIL_ALLOW_DRAFTS is enabled.
How are downloaded email attachments stored?
Attachments are written relative to a configurable base directory, with absolute paths, traversal, and escaping symlinks rejected; the default is ~/.mcp-gsuite/attachments.
上游原版 README
README.md · 0f6b8692ad21 · 采集于 2026-11-13 09:46:30 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
MCP Google Workspace Server
A Model Context Protocol server for Google Workspace services. This server provides tools to interact with Gmail and Google Calendar through the MCP protocol.
Features
-
Multiple Google Account Support
- Use and switch between multiple Google accounts
- Each account can have custom metadata and descriptions
-
Gmail Integration
- Query emails with advanced search
- Read full email content and attachments
- Create and manage drafts
- Reply to emails
- Archive emails
- Handle attachments
- Bulk operations support
-
Calendar Integration
- List available calendars
- View calendar events
- Create new events
- Delete events
- Support for multiple calendars
- Custom timezone support
Example Prompts
Try these example prompts with your AI assistant:
Gmail
- "Retrieve my latest unread messages"
- "Search my emails from the Scrum Master"
- "Retrieve all emails from accounting"
- "Take the email about ABC and summarize it"
- "Write a nice response to Alice's last email and upload a draft"
- "Reply to Bob's email with a Thank you note. Store it as draft"
Calendar
- "What do I have on my agenda tomorrow?"
- "Check my private account's Family agenda for next week"
- "I need to plan an event with Tim for 2hrs next week. Suggest some time slots"
Prerequisites
- Node.js >= 20
- A Google Cloud project with Gmail and Calendar APIs enabled
- OAuth 2.0 credentials for Google APIs
Installation
-
Clone the repository:
git clone https://github.com/j3k0/mcp-google-workspace.git cd mcp-google-workspace -
Install dependencies:
npm install -
Build the TypeScript code:
npm run build
Configuration
OAuth 2.0 Setup
Google Workspace (G Suite) APIs require OAuth2 authorization. Follow these steps to set up authentication:
-
Create OAuth2 Credentials:
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Enable the Gmail API and Google Calendar API for your project
- Go to "Credentials" → "Create Credentials" → "OAuth client ID"
- Select "Desktop app" or "Web application" as the application type
- Configure the OAuth consent screen with required information
- Add authorized redirect URIs (include
http://localhost:4100/codefor local development)
-
Required OAuth2 Scopes:
[ "openid", "https://mail.google.com/", "https://www.googleapis.com/auth/gmail.settings.basic", "https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/userinfo.email" ] -
Create a
.gauth.jsonfile in the project root with your Google OAuth 2.0 credentials:{ "installed": { "client_id": "your_client_id", "project_id": "your_project_id", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_secret": "your_client_secret", "redirect_uris": ["http://localhost:4100/code"] } } -
Create a
.accounts.jsonfile to specify which Google accounts can use the server:{ "accounts": [ { "email": "your.email@gmail.com", "account_type": "personal", "extra_info": "Primary account with Family Calendar" } ] }You can specify multiple accounts. Make sure they have access in your Google Auth app. The
extra_infofield is especially useful as you can add information here that you want to tell the AI about the account (e.g., whether it has a specific calendar).
Authenticate
Once .gauth.json and .accounts.json are configured, authenticate your accounts:
npm run authenticate
This opens a browser for each configured account to complete the OAuth consent flow. The script waits up to 5 minutes per account for the callback.
# Authenticate a specific account
npm run authenticate -- user@gmail.com
# Force re-authentication (e.g. after OAuth scope changes)
npm run authenticate -- user@gmail.com --force
# Custom config paths (same flags as the server)
npm run authenticate -- --gauth-file /path/to/.gauth.json --accounts-file /path/to/.accounts.json
If installed via npm, you can also run:
npx mcp-gmail-authenticate
Claude Desktop Configuration
Configure Claude Desktop to use the mcp-google-workspace server:
On MacOS: Edit ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: Edit %APPDATA%/Claude/claude_desktop_config.json
Development/Unpublished Servers Configuration
{
"mcpServers": {
"mcp-google-workspace": {
"command": "<dir_to>/mcp-google-workspace/launch"
}
}
}
Published Servers Configuration
{
"mcpServers": {
"mcp-google-workspace": {
"command": "npx",
"args": [
"mcp-google-workspace"
]
}
}
}
Docker
You can also build and run the MCP server in Docker:
docker build -t mcp-google-workspace .
docker run --rm -i \
-v "$PWD/.gauth.json:/app/.gauth.json:ro" \
-v "$PWD/.accounts.json:/app/.accounts.json:ro" \
-v "$PWD/.credentials:/app/.credentials" \
-e GMAIL_ALLOW_DRAFTS=true \
-e GMAIL_ATTACHMENTS_DIR=/app/attachments \
mcp-google-workspace \
node dist/server.js --credentials-dir /app/.credentials
Do not bake .gauth.json, .accounts.json, OAuth tokens, or .env files into the image. The included .dockerignore excludes those files; mount them at runtime instead.
Usage
-
Start the server:
npm startOptional arguments:
--gauth-file: Path to the OAuth2 credentials file (default: ./.gauth.json)--accounts-file: Path to the accounts configuration file (default: ./.accounts.json)--credentials-dir: Directory to store OAuth credentials (default: current directory)
-
The server will start and listen for MCP commands via stdin/stdout.
-
On first run for each account, it will:
- Open a browser window for OAuth2 authentication
- Listen on port 4100 for the OAuth2 callback
- Store the credentials for future use in a file named
.oauth2.{email}.json
Environment Variables
GMAIL_ALLOW_SENDING— set totrueto allowgmail_sendto actually send mail. Defaults to disabled.GMAIL_ALLOW_DRAFTS— set totrueto allow draft creation tools. Defaults to disabled.GMAIL_ATTACHMENTS_DIR— base directory under whichgmail_get_attachmentandgmail_bulk_save_attachmentsmay write files. Attachment paths supplied by the caller are treated as relative to this directory; absolute paths, traversal, and symlinks that escape the directory are rejected. Defaults to~/.mcp-gsuite/attachments.
Available Tools
Account Management
gmail_list_accounts/calendar_list_accounts- List all configured Google accounts
- View account metadata and descriptions
- No user_id required
Gmail Tools
-
gmail_query_emails- Search emails with Gmail's query syntax (e.g., 'is:unread', 'from:example@gmail.com', 'newer_than:2d', 'has:attachment')
- Returns emails in reverse chronological order
- Includes metadata and content summary
-
gmail_get_email- Retrieve complete email content by ID
- Includes full message body and attachment info
-
gmail_bulk_get_emails- Retrieve multiple emails by ID in a single request
- Efficient for batch processing
-
gmail_create_draft- Create new email drafts
- Support for CC recipients
-
gmail_delete_draft- Delete draft emails by
draft_id - Note:
draft_idis distinct from the message ID returned bygmail_query_emails. Usegmail_list_draftsto obtain it.
- Delete draft emails by
-
gmail_list_drafts- List Gmail drafts, optionally filtered by a Gmail search query
- Returns each draft's
draft_id(required forgmail_delete_draft) alongside itsmessage_id, subject, recipients, and snippet
-
gmail_reply- Reply to existing emails
- Option to send immediately or save as draft
- Support for "Reply All" via CC
-
gmail_get_attachment- Download email attachments
- Save to disk or return as embedded resource
-
gmail_bulk_save_attachments- Save multiple attachments in a single operation
-
gmail_archive/gmail_bulk_archive- Move emails out of inbox
- Support for individual or bulk operations
Calendar Tools
-
calendar_list- List all accessible calendars
- Includes calendar metadata, access roles, and timezone information
-
calendar_get_events- Retrieve events in a date range
- Support for multiple calendars
- Filter options (deleted events, max results)
- Timezone customization
-
calendar_create_event- Create new calendar events
- Support for attendees and notifications
- Location and description fields
- Timezone handling
-
calendar_delete_event- Delete events by ID
- Option for cancellation notifications
Development
- Source code is in TypeScript under the
src/directory - Build output goes to
dist/directory - Uses ES modules for better modularity
- Follows Google API best practices
Project Structure
mcp-google-workspace/
├── src/
│ ├── server.ts # Main server implementation
│ ├── services/
│ │ └── gauth.ts # Google authentication service
│ ├── tools/
│ │ ├── gmail.ts # Gmail tools implementation
│ │ └── calendar.ts # Calendar tools implementation
│ └── types/
│ └── tool-handler.ts # Common types and interfaces
├── .gauth.json # OAuth2 credentials
├── .accounts.json # Account configuration
├── package.json # Project dependencies
└── tsconfig.json # TypeScript configuration
Development Commands
npm run build: Build TypeScript codenpm start: Start the servernpm run dev: Start in development mode with auto-reload
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
MIT License - see LICENSE file for details
Install configuration
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for MCP Google Workspace Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mcp-google-workspace)REPOSITORY STATS
Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
下载与拉取统计
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Related productivity work MCP Servers
Alternative and complementary servers in the same category
Buddy is an Android app that offers its phone tools through a local MCP server to Claude Code, Codex, OpenCode, Antigravity, and Grok sessions.

Tuqui is a hosted MCP server that connects Odoo with Claude and ChatGPT so users can ask about sales, stock, customers and overdue invoices in plain language.

