Next-Level Data Automation: Gemini CLI, Google Calendar, and MCP

Gists

Abstract

This report demonstrates managing Google Calendar from the command line using Gemini CLI and an MCP server, enabling powerful, scriptable automation for your schedule.

Introduction

Following up on my previous report, “Next-Level Data Automation: Gemini CLI, Google Sheets, and MCP,” I’m excited to present the next installment in this series. My earlier report, published on Medium, detailed an innovative approach to managing Google Sheets through the powerful combination of Gemini CLI and an MCP server. Ref

In this new report, I will introduce a similar, highly effective method for managing Google Calendar using the same robust tools: Gemini CLI and the MCP server. This approach leverages Gemini CLI’s ability to display calendar information directly within your console, providing users with immediate access to the latest calendar updates. This allows for efficient and informed management of your Google Calendar, all from a unified command-line interface.

Usage and Sample Prompts

For complete setup and usage instructions, please refer to the repository: https://github.com/tanaikech/ToolsForMCPServer?tab=readme-ov-file#usage

This section provides practical examples of managing Google Calendar using the Gemini CLI and the MCP server. The sample calendar for July 2025 is used for the demonstrations, with the current date being July 29, 2025.

Viewing Calendar Events

You can quickly display your schedule for different time frames.

Prompt 1: Monthly View

Get my schedule for this month from Google Calendar.

This prompt utilizes the search_schedule_on_Google_Calendar tool to retrieve and display all events for the current month in a calendar format within the Gemini CLI.

Creating and Updating Events

New events can be added and instantly reflected in your calendar view.

Prompt: Create a New Event

I have a meeting tomorrow from 10:00 AM to 10:30 AM at my laboratory. Add the schedule to Google Calendar. And, get the updated Google Calendar for this month.

Here, Gemini first uses the create_schedule_on_Google_Calendar tool to add the new event and then calls search_schedule_on_Google_Calendar to show the updated monthly calendar, confirming the addition.

The image below illustrates the actual workflow in the Gemini CLI, showing the calendar after the event was added. You can see the calendar before it in the above image.

Prompt 2: Weekly View

When the weekly view of the current calendar is displayed, the following result is obtained:

Get my schedule for this week from Google Calendar.

Similarly, this command fetches and displays the events scheduled for the current week.

Updating Existing Events

Modify event details with a single, descriptive prompt.

Prompt: Update an Event

Update the schedule "sample5" as follows. And, get the updated Google Calendar for this month.
- Change title to "sample5Z".
- Change description to "Updated from sample5.".
- Change start time and end time to 2025-07-29 17:00:00 and 2025-07-29 19:00:00, respectively.

The update_schedule_on_Google_Calendar tool finds the specified event, modifies its details on Google Calendar, and the CLI then displays the updated schedule.

Notably, if the update tool were to encounter an error, Gemini CLI is capable of adapting its process, for instance, by deleting the old event and creating a new one with the updated details, demonstrating robust AI agent behavior.

Creating a Google Document from a Calendar View

You can also convert the calendar view into other formats.

Prompt: Convert table to Google Docs

Create the table as an HTML with colorful texts and colorful borders, and convert it to a Google Document.

When this prompt is run, the following Google Document is created in the root folder of your Google Drive.

You can also create events that include conferencing details.

Prompt: Create a Meeting with Google Meet

Create an event on Google Calendar with the following condition.
- Start: 2025-07-30 11:00
- End: 2025-07-30 13:00
- Title of event: Meeting
- Location: My laboratory
- Description: Meeting about creating samples
- Use meet

The following images show the command in the CLI and the resulting event created in Google Calendar, complete with a Google Meet link.

Advanced Interaction Note

A key finding from this implementation is the ability of the MCP server to send instructions back to the Gemini CLI. The search_schedule_on_Google_Calendar tool, for example, includes a request in its response for the CLI to format the events as a calendar table. Ref The Gemini CLI correctly interprets and acts on this instruction. This indicates a powerful two-way communication channel, suggesting that the Gemini CLI and the MCP server can collaborate to perform even more complex, multi-step operations in the future.

Summary

  • Command-Line Control: This solution enables you to manage your Google Calendar entirely from the command line using the Gemini CLI.
  • Seamless Integration: The MCP server acts as a bridge, allowing the Gemini CLI to interact with Google Calendar APIs for viewing, creating, and updating events.
  • Natural Language Processing: You can use natural language prompts to perform complex actions, such as creating an event with a specific time, title, and description.
  • Dynamic Feedback: The Gemini CLI displays your updated calendar directly in the console, providing immediate confirmation of your changes.
  • Extensible and Powerful: The two-way communication between the Gemini CLI and the MCP server opens the door for more advanced, multi-step automation workflows in the future.

Note

I confirmed that when a calendar is displayed as a table, there is a case in which an error occurred and a broken table was displayed. At that time, when I tried it again, I got the correct result.

 Share!