Get the FREE Ultimate OpenClaw Setup Guide →

Calendar-Autoauth

A Model Context Protocol (MCP) server for Google Calendar integration in Cluade Desktop with auto authentication support. This server enables AI assistants to manage Google Calendar events through natural language interactions.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio gongrzhe-calendar-autoauth-mcp-server npx @gongrzhe/server-calendar-autoauth-mcp \
  --env CALENDAR_OAUTH_PATH="Path to gcp-oauth.keys.json (e.g., /home/user/.calendar-mcp/gcp-oauth.keys.json)" \
  --env CALENDAR_CREDENTIALS_PATH="Path to credentials.json (e.g., /home/user/.calendar-mcp/credentials.json)"

How to use

Calendar AutoAuth is an MCP server that provides Google Calendar integration with an automated authentication flow. It exposes calendar operations such as creating, listing, updating, deleting, and retrieving event details, all backed by Google Calendar via OAuth2. The server is designed to work with Claude Desktop, allowing natural language interactions to manage calendar data. You can authenticate once and store credentials locally for persistent access, with support for both Desktop and Web application credentials. To use the server, configure it in your MCP client (e.g., Claude Desktop) under an mcpServers entry and run the server using the npm package. After authentication, you can issue intents like “Create an event for Team Meeting next Friday at 10am” or “List my events for the next week” and the MCP server will translate those into Google Calendar API calls. The included options demonstrate creating, listing, updating, and deleting events, as well as handling OAuth flow with auto browser authentication.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • Basic familiarity with MCP configuration and Claude Desktop (or your MCP client)

Installation steps:

  1. Install the MCP server via Smithery (recommended for Claude integration):
npx -y @smithery/cli install @gongrzhe/server-calendar-autoauth-mcp --client claude
  1. Alternatively, run directly with npx when configuring MCP in Claude Desktop:
# In Claude Desktop configuration, add:
# {
#   "mcpServers": {
#     "calendar": {
#       "command": "npx",
#       "args": ["@gongrzhe/server-calendar-autoauth-mcp"]
#     }
#   }
# }
  1. Authentication steps:
  • Prepare Google Cloud OAuth credentials (web or desktop) and store as gcp-oauth.keys.json in your home directory under ~/.calendar-mcp or in the current directory for local auth.
  • Global authentication (recommended):
mkdir -p ~/.calendar-mcp
mv gcp-oauth.keys.json ~/.calendar-mcp/
npx @gongrzhe/server-calendar-autoauth-mcp auth
  • Local authentication:
# Place gcp-oauth.keys.json in the current directory and run:
npx @gongrzhe/server-calendar-autoauth-mcp auth
  1. If you prefer Docker:
# Authentication container run (bind mount the gcp-oauth.keys.json and share credentials)
docker run -i --rm \
  --mount type=bind,source=/path/to/gcp-oauth.keys.json,target=/gcp-oauth.keys.json \
  -v mcp-calendar:/calendar-server \
  -e CALENDAR_OAUTH_PATH=/gcp-oauth.keys.json \
  -e CALENDAR_CREDENTIALS_PATH=/calendar-server/credentials.json \
  -p 3000:3000 \
  mcp/calendar auth
  1. Run and configure in Claude Desktop as shown in the example configuration:
{
  "mcpServers": {
    "calendar": {
      "command": "npx",
      "args": [
        "@gongrzhe/server-calendar-autoauth-mcp"
      ]
    }
  }
}
  1. Ensure your environment variables or paths (CALENDAR_OAUTH_PATH and CALENDAR_CREDENTIALS_PATH) are correctly set to point to the OAuth keys and credentials files.

Additional notes

Tips and common issues:

  • OAuth credentials are stored locally in ~/.calendar-mcp (global) for persistence; keep this folder secure.
  • If port conflicts occur (default server may run on a specific port like 3000), ensure the port is available or configure a different one if supported by your setup.
  • Web application credentials require redirect URIs to include http://localhost:3000/oauth2callback; ensure this is configured in Google Cloud Console.
  • When using Docker, ensure the credentials path inside the container is properly mounted and the CALENDAR_CREDENTIALS_PATH environment variable points to the desired credentials file path inside the container.
  • For best results, document your OAuth file names and locations clearly to avoid confusion between local and global configurations.
  • The server supports both Desktop and Web credentials, so you can choose the flow that best fits your deployment scenario.

Related MCP Servers

Sponsor this space

Reach thousands of developers