Google Calendar MCP Server with Service Account authentication
Project description
Google Calendar MCP
Google Calendar MCP is a Model Context Protocol (MCP) server implementation in Python with Service Account authentication.
Overview
This project implements the Google Calendar API as an MCP server in Python. It is a port from the original TypeScript version, with authentication changed from OAuth 2.0 to Service Account.
Features
- Python 3.13 support
- MCP (Model Context Protocol) server implementation
- Google Calendar API integration
- Service Account authentication
- Dependency management with uv
Requirements
- Python 3.13 or higher
- A Google Cloud Platform project and a valid Service Account
- The Service Account must have access to the Google Calendar API
Installation
# Clone the repository
git clone https://github.com/youyo/google-calendar-mcp.git
cd google-calendar-mcp
# Install dependencies
uv pip install -r requirements.txt
Configuration
- Create a project in Google Cloud Platform and enable the Google Calendar API.
- Create a Service Account and download the JSON key file.
- Set the environment variable
GOOGLE_APPLICATION_CREDENTIALSto the path of the JSON key file.
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
Optionally, you can set the default calendar ID via the environment variable:
export GOOGLE_CALENDAR_ID=your-calendar-id@example.com
If not specified in arguments, this value will be used as the default calendarId.
Example: MCP configuration file
To use this server with an MCP client, add the following to your MCP configuration file.
Set both GOOGLE_APPLICATION_CREDENTIALS and GOOGLE_CALENDAR_ID in the env section to specify authentication and the default calendar:
{
"mcpServers": {
"google-calendar-mcp": {
"command": "uvx",
"args": ["google-calendar-mcp@latest"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/path/to/service-account.json",
"GOOGLE_CALENDAR_ID": "your-calendar-id@example.com"
}
}
}
}
If calendarId is not specified in tool arguments, the value of GOOGLE_CALENDAR_ID will be used as the default.
Usage
# Start the server
uvx google-calendar-mcp
Available Tools
list-calendars: List all available calendarslist-events: List events from a calendarsearch-events: Search for events in a calendar by text querylist-colors: List available color IDs and their meanings for calendar eventscreate-event: Create a new calendar eventupdate-event: Update an existing calendar eventdelete-event: Delete a calendar event
Tool Required Arguments
| Tool | Required Arguments | Optional Arguments / Notes |
|---|---|---|
| list-calendars | (none) | - |
| list-events | calendarId | timeMin, timeMax, maxResults |
| search-events | calendarId, query | timeMin, timeMax, maxResults |
| list-colors | (none) | - |
| create-event | calendarId, summary | start, end, timeZone, location, description, attendees, etc. |
| update-event | calendarId, eventId | summary, start, end, timeZone (dateTime 時必須), location, etc. |
| delete-event | calendarId, eventId | - |
Notes
calendarIdはほぼ全てのカレンダー操作で必須です。eventIdはイベント更新・削除時に必須です。summaryはイベント作成時に必須です。timeZoneは start/end が dateTime 形式の場合に必須です。- その他のパラメータは Google Calendar API の仕様に準じます。
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file google_calendar_mcp-0.0.8.tar.gz.
File metadata
- Download URL: google_calendar_mcp-0.0.8.tar.gz
- Upload date:
- Size: 41.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db00b79daf7451611788d41a503afd65354587fa9bc5a1b2573ae7257cb7893b
|
|
| MD5 |
2f6bcc86b441163ec70d2b475965769f
|
|
| BLAKE2b-256 |
4ef0b7e5afa99981989c36d482dcbdedf22bdba99bba0469de5481b388b70a6c
|
Provenance
The following attestation bundles were made for google_calendar_mcp-0.0.8.tar.gz:
Publisher:
publish.yaml on youyo/google-calendar-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
google_calendar_mcp-0.0.8.tar.gz -
Subject digest:
db00b79daf7451611788d41a503afd65354587fa9bc5a1b2573ae7257cb7893b - Sigstore transparency entry: 205897402
- Sigstore integration time:
-
Permalink:
youyo/google-calendar-mcp@f90dfbba221bdb4393212f149a9da5351c2d2896 -
Branch / Tag:
refs/tags/v0.0.8 - Owner: https://github.com/youyo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@f90dfbba221bdb4393212f149a9da5351c2d2896 -
Trigger Event:
push
-
Statement type:
File details
Details for the file google_calendar_mcp-0.0.8-py3-none-any.whl.
File metadata
- Download URL: google_calendar_mcp-0.0.8-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7392b7a526490b918af04497f11f2864046fa6e0b80dcc63f01f80592a4f213f
|
|
| MD5 |
6b232f27e731f756ebbde3e88b07de2d
|
|
| BLAKE2b-256 |
00def60a9ee0ea8708c842eba962d7a890af2105a243330a78f013e9e0a2f21d
|
Provenance
The following attestation bundles were made for google_calendar_mcp-0.0.8-py3-none-any.whl:
Publisher:
publish.yaml on youyo/google-calendar-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
google_calendar_mcp-0.0.8-py3-none-any.whl -
Subject digest:
7392b7a526490b918af04497f11f2864046fa6e0b80dcc63f01f80592a4f213f - Sigstore transparency entry: 205897404
- Sigstore integration time:
-
Permalink:
youyo/google-calendar-mcp@f90dfbba221bdb4393212f149a9da5351c2d2896 -
Branch / Tag:
refs/tags/v0.0.8 - Owner: https://github.com/youyo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@f90dfbba221bdb4393212f149a9da5351c2d2896 -
Trigger Event:
push
-
Statement type: