Skip to main content
Glama

Google Calendar MCP Server

by peadams21
SETUP.md2.51 kB
# Google Calendar MCP Server Setup Guide ## Quick Setup Steps ### 1. Google Cloud Console Setup 1. Go to [Google Cloud Console](https://console.cloud.google.com) 2. Create a new project or select existing one 3. Enable the Google Calendar API: - Go to "APIs & Services" > "Library" - Search for "Google Calendar API" - Click "Enable" ### 2. Create Service Account 1. Go to "APIs & Services" > "Credentials" 2. Click "Create Credentials" > "Service Account" 3. Fill in service account details: - Name: `google-calendar-mcp-server` - Description: `MCP Server for Google Calendar integration` 4. Click "Create and Continue" 5. Skip role assignment (click "Continue") 6. Click "Done" ### 3. Generate Service Account Key 1. Click on the created service account 2. Go to "Keys" tab 3. Click "Add Key" > "Create new key" 4. Choose "JSON" format 5. Download the key file 6. Save it in this project directory as `service-account-key.json` ### 4. Configure Environment 1. Copy the environment template: ```bash copy .env.example .env ``` 2. Edit `.env` file: ```env GOOGLE_SERVICE_ACCOUNT_KEY_FILE=./service-account-key.json DEFAULT_TIMEZONE=America/Los_Angeles DEFAULT_CALENDAR_ID=primary ``` ### 5. Share Calendar Access 1. Open [Google Calendar](https://calendar.google.com) 2. Go to calendar settings (gear icon) 3. Select your calendar from the left sidebar 4. Scroll to "Share with specific people" 5. Click "Add people" 6. Enter the service account email (found in the JSON key file) 7. Set permission to "Make changes to events" 8. Click "Send" ### 6. Build and Test 1. Install dependencies: ```bash npm install ``` 2. Build the project: ```bash npm run build ``` 3. Test the server: ```bash npm start ``` ### 7. Integration with VS Code The MCP server is configured in `.vscode/mcp.json` and ready to use with VS Code's MCP extension. ## Troubleshooting - **403 Forbidden**: Make sure the calendar is shared with the service account - **Authentication errors**: Verify the service account key file path in `.env` - **Calendar not found**: Check that you're using the correct calendar ID - **Permission denied**: Ensure the service account has "Make changes to events" permission ## Security Notes - Never commit the `service-account-key.json` file to version control - Keep the `.env` file secure and don't share it - Regularly rotate service account keys - Use the principle of least privilege for calendar permissions

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/peadams21/Google-Calendar-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server