iustinsibiescu/mcp-example
If you are the rightful owner of mcp-example and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A lightweight MCP server that connects to your Google Calendar and retrieves your meetings for today.
🗓️ Google Calendar MCP Server
A lightweight MCP server that connects to your Google Calendar and retrieves your meetings for today.
✅ Setup Instructions
1. Create OAuth Credentials in Google Cloud
- Go to Google Cloud Console.
- Enable the Google Calendar API.
- Navigate to APIs & Services > Credentials.
- Click "Create Credentials" > "OAuth client ID".
- Choose "Desktop App" as the application type.
- Copy your Client ID and Client Secret.
2. Generate a Refresh Token
-
In the root of this repo, run:
node quick-refresh-token.js
-
This will open a browser window to authorize the app.
-
After authorizing, paste the code into the terminal.
-
The script will print your Refresh Token.
3. Add Your Environment Variables
Create a .env
file in the project root with:
GOOGLE_CLIENT_ID=your-client-id
GOOGLE_CLIENT_SECRET=your-client-secret
GOOGLE_REFRESH_TOKEN=your-refresh-token
CALENDAR_ID=primary
Replace primary with a specific calendar ID if needed.
4. Connect MCP Server in Cursor
-
Open Cursor.
-
Go to Settings > Tools & Integrations > Add New MCP Server.
-
Paste the following config:
{
"mcpServers": {
"calendar-data": {
"command": "node",
"args": ["path_to_server.js"],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id",
"GOOGLE_CLIENT_SECRET": "your-client-secret",
"GOOGLE_REFRESH_TOKEN": "your-refresh-token",
"CALENDAR_ID": "primary"
}
}
}
}
Replace path_to_server.js
with the actual path to your server.js
file.
5. Usage
Once set up, you can chat with Cursor AI and ask:
"Do I have any meetings today?"
Cursor will call the MCP server, which will fetch today's events from your Google Calendar.