aaryaranjit03/google-mcp-server
If you are the rightful owner of google-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A Model Context Protocol (MCP) server for integrating Google Calendar and Gmail with AI applications like Claude.
Google Suite MCP Server
A Model Context Protocol (MCP) server for integrating Google Calendar and Gmail with AI applications like Claude.
🎯 Overview
This project implements a test MCP server that enables AI assistants to:
- Manage Google Calendar events (create, read, update, delete)
- Access and search Gmail messages
- Compose and send emails
- Retrieve calendar and email metadata
Built using:
- MCP Protocol - Anthropic's Model Context Protocol
- Google APIs - Calendar API & Gmail API
- Python - FastMCP framework
📋 Features
Calendar Tools
list_calendar_events- List upcoming calendar eventscreate_calendar_event- Create new events with attendeesupdate_calendar_event- Modify existing eventsdelete_calendar_event- Remove events
Gmail Tools
list_emails- List inbox messages with filtersget_email_content- Read full email contentsend_email- Compose and send emailssearch_emails- Advanced Gmail searchmark_email_read- Mark messages as read
Resources
- Calendar settings and timezone info
- Gmail profile and quota information
Prompts
- Meeting scheduling templates
- Email summary templates
- Calendar report templates
🚀 Quick Start
Prerequisites
- Python 3.10+
- Google Cloud account
- Google Workspace account (Gmail + Calendar)
Installation
- Clone the repository
git clone <your-repo-url>
cd google-mcp-server
- Install dependencies
pip install -r requirements.txt
-
Set up Google Cloud credentials
- See for detailed instructions
- Create OAuth 2.0 credentials
- Download as
credentials.json(not included in repo)
-
Run the server
python google_suite_server.py
- Test with the client
python test_client.py google_suite_server.py
🧪 Testing
The project includes a comprehensive test suite:
python test_client.py google_suite_server.py
Tests cover:
- ✅ Tool discovery and execution
- ✅ Calendar operations (CRUD)
- ✅ Gmail operations (read, search, send)
- ✅ Resource access
- ✅ Prompt templates
💡 Usage Examples
Using the MCP Server with Postman
This project exposes an MCP-compatible HTTP endpoint at:
http://127.0.0.1:8000/mcp
-
Open Postman → click New → MCP (or use the MCP sidebar).
-
Enter the server endpoint:
http://127.0.0.1:8000/mcp
-
Click Connect. Postman will automatically:
-
Negotiate an MCP session
-
Open the streaming SSE connection
-
Load all available tools
-
-
Select any tool from the Tools tab and fill in the input fields.
-
Press Run to execute the tool. Results will appear in the right panel, and streaming or multi-part outputs will show in real time.
This provides a simple UI for invoking the server’s Google Calendar, Gmail, and other MCP tools without needing a custom client.
Programmatic Usage
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
server_params = StdioServerParameters(
command="python",
args=["google_suite_server.py"]
)
async with stdio_client(server_params) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
# List calendar events
result = await session.call_tool(
"list_calendar_events",
arguments={"max_results": 5}
)
📊 Test Results
All tests passing ✅
- 9 tools discovered and tested
- 2 resources accessed
- 3 prompts validated
- Calendar CRUD operations verified
- Gmail operations verified