The Google Calendar MCP Server allows Large Language Models (LLMs) to interact with Google Calendar through natural language requests. This server implements the Model Context Protocol (MCP) to enable calendar operations like viewing, creating, and managing events without requiring direct API access.
.../auth/calendar
scopehttp://localhost:8080/oauth2callback
as an authorized redirect URIClone the repository and navigate to the directory:
git clone <repository-url>
cd <repository-directory>
Create a .env
file by copying the example:
cp env.example .env
Edit the .env
file with your Google credentials:
GOOGLE_CLIENT_ID='YOUR_GOOGLE_CLIENT_ID_HERE'
GOOGLE_CLIENT_SECRET='YOUR_GOOGLE_CLIENT_SECRET_HERE'
TOKEN_FILE_PATH='.gcp-saved-tokens.json'
OAUTH_CALLBACK_PORT=8080
CALENDAR_SCOPES='https://www.googleapis.com/auth/calendar'
Install the required dependencies:
pip install -r requirements.txt
You need to run the server manually once to complete the OAuth authentication flow:
python run_server.py
The script will:
.env
After successful authentication, you can stop the server with Ctrl+C.
To use this server with an MCP client (like Cursor or Claude Desktop), add it to your client's configuration:
{
"tools": {
"google_calendar": {
"command": "python",
"args": [
"/absolute/path/to/your/calendar-mcp/run_server.py"
]
}
}
}
Be sure to replace the placeholder path with the actual absolute path to the script on your system.
The server supports the following operations:
The MCP client will handle the communication with the server. In your conversations with the LLM, you can naturally request calendar operations. The LLM will use the appropriate MCP function calls to fulfill your requests.
For example, you might say:
The LLM will translate these into the appropriate MCP function calls to interact with your Google Calendar.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.