home / mcp / google mcp server
Locally hosted MCP server exposing Gmail, Google Calendar, and Drive tools for read, write, and search actions.
Configuration
View docs{
"mcpServers": {
"alvinqle-mcp-playground": {
"url": "http://localhost:8000/mcp",
"headers": {
"GOOGLE_APPLICATION_CREDENTIALS": "/path/to/credentials.json"
}
}
}
}You can run a locally-hosted MCP server that exposes Gmail, Google Calendar, and Google Drive as controllable tools. This setup lets you access these Google services from MCP clients, making it easy to list, read, create, and search data directly from your preferred interface.
You connect to the Google MCP Server from your MCP client by configuring a server entry with the appropriate transport method. You can run the server locally to interact with Gmail, Calendar, and Drive through your client of choice.
Prerequisites you need before installing are Python 3.10 or newer and a Google account. You also require a Google Cloud project with OAuth 2.0 credentials.
Install the package in editable mode to set up the server locally.
pip install -e .
# Or using uv if you prefer
uv pip install -e .Set up Google Cloud credentials by creating or selecting a project, enabling Gmail, Calendar, and Drive APIs, configuring an OAuth consent screen, and creating OAuth 2.0 credentials for a Desktop app. Download the credentials as credentials.json and place it in the project root. You’ll use this file to authenticate and obtain an access token.
(Optional) Prepare environment configuration by copying the example environment file and adjusting paths as needed. The defaults assume credentials.json and token.json live in the project root.
List recent emails from a label in Gmail.
Read the full content of a selected Gmail message.
Send a new email via Gmail.
Search Gmail messages using Gmail query syntax.
List all calendars accessible to the authenticated user.
List upcoming events from the connected calendars.
Create a new calendar event.
List files in Google Drive, with optional folder restriction.
Read the text content of a Drive file.
Search for Drive files by name or query.