- Home
- MCP servers
- S Google Workspace
S Google Workspace
- python
23
GitHub Stars
python
Language
4 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You run a secure bridge that connects your Google Workspace data (Gmail, Calendar, Drive) to MCP-compatible AI clients. This MCP server lets you search, create, update, and manage Google data through scripted or natural language interactions, enabling powerful, hands-free productivity with tools you already use.
How to use
You connect an MCP client (for example, Claude Desktop) to the Google Workspace MCP Server and use natural language prompts to access Calendar, Gmail, and Drive data. Common tasks you can accomplish include listing events, creating or updating calendar items, reading recent emails, searching your inbox by subject, composing emails, searching Drive for files, creating Google Docs, updating doc content, and deleting or binning Drive items.
Typical usage patterns you can try:
- Ask to list your calendar events in a date range and then filter by keywords.
- Create a calendar event with a title, description, and specific start/end times.
- Update an existing event by changing its title or time.
- Delete an event from your calendar.
- Have the MCP client read your most recent Gmail message to stay up-to-date.
- Search for emails by subject to locate important conversations.
- Draft and send a new email directly from your account.
- Search Drive for files or folders using query strings.
- Create a new Google Doc with a given title and initial content.
- Replace the content of an existing Google Doc.
- Move items to the trash or permanently delete them.
- Use the client to check your availability for meetings and propose times.
When you issue a request, the MCP server executes the corresponding Google API actions and returns results or confirms the changes. If an operation requires additional details, you can supply them in subsequent prompts until the task is complete.
How to install
Follow these steps to set up the server and get started with an MCP client.
Prerequisites you need before installation:
- Python 3.9+
- uv (or pip)
- A Google Cloud project with Gmail, Calendar, and Drive APIs enabled
- Claude Desktop (or another MCP client)
Step 1: Configure your Google Cloud project
-
Create or select a Google Cloud project.
-
Enable Gmail API, Google Calendar API, and Google Drive API.
-
Create OAuth credentials for a Desktop app and download the JSON file. Rename it to client_secrets.json and place it in the root directory of your project.
Step 2: Install dependencies
git clone <your-repo-url>
cd <your-repo-name>
uv venv # Create a virtual environment
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv install -r requirements.txt
Additional configuration and start commands
Step 3: Run one-time authorization to access Google data
- Run the credentials script to authorize access to your Google account.
python get_credentials.py
This will prompt you to log in in a browser and grant the requested permissions. A token.json file is created to store your authorization tokens for future use.
Configure the MCP client (example with Claude Desktop)
Open the Claude Desktop configuration file and add an MCP server entry that points to your local Python MCP server.
{
"mcpServers": {
"GsuiteMCPServer": {
"command": "absolute-path-to-your-python-executable-in-virtual-environment",
"args": [
"<mcp_server.py-abs-path>"
]
}
}
}
Examples of tasks you can perform with prompts
Ask Claude to perform actions such as creating a calendar event from an email, drafting a travel plan in Google Docs, or checking your availability for a two-hour customer call.
Available tools
calendar_list_events
List and search events on your primary Google Calendar within a specific date range.
calendar_create_event
Create new calendar events with a title, description, start time, and end time.
calendar_update_event
Update existing calendar events with partial changes (e.g., new title or times).
calendar_delete_event
Delete events directly from the calendar.
gmail_read_latest
Read the content of your most recent Gmail message.
gmail_search_by_subject
Search for emails by their subject line.
gmail_compose_send
Compose and send new emails from your Gmail account.
drive_search_files
Search Google Drive files and folders using advanced queries.
drive_create_doc
Create new Google Docs with a given title and initial content.
drive_update_doc
Update the entire content of an existing Google Doc.
drive_move_to_trash
Move Drive items to the bin or delete them permanently.