- Home
- MCP servers
- Google Toolbox
Google Toolbox
- python
10
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"jikime-py-mcp-google-toolbox": {
"command": "mcp",
"args": [
"run",
"server.py"
],
"env": {
"GOOGLE_CSE_ID": "YOUR_CSE_ID",
"GOOGLE_API_KEY": "YOUR_API_KEY",
"GOOGLE_CLIENT_ID": "YOUR_CLIENT_ID",
"GOOGLE_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
"GOOGLE_REFRESH_TOKEN": "YOUR_REFRESH_TOKEN"
}
}
}
}You can run a Python-based MCP server that gives AI assistants access to Google services like Gmail, Calendar, Drive, and Google Search. This server acts as a bridge between your AI workflow and Google APIs, enabling you to read, create, and manage data across these tools directly from your MCP client.
How to use
To use this server with an MCP client, start the local server and connect your MCP client to it. The server exposes Gmail, Calendar, Drive, and Google Search capabilities that your AI can invoke during conversations. You can query emails, manage calendar events, read Drive files, and perform web searches through simple tool calls within your MCP environment.
How to install
Prerequisites: Python 3.12 or higher and a working MCP client environment.
# 1) Install UV and prepare the project environment
curl -LsSf https://astral.sh/uv/install.sh | sh
# 2) Create and activate a virtual environment
uv venv -p 3.12
source .venv/bin/activate # On MacOS/Linux
# or
.venv\Scripts\activate # On Windows
# 3) Install dependencies
uv pip install -r requirements.txt
# 4) Obtain a refresh token (this may open a browser for Google OAuth)
uv run get_refresh_token.py
# 5) Set required environment variables
cp env.example .env
vi .env
# set the following values
GOOGLE_API_KEY=your_google_api_key
GOOGLE_CSE_ID=your_custom_search_engine_id
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_REFRESH_TOKEN=your_google_refresh_token
# 6) Copy credentials.json to the project root if you downloaded it separately
To run the server locally, start the MCP server process using the internal MCP command and then work with your MCP client to invoke the available tools.
Additional sections
Configuration and runtime details are provided here to ensure you can connect securely to Google services. The server uses OAuth 2.0 credentials and an API key for accessing Gmail, Calendar, Drive, and Custom Search. Store credentials.json in the project root and populate the environment variables accordingly.
Security and tips
Keep refresh tokens and API keys secure. Do not commit credentials to version control. Use a .env file to manage sensitive values and limit API scopes to what you need: Gmail modify, Gmail read, Calendar access, Drive read/write as appropriate for your workflow.
Examples of supported actions
Gmail: list_emails, search_emails, send_email, modify_email. Calendar: list_events, create_event, update_event, delete_event. Drive: read_gdrive_file, search_gdrive. Web search: search_google.
Troubleshooting
If you encounter token expiration, re-run the refresh token flow with uv run get_refresh_token.py. Ensure the environment file is loaded by your shell where you run mcp run server.py.
Available tools
Gmail Tools
Gmail operations including reading, searching, sending, and modifying emails.
Calendar Tools
Calendar management including creating, listing, updating, and deleting events.
Drive Tools
Drive interactions for reading and searching files.
Search Tools
Web search integration using Google Search.