
An MCP server that provides AI assistants with powerful tools to interact with Google services, including Gmail, Google Calendar, Google Drive, and Google Search.
概览
An MCP server that provides AI assistants with powerful tools to interact with Google services, including Gmail, Google Calendar, Google Drive, and Google Search. 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) 1. : Install Python 3.12 or higher 2. : - Go to Google Cloud Console - Create a new project or select an existing one - Enable the Service API: 1. Go to "APIs & Services" > "Library" 2. Search for and enable "Gmail API" 3. Search for and enable "Google Calendar API" 4. Search for and enable "Google Drive API" 5. Search formand enable "Custom Search API" - Set up OAuth 2.0 credentials from GCP: 1. Go to "APIs & Services" > "Credentials" 2. Click "Create Credentials" > "OAuth client ID" 3. Choose "Web application" 4.
README
以下为原文 README 节选,完整内容请查看原文。
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
git clone https://github.com/jikime/py-mcp-google-toolbox.git
cd py-mcp-google-toolbox
Configuration
- Install UV package manager:
curl -LsSf https://astral.sh/uv/install.sh | sh
- Create and activate virtual environment:
uv venv -p 3.12
source .venv/bin/activate # On MacOS/Linux
# or
.venv\Scripts\activate # On Windows
- Install dependencies:
uv pip install -r requirements.txt
- Get refresh token (if token is expired, you can run this)
uv run get_refresh_token.py
This will:
- Open your browser for Google OAuth authentication
- Request the following permissions:
安装
docker run -i --rm py-mcp-google-toolbox配置
{
"mcpServers": {
"Google Toolbox": {
"command": "/path/to/bin/uv",
"args": [
"--directory",
"/path/to/py-mcp-google-toolbox",
"run",
"server.py"
]
}
}
}