Google Workspace MCP Server is a server based on the Model Context Protocol (MCP), designed to securely connect personal Google Workspace accounts (such as Gmail, Google Calendar, etc.) with any AI client that supports MCP (such as Claude Desktop). Through this server, AI clients can directly interact with the various services of Google Workspace after authorization.
Main capabilities
Google Calendar: List and search events on the primary calendar within a specified date range; create new events with detailed information such as title, description, start and end times; update existing events (partial modifications are supported, such as changing the title or time); directly delete events from the calendar.
Gmail: Read the latest email content to stay up to date; search for specific emails by subject line; compose and send new emails directly from the account.
Google Drive: Search for files and folders using powerful query strings; create Google Docs with a specified title and initial content; update the entire content of an existing Google Doc; manage files by moving them to trash or permanently deleting them.
How to use
To run this server, the following conditions need to be met: Python 3.9+, uv (or pip), a Google Cloud project with the necessary APIs enabled, and Claude Desktop.
Configuration steps:
- Configure the Google Cloud project: Go to the Google Cloud Console to create a new project, and enable the Gmail API, Google Calendar API, and Google Drive API under "APIs & Services" -> "Library". Then create an OAuth client ID under "APIs & Services" -> "Credentials", configure the OAuth consent screen (select External, fill in the app name, add your own Google account email as a test user), select "Desktop app" as the application type, download the JSON credentials file and rename it to client_secrets.json, and place it in the project root directory.
- Install dependencies: Clone the repository and install the Python packages required by the server and client.
- Run the one-time authorization: Run the get_credentials.py script in the terminal, the browser will open, log in to Google account and grant permissions, and the script will automatically create a token.json file to store the authorization token.
- Set up and run the AI agent client: Taking Claude Desktop as an example, add the MCP server configuration in the configuration file, specifying the absolute path to the Python executable in the virtual environment and the absolute path to mcp_server.py.
After configuration is complete, you can give Claude instructions such as "Create a Google Calendar event based on the content of the last email in my inbox," "Create a Google Doc for a San Francisco travel plan," "Check my availability next week for a two-hour call with a client," "Change the start time of the venture capital meeting to 10 AM," "Search my inbox for new emails about AI news," "Email the supplier that he is late and I need to receive the next shipment as soon as possible," etc.
Use cases
Suitable for users who want to automate the management of personal or team Google Workspace matters through an AI client, such as automatically scheduling meetings, organizing emails, searching for and creating documents, etc.
Limitations and future plans
Current functionality covers some operations of Google Calendar, Gmail, and Google Drive. The roadmap shows that in the future it will expand Google Docs (more fine-grained document operations, such as appending text and reading specific sections), Google Sheets (reading data, appending rows, updating cells, etc.), as well as adding more features for Gmail, Calendar, and Drive.
This project uses the MIT License. Contributions are welcome; you can fork the repository and submit a pull request. For major changes, please open an issue first for discussion.