Integrations
Enables email operations including listing, searching, sending, and modifying emails with support for labels, read/unread status, and archive/trash actions
Enables web searches via Google's Custom Search API and returns formatted search results
Provides calendar management capabilities for creating, retrieving, updating, and deleting events, with support for attendees, locations, and time ranges
py-mcp-google-toolbox
An MCP server that provides AI assistants with powerful tools to interact with Google services, including Gmail, Google Calendar, Google Drive, and Google Search.
Overview
py-mcp-google-toolbox provides the following Google-related functionalities:
- Gmail operations (read, search, send, modify)
- Google Calendar management (events creation, listing, updating, deletion)
- Google Drive interactions (search, read files)
- Google Search integration (search web)
Table of Contents
Prerequisites
- Python: Install Python 3.12 or higher
- Google Cloud Console Setup:
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Service API:
- Go to "APIs & Services" > "Library"
- Search for and enable "Gmail API"
- Search for and enable "Google Calendar API"
- Search for and enable "Google Drive API"
- Search formand enable "Custom Search API"
- Set up OAuth 2.0 credentials from GCP:
- Go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth client ID"
- Choose "Web application"
- Note down the Client ID and Client Secret
- Client ID
- Client Secret
- download secret json and rename to credentials.json
- Generate an API key
- Go to Custom Search Engine and get its ID
Installation
Git Clone
Configuration
- Install UV package manager:
- Create and activate virtual environment:
- Install dependencies:
- Get refresh token (if token is expired, you can run this)
This will:
- Open your browser for Google OAuth authentication
- Request the following permissions:
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/calendar
https://www.googleapis.com/auth/gmail.send
https://www.googleapis.com/auth/gmail.readonly
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/drive.readonly
- Save the credentials to
token.json
- Display the refresh token in the console
- Environment variables:
- copy credentials.json to project root folder (py-mcp-google-toolbox)
Using Docker
- Build the Docker image:
- Run the container:
Using Local
- Run the server:
Configure MCP Settings
Add the server configuration to your MCP settings file:
Claude desktop app
- To install automatically via Smithery:
- To install manually
open
~/Library/Application Support/Claude/claude_desktop_config.json
Add this to the mcpServers
object:
Cursor IDE
open ~/.cursor/mcp.json
Add this to the mcpServers
object:
for Docker
Tools Documentation
Gmail Tools
list_emails
: Lists recent emails from Gmail inbox with filtering optionssearch_emails
: Performs advanced Gmail searches with detailed email content retrievalsend_email
: Composes and sends emails with support for CC, BCC recipientsmodify_email
: Changes email states (read/unread, archived, trashed) by modifying labels
Calendar Tools
list_events
: Retrieves upcoming calendar events within specified time rangescreate_event
: Creates new calendar events with attendees, location, and descriptionupdate_event
: Modifies existing calendar events with flexible parameter updatingdelete_event
: Removes calendar events by event ID
Drive Tools
read_gdrive_file
: Reads and retrieves content from Google Drive filessearch_gdrive
: Searches Google Drive for files with customizable queries
Search Tools
search_google
: Performs Google searches and returns formatted results
Development
For local testing, you can use the included client script:
License
MIT License
You must be authenticated.
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
Google Toolbox
Related MCP Servers
- -securityAlicense-qualityIntegrates with Google Tasks to allow listing, reading, searching, creating, updating, and deleting tasks.Last updated -15TypeScriptMIT License
- -securityFlicense-qualityEnables managing Google Cloud Platform resources through natural language commands in Claude Desktop, supporting comprehensive operations across compute, storage, databases, networking, monitoring, and IAM without manual credential setup.Last updated -8Python
- -securityAlicense-qualityA tool that connects Google Ads with Claude AI, allowing users to analyze advertising data through natural language conversations and access campaign information, performance metrics, keyword analytics, and ad management.Last updated -60PythonMIT License
- -securityAlicense-qualityEnables AI assistants to interact with and manage Google Cloud Platform resources including Compute Engine, Cloud Run, Storage, BigQuery, and other GCP services through a standardized MCP interface.Last updated -1PythonMIT License