
Google-Calendar-MCP
Google日历的MCP服务器
3 years
Works with Finder
0
Github Watches
0
Github Forks
0
Github Stars
Google Calendar MCP Server
This MCP server provides access to your Google Calendar events and allows you to manage them through an MCP interface. It can be used with Claude Desktop or any other MCP-compatible client.
Requirements
- Python 3.10 or higher - MCP requires Python 3.10+
- Google Cloud project with Calendar API enabled
- OAuth credentials for authentication
Features
- View calendar events for any date or date range
- Create new events with title, time, description, location, and attendees
- Update existing events with new details
- Pre-built prompts for common calendar actions
Installation
-
Clone this repository:
git clone <repository-url> cd google-calendar-mcp
-
Create a virtual environment with Python 3.10 or higher:
# Check your Python version python --version # Create a virtual environment with the correct Python version # For Python 3.10 python3.10 -m venv venv # OR for Python 3.11 python3.11 -m venv venv # OR for Python 3.12 python3.12 -m venv venv # Activate the virtual environment source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies using pip:
pip install -r requirements.txt
Alternatively, you can use
uv
for faster installation (recommended):# Install uv if you don't have it curl -fsSL https://astral.sh/uv/install.sh | sh # On Windows: powershell -c "irm https://astral.sh/uv/install.ps1 | iex" # Install dependencies with uv uv pip install -r requirements.txt
-
Set up Google Calendar API credentials:
a. Go to the Google Cloud Console b. Create a new project or select an existing one c. Enable the Google Calendar API d. Create OAuth credentials (Desktop client OAuth ID) e. Download the credentials JSON file and save it as
credentials.json
in the project directory
Usage
Using with Claude Desktop
-
Install Claude Desktop from the official website
-
Install the MCP server in Claude Desktop:
# Make sure you're in the project directory with the virtual environment activated mcp install calendar_mcp_server.py
-
Configure Claude Desktop to use the MCP server by editing the Claude Desktop configuration file:
- Locate the Claude configuration file at
/path/to/your/claude_desktop_config.json
(Mac) or appropriate location for your OS - Add or modify the configuration to include the Google Calendar MCP:
{ "Google Calendar": { "command": "/path/to/your/venv/bin/mcp", "args": [ "run", "/path/to/your/project/calendar_mcp_server.py" ] } }
- Replace
/path/to/your/venv/
with the actual path to your virtual environment - Replace
/path/to/your/project/
with the actual path to your project directory
- Locate the Claude configuration file at
-
Verify that the MCP server is running properly:
- Open Claude Desktop
- Click on the settings icon (gear) in the bottom left corner
- Select "Developer" from the settings menu
- Under "Active MCP Servers", you should see "Google Calendar" listed
- If the MCP server is running correctly, you'll see a green status indicator
- If you don't see it listed or it shows an error, ensure that your server is running
-
You can now use prompts like:
Show me my events for today Create a meeting with John tomorrow at 2pm
Using with Cursor
-
Configure Cursor:
- Open Cursor.
- Go to
Settings
(usually a gear icon or via the Command Palette). - Navigate to
Cursor Settings
>MCP
. - Click on
Add New Global MCP Server
.- Add or modify the configuration to include the Google Calendar MCP:
{ "Google Calendar": { "command": "/path/to/your/venv/bin/mcp", "args": [ "run", "/path/to/your/project/calendar_mcp_server.py" ] } }
- Replace
/path/to/your/venv/
with the actual path to your virtual environment - Replace
/path/to/your/project/
with the actual path to your project directory
-
Using in Cursor:
- Now, when you chat with the AI in Cursor (e.g., using "Agent" mode or similar features that leverage MCP), it should be able to connect to your running Google Calendar MCP server.
- You can use calendar-related prompts like:
Show me my events for today Create a meeting with John tomorrow at 2pm
- Cursor should route these requests to your local server if the configuration is correct and the server is running.
Run in development mode with the MCP Inspector:
If you're developing or debugging the MCP server, use:
mcp dev calendar_mcp_server.py
This will provide additional debugging information and a web interface for inspecting requests and responses.
Resources
The server exposes the following MCP resources:
-
calendar://events/{date}
- Returns events for a specific date
Example usage:
calendar://events/today
calendar://events/tomorrow
calendar://events/2023-07-15
Tools
The server provides the following tools:
-
list_events(date_start, date_end=None)
- List events in a date range -
create_event(summary, start_datetime, end_datetime, ...)
- Create a new calendar event -
update_event(event_id, ...)
- Update an existing event
Prompts
Pre-built prompts to simplify common actions:
-
today_events
- Quick access to today's calendar -
schedule_meeting
- Guided prompt to create a new meeting
Authentication
On first use, the server will open a browser window for Google OAuth authentication. After authorizing the application, your credentials will be stored in token.json
for future use.
Troubleshooting
-
Python version issues: This project requires Python 3.10 or higher. If you see errors like
No matching distribution found for mcp[cli]
, check your Python version. -
Authentication errors: Ensure your
credentials.json
file is correctly placed and has the right permissions. -
MCP installation problems: Try using
uv
instead ofpip
for a more reliable installation experience.
Notes
- The server uses UTC for timestamps. Event times are displayed in the local timezone.
- You need a valid
credentials.json
file from Google Cloud Console to use this server. - Your authentication token is stored in
token.json
after first login.
相关推荐
😎简单易用、🧩丰富生态 -大模型原生即时通信机器人平台| 适配QQ / 微信(企业微信、个人微信) /飞书 /钉钉 / discord / telegram / slack等平台| 支持chatgpt,deepseek,dify,claude,基于LLM的即时消息机器人平台,支持Discord,Telegram,微信,Lark,Dingtalk,QQ,Slack
Reviews

user_OUdXmPKN
I've been using google-calendar-mcp by surana-mudit for a while now, and it's been fantastic! It integrates seamlessly with my Google Calendar, allowing me to manage events and schedules with ease. It's user-friendly and has made organizing my life much more efficient. Highly recommended for anyone looking for a reliable calendar management tool!

user_fmoFuapr
The google-calendar-mcp by surana-mudit is a fantastic tool that has transformed the way I manage my schedule. Its seamless integration with Google Calendar makes it incredibly convenient to keep track of appointments and deadlines. Highly recommend for anyone looking to optimize their time management!

user_mc8qV8bh
I have been using google-calendar-mcp by surana-mudit for a while now, and it has significantly improved my productivity. This comprehensive tool effortlessly syncs my schedules and reminders, ensuring I never miss any important events. The user-friendly interface and seamless integration with Google Calendar make it indispensable. Highly recommended for efficient time management!

user_3SrDJK9n
I've been using google-calendar-mcp for a while and it has significantly improved my productivity. The integration is seamless, and the user interface is intuitive, making it easy to manage my schedules. Kudos to surana-mudit for creating such a useful tool. Highly recommend!

user_x3cmWK95
As a dedicated user of the Google Calendar MCP created by Surana Mudit, I must say this tool has significantly streamlined my scheduling process. Its user-friendly interface and seamless integration with Google Calendar make it an indispensable asset for managing events and appointments efficiently. Highly recommend it for anyone needing a reliable calendar management solution!

user_lUZacUVA
I am absolutely thrilled with google-calendar-mcp! This amazing tool, developed by surana-mudit, has transformed the way I manage my schedule. It's incredibly user-friendly and integrates seamlessly with my existing Google Calendar. Whether I'm planning meetings, setting reminders, or organizing events, everything is now streamlined. Highly recommend to anyone looking for an efficient calendar management solution!

user_TmW76A8s
As a dedicated user of the Google Calendar MCP by Surana Mudit, I'm genuinely impressed by this product. It seamlessly integrates with my daily schedule, providing efficient and reliable performance. The user interface is intuitive, making it easy to navigate and manage my appointments. I highly recommend this tool to anyone looking to streamline their calendar management.

user_AdQICR81
As a dedicated user of google-calendar-mcp by Surana Mudit, I am thoroughly impressed. This app seamlessly integrates Google Calendar features into my MCP experience, making scheduling and managing tasks incredibly efficient. The user-friendly interface and smooth performance make it a must-have tool for anyone looking to boost their productivity. Highly recommended!

user_ui22CQzo
Google Calendar MCP by Surana Mudit is a game-changer for time management! This app seamlessly integrates with Google Calendar, offering enhanced features and a user-friendly interface. I've found it incredibly helpful for organizing my schedule and managing appointments efficiently. Highly recommended for anyone looking to boost productivity!

user_V11pw83j
As an avid user of the google-calendar-mcp application, I am thoroughly impressed by its seamless integration and user-friendly interface. Built by surana-mudit, this tool has significantly improved my productivity by consolidating all my calendars in one place. Highly recommended for anyone looking to streamline their schedule management!

user_t5U5TiaZ
I've been using google-calendar-mcp by surana-mudit and it has significantly enhanced my productivity. The integration is seamless and intuitive, making it incredibly easy to manage my schedule. Highly recommended for anyone looking to streamline their calendar management!