Seamlessly integrate Gmail and Calendar with Google Workspace using MCP server for efficient email and event management
The mcp-gsuite
MCP server is designed to facilitate seamless integration between Google products and AI applications compliant with the Model Context Protocol (MCP). Specifically, it enables interaction with Gmail and Calendar services through structured API calls that are uniformly understood by compatible MCP clients. This server is particularly useful for developers working on AI applications like Claude Desktop, Continue, Cursor, and others who require access to complex email management and event planning functionalities.
The mcp-gsuite
MCP server supports a wide range of capabilities, making it an indispensable tool for building sophisticated integrated solutions. These features include multiple Google accounts support, flexible Gmail queries, comprehensive calendar management tools, and more. Some key capabilities are:
The mcp-gsuite
server follows the Model Context Protocol (MCP) to ensure compatibility with various AI applications. This protocol provides a standardized framework for data exchange, allowing efficient communication between different systems. The architecture of the mcp-gsuite
server incorporates several components:
The protocol flow is as follows:
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Google APIs (Gmail/Calendar)]
This flow ensures that requests are handled in a secure and efficient manner, allowing seamless integration with AI applications.
To install the mcp-gsuite
MCP server for use with Claude Desktop:
Install via CLI:
npx -y @smithery/cli install mcp-gsuite --client claude
OAuth 2 Setup: Follow these steps to set up OAuth authentication:
Create OAuth2 Credentials:
Required OAuth2 Scopes:
[
"openid",
"https://mail.google.com/",
"https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/userinfo.email"
]
Create Authentication Configuration File (gauth.json
):
{
"web": {
"client_id": "$your_client_id",
"client_secret": "$your_client_secret",
"redirect_uris": ["http://localhost:4100/code"],
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token"
}
}
Create Account Information File (accounts.json
):
{
"accounts": [
{
"email": "[email protected]",
"account_type": "personal",
"extra_info": "Contains Family Calendar"
}
]
}
Execute Tool for Authentication:
When you first execute one of the tools, a browser will open asking for your credentials. Upon successful login, it stores the refresh token in a local file called .oauth.{email}.json
.
For development or unpublished servers, update claude_desktop_config.json
:
{
"mcpServers": {
"mcp-gsuite": {
"command": "uv",
"args": [
"--directory",
"<dir_to>/mcp-gsuite",
"run",
"mcp-gsuite"
]
}
}
}
Customize with different accounts or credentials paths:
{
"mcpServers": {
"mcp-gsuite": {
"command": "uv",
"args": [
"--directory",
"<dir_to>/mcp-gsuite",
"run",
"mcp-gsuite",
"--accounts-file",
"/path/to/custom/.accounts.json",
"--credentials-dir",
"/path/to/custom/credentials"
]
}
}
}
Published Servers Configuration:
{
"mcpServers": {
"mcp-gsuite": {
"command": "uvx",
"args": [
"mcp-gsuite",
"--accounts-file",
"/path/to/custom/.accounts.json",
"--credentials-dir",
"/path/to/custom/credentials"
]
}
}
}
Imagine a scenario where an AI application is assisting with daily email management. The mcp-gsuite
server allows for efficient querying and managing of emails based on specific criteria, such as unread messages from the Scrum Master or bulk operations like saving attachments to local storage.
Technical Implementation
Retrieve my latest unread messages
Search my emails from the Scrum Master
Take the email about ABC and save its attachment locally
In a project management context, an AI application can use mcp-gsuite
to manage events across multiple calendars. This includes scheduling meetings with attendees in different time zones, setting reminders, and ensuring all team members are aware of upcoming events.
Technical Implementation
Fetch calendar events for the next week
Create new event for the sales meeting at 10 AM CST (Custom Timezone Support)
Set notification 24 hours before the sales meeting
The mcp-gsuite
server is fully compatible with several MCP clients, including:
This ensures a smooth and integrated experience across different AI application platforms.
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
For advanced configurations, refer to the mcp-gsuite
server documentation. Key configuration elements include:
.accounts.json
files for each account, updating the email
field in each configuration.mcp-gsuite
server optimizes API calls to minimize latency and improve overall performance.Contributions are welcome! If you wish to contribute or report issues, please follow these steps:
mcp-gsuite
server repository from GitHub.For detailed development guidelines, see the CONTRIBUTING.md file in the repository.
Join the broader MCP community for discussions, support, and resources:
These resources provide extensive documentation, forums, and additional tools to help you leverage Model Context Protocol effectively.
This comprehensive guide positions the mcp-gsuite
MCP server as a robust solution for AI applications seeking seamless integration with Google products. By emphasizing technical details and real-world use cases, developers can harness its full potential in building sophisticated integrated systems.
Learn to connect to MCP servers over HTTP with Python SDK using SSE for efficient protocol communication
Next-generation MCP server enhances documentation analysis with AI-powered neural processing and multi-language support
Python MCP client for testing servers avoid message limits and customize with API key
Discover easy deployment and management of MCP servers with Glutamate platform for Windows Linux Mac
Expose Chicago Public Schools data with a local MCP server accessing SQLite and LanceDB databases
Learn how to use MCProto Ruby gem to create and chain MCP servers for custom solutions