home / mcp / google workspace mcp server
Provides full Calendar, Contacts, and Gmail management via OAuth2 for Claude Desktop and other AI agents.
Configuration
View docs{
"mcpServers": {
"199-mcp-mcp-google": {
"command": "npx",
"args": [
"-y",
"mcp-google"
],
"env": {
"GOOGLE_CLIENT_ID": "YOUR_CLIENT_ID.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
"GOOGLE_OAUTH_CREDENTIALS": "/path/to/credentials.json",
"GOOGLE_CALENDAR_MCP_TOKEN_PATH": "/path/to/tokens"
}
}
}
}This MCP server lets Claude Desktop and other AI agents fully manage Google Calendar, Contacts, and Gmail through a unified, OAuth2-secured interface. It supports creating, updating, deleting, and organizing data across Calendar, Contacts, and Gmail, enabling powerful automation for AI-assisted workflows.
You interact with the Google Workspace MCP server through a client that supports MCP servers. Create an MCP configuration that points at this server, then start the server locally or point your client at a remote MCP URL if available. Use the calendar, contact, and Gmail endpoints to perform actions such as creating events, listing contacts, or reading emails. The server handles authentication, token refresh, and unified permission scopes for Calendar, Contacts, and Gmail.
Prerequisites: Node.js and npm installed on your machine. You will run a small command to install or run the MCP server.
Option 1: Run directly with npx (recommended)
npx mcp-googleOption 2: Install globally with npm
npm install -g mcp-googleAfter installing, you start the MCP server by invoking the command shown in the Option 1 snippet above or the corresponding global install usage. The server will guide you through authentication prompts in your browser.
Authentication is handled via OAuth2 with automatic token refresh. You configure your Google OAuth credentials in Google Cloud Console and supply them to the MCP server configuration environment. Tokens are stored securely for future use.
Environment variables to configure (examples): Google client credentials and optional token paths. Use the environment blocks shown in the configuration examples to supply these values.
Below are example configurations for running the MCP server from a client. Use one of these in your MCP client config to connect to the server.
json
{
"mcpServers": {
"google_workspace": {
"command": "npx",
"args": ["-y", "mcp-google"],
"env": {
"GOOGLE_CLIENT_ID": "YOUR_CLIENT_ID.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
"GOOGLE_OAUTH_CREDENTIALS": "/path/to/credentials.json",
"GOOGLE_CALENDAR_MCP_TOKEN_PATH": "/path/to/tokens"
}
}
}
}If you prefer to provide credentials directly as environment variables without a credentials.json file, use this variation.
json
{
"mcpServers": {
"google_workspace": {
"command": "npx",
"args": ["-y", "mcp-google"],
"env": {
"GOOGLE_CLIENT_ID": "YOUR_CLIENT_ID.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
}
}
}
}Follow the Google Cloud Console steps to create OAuth 2.0 credentials for a desktop app, enable the Calendar and People APIs, and configure the OAuth consent screen. When you start the MCP server, a browser window will prompt you to authenticate and grant access to Calendar, Contacts, and Gmail.
Retrieve all accessible calendars with their properties such as id, summary, and primary status.
List events from one or more calendars with filters for time range, text search, and attendee status.
Create a new calendar event with support for single or recurring events, attendees, and notifications.
Update details of existing events, including recurring rule adjustments and attendee changes.
Delete events from one or more calendars.
Search events across calendars using text queries and filters.
Query free/busy information across multiple calendars to check availability.
List and search Google Contacts with pagination support.
Retrieve detailed information for a specific contact.
Create new contacts with names, emails, phones, addresses, and organizational data.
Update existing contact fields such as emails, phones, and addresses.
Remove contacts from Google Contacts.
Search and list Gmail messages using advanced queries.
Read full email content including body and attachments.
Send new emails or replies with HTML support.
Modify email properties like labels, read status, and star status.
Move emails to trash or permanently delete.
Create email drafts for later editing and sending.
Edit existing email drafts.
Send a saved draft as a real email.
List Gmail labels/folders.
Create new Gmail labels for organizing emails.
Update label properties and colors.
Remove Gmail labels.
Perform bulk operations on multiple emails in a single action.