home / mcp / google mcp server

Google MCP Server

Locally hosted MCP server exposing Gmail, Google Calendar, and Drive tools for read, write, and search actions.

Installation
Add the following to your MCP client configuration file.

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.

How to use

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.

How to install

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 .

Additional setup notes

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.

Available tools

list_emails

List recent emails from a label in Gmail.

read_email

Read the full content of a selected Gmail message.

send_email

Send a new email via Gmail.

search_emails

Search Gmail messages using Gmail query syntax.

list_calendars

List all calendars accessible to the authenticated user.

list_events

List upcoming events from the connected calendars.

create_event

Create a new calendar event.

list_files

List files in Google Drive, with optional folder restriction.

read_file

Read the text content of a Drive file.

search_files

Search for Drive files by name or query.