loading…
Search for a command to run...
loading…
A Model Context Protocol server that enables Claude to fully manage Google Calendar, including events, calendars, sharing, and availability checks through natur
A Model Context Protocol server that enables Claude to fully manage Google Calendar, including events, calendars, sharing, and availability checks through natural language.
A Model Context Protocol (MCP) server that gives Claude full access to your Google Calendar. Create events, check availability, manage calendars, and more - all through natural conversation.
Before you begin, ensure you have:
Node.js 18 or higher installed:
node --version # Should show v18.x or higher
npm --version # Should show v9.x or higher
A Google Account with Google Calendar enabled
Claude Code installed and available in your PATH
Open your terminal and run:
# Navigate to where you keep your projects
cd ~/projects # or any directory you prefer
# Clone the repository
git clone https://github.com/sandeepmallareddy/gcalendar-mcp.git
# Go into the project folder
cd gcalendar-mcp
In the terminal, inside the gcalendar-mcp folder:
npm install
This will download all required packages. Wait for it to complete (you'll see a list of packages installed).
Compile the TypeScript code to JavaScript:
npm run build
You should see a build/ folder created with the compiled files.
# Check that the built file exists
ls -la build/index.js
Google requires authentication to access your calendar. Here's how to set it up:
Go to Google Cloud Console
https://console.cloud.google.com/apis/credentials
Create a new project (or select existing):
Google Calendar MCPEnable the Google Calendar API:
Create OAuth 2.0 credentials:
Add redirect URI:
http://localhost:3000/oauth2callback to "Authorized redirect URIs"Create a file named .env in the gcalendar-mcp folder with your credentials:
# Create the file (or open with your editor)
nano .env
Add the following content (replace with your actual values):
GOOGLE_CLIENT_ID=YOUR_CLIENT_ID.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=YOUR_CLIENT_SECRET
GOOGLE_REDIRECT_URI=http://localhost:3000/oauth2callback
Important: Replace YOUR_CLIENT_ID and YOUR_CLIENT_SECRET with the values you copied from Google Cloud Console.
Save the file:
Ctrl + X to exitY to confirmEnter to saveSecure your environment file:
# Restrict access to your user only
chmod 600 .env
Claude Code provides a built-in command to add MCP servers. Run this in your terminal:
# Add the Google Calendar MCP server
claude mcp add gcalendar --transport stdio \
--env GOOGLE_CLIENT_ID="YOUR_CLIENT_ID.apps.googleusercontent.com" \
--env GOOGLE_CLIENT_SECRET="YOUR_CLIENT_SECRET" \
--env GOOGLE_REDIRECT_URI="http://localhost:3000/oauth2callback" \
-- node /PATH/TO/YOUR/gcalendar-mcp/build/index.js
Important: Replace the following:
YOUR_CLIENT_ID - Your Google OAuth Client IDYOUR_CLIENT_SECRET - Your Google OAuth Client Secret/PATH/TO/YOUR/gcalendar-mcp/ - The actual path to your gcalendar-mcp folderExample (adjust paths for your system):
claude mcp add gcalendar --transport stdio \
--env GOOGLE_CLIENT_ID="398036798396-xxx.apps.googleusercontent.com" \
--env GOOGLE_CLIENT_SECRET="GOCSPX-xxx" \
--env GOOGLE_REDIRECT_URI="http://localhost:3000/oauth2callback" \
-- node /home/username/projects/gcalendar-mcp/build/index.js
# List all configured MCP servers
claude mcp list
# You should see gcalendar in the list
The first time you use a calendar tool:
Your tokens are stored securely at:
~/.config/gcalendar-mcp/tokens.json# List all MCP servers
claude mcp list
# Get details about gcalendar server
claude mcp get gcalendar
# Remove the gcalendar server
claude mcp remove gcalendar
# Restart Claude Code to reload the server
The MCP server configuration is stored in ~/.claude.json. After adding the server, you can view it:
cat ~/.claude.json
The configuration will look like:
{
"mcpServers": {
"gcalendar": {
"command": "node",
"args": ["/path/to/gcalendar-mcp/build/index.js"],
"env": {
"GOOGLE_CLIENT_ID": "...",
"GOOGLE_CLIENT_SECRET": "...",
"GOOGLE_REDIRECT_URI": "..."
}
}
}
}
Once connected, you can ask Claude to:
# Check your schedule
"What meetings do I have tomorrow?"
# Create events
"Schedule a team meeting with [email protected] next Tuesday at 2pm for 1 hour"
# Find free time
"When is everyone free next Friday afternoon?"
# Get availability
"Am I free at 3pm today?"
# Manage calendars
"Create a new calendar called 'Side Projects'"
# Share calendars
"Share my work calendar with [email protected] as writer"
# Natural language
"Remind me to call mom on Sunday at 10am"
| Tool | Description |
|---|---|
create_event |
Create a new event with title, time, location, attendees |
get_event |
Get details of a specific event |
list_events |
List events with filters (date range, search, etc.) |
update_event |
Fully update an event |
patch_event |
Partially update an event (only changed fields) |
delete_event |
Delete an event |
move_event |
Move event to another calendar |
quick_add |
Create event from natural language |
import_event |
Import event by UID |
list_instances |
Get occurrences of a recurring event |
watch_events |
Set up push notifications for changes |
| Tool | Description |
|---|---|
get_calendar |
Get calendar metadata |
create_calendar |
Create a new calendar |
update_calendar |
Update calendar properties |
delete_calendar |
Delete a calendar |
clear_calendar |
Remove all events from a calendar |
| Tool | Description |
|---|---|
list_calendar_list |
List all calendars you're subscribed to |
add_calendar_to_list |
Subscribe to a calendar |
remove_calendar_from_list |
Unsubscribe from a calendar |
| Tool | Description |
|---|---|
list_acl |
List who has access to a calendar |
create_acl_rule |
Share a calendar with someone |
delete_acl_rule |
Remove someone's access |
| Tool | Description |
|---|---|
query_freebusy |
Check availability across calendars |
get_colors |
Get available calendar and event colors |
list_settings |
List your Google Calendar settings |
This server follows security best practices:
~/.config/gcalendar-mcp/After authentication, secure your token file:
chmod 700 ~/.config/gcalendar-mcp
chmod 600 ~/.config/gcalendar-mcp/tokens.json
# Install dependencies
npm install
# Development mode with hot reload
npm run dev
# Build for production
npm run build
# Run built server
node build/index.js
# Run tests
npm test
# Type check
npm run typecheck
# Lint code
npm run lint
# Format code
npm run format
# Full check
npm run check
Claude Code CLI is not installed or not in your PATH.
# Check if Claude is installed
which claude # macOS/Linux)
# If not installed, download from https://claude.com/claude-code
http://localhost:3000/oauth2callbackrm ~/.config/gcalendar-mcp/tokens.json
claude mcp list
claude mcp get gcalendar
cd gcalendar-mcp
npm run build
The OAuth callback server might still be running. Kill it:
# Find the process
lsof -i :3000
# Kill it (replace PID with the number you see)
kill [PID]
Tokens refresh automatically. If you see persistent errors:
rm ~/.config/gcalendar-mcp/tokens.json
# Re-authenticate through Claude
Check the server configuration:
# View full MCP configuration
cat ~/.claude.json
# Verify the path to your build file exists
ls -la /path/to/gcalendar-mcp/build/index.js
MIT License - see LICENSE for details.
Contributions welcome! Please see CONTRIBUTING.md for guidelines.
Выполни в терминале:
claude mcp add gcalendar-mcp -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.