Google Calendar Server With Persistent Auth
БесплатноНе проверенEnables AI assistants to list and create Google Calendar events using natural language, with persistent OAuth authentication via Redis.
Описание
Enables AI assistants to list and create Google Calendar events using natural language, with persistent OAuth authentication via Redis.
README
This project implements a Model Context Protocol (MCP) server for Google Calendar, featuring persistent OAuth 2.0 authentication using Redis. It allows AI assistants (like Claude or Custom Clients) to interact with your Google Calendar.
Features
- Google Calendar Integration: List upcoming events and create new events.
- Persistent Authentication: Uses Redis to store OAuth tokens securely, so you don't need to re-authenticate on every restart.
- FastMCP Framework: Built on top of the modern FastMCP framework.
- Client Implementation: Includes a sample client (
client.py) using OpenAI's GPT-4o to demonstrate interaction.
Supported Tools
list_events: Lists upcoming events from the user's primary calendar. Supports filtering by result count and minimum time.create_event: Creates a new event with a summary, start time, end time, and description.
Prerequisites
Before running this project, ensure you have the following:
- Python 3.12+: This project requires a recent version of Python.
- Redis Server: A running Redis instance is required for token storage.
- Google Cloud Project:
- Enable the Google Calendar API.
- Create OAuth 2.0 Client IDs (Desktop app).
- Scopes: Ensure the client has access to
https://www.googleapis.com/auth/calendar.events. - Redirect URI: If configured for web, ensure
http://localhost:8000/auth/callbackis allowed (FastMCP default). For Desktop/Installed App, this is handled automatically. - Download the JSON credentials or copy the Client ID and Client Secret.
- OpenAI API Key: Required if you want to run the provided
client.pytest script.
Installation
This project manages dependencies using uv (recommended) or you can use pip.
Using uv (Recommended)
- Sync the project environment:
uv sync
Using pip
- Create a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate - Install dependencies:
pip install -e .
Configuration
Copy the example environment file:
cp .env.example .env # On Windows: copy .env.example .envEdit
.envand fill in your credentials:
Please refer .env.example
Docker Support
You can also run the server using Docker.
Build the image:
docker build -t mcp-google-calendar .Run the container (ensure you environment variables are passed):
# Assuming you have a .env file docker run --env-file .env -p 8000:8000 mcp-google-calendarNote: If your Redis is running on the host, use
host.docker.internal(Windows/Mac) or--network="host"(Linux).
Running the Server
Start Redis: Ensure your Redis server is running locally (default port 6379).
Run the MCP Server: Using
uv:uv run server.pyUsing standard python:
python server.pyThe server will start at
http://localhost:8000.
You can also use profiles to maintain separate authentication sessions:
uv run client.py --profile work
uv run client.py --profile personal
uv run client.py --profile user1
uv run client.py --profile user2
Connecting a Client
Option 1: Using the provided Test Client
This project includes a CLI client powered by OpenAI to test the integration.
- Ensure the server is running.
- In a new terminal, run:
uv run client.py # or: python client.py - On first run, it will open your request OAuth authentication. Follow the steps in your browser to log in with your Google account.
- Once authenticated, you can chat with the assistant:
"What is on my calendar for today?" "Schedule a meeting with the team tomorrow at 2 PM."
Option 2: Using Claude Desktop
You can configure Claude Desktop to use this MCP server.
- Locate your Claude Desktop config file (typically
%APPDATA%\Claude\claude_desktop_config.jsonon Windows or~/Library/Application Support/Claude/claude_desktop_config.jsonon macOS). - Add the server configuration:
Note: Replace paths and credentials with your actual values.{ "mcpServers": { "google-calendar": { "command": "uv", "args": ["run", "--directory", "C:/path/to/repo/mcp-auth-google-calendar", "server.py"], "env": { "GOOGLE_CLIENT_ID": "your_client_id", "GOOGLE_CLIENT_SECRET": "your_client_secret" } } } }
Testing
Currently, no automated unit tests are included. The best way to test is using the client.py script as described above.
To run future tests (if added), you would use pytest:
uv run pytest
Установка Google Calendar Server With Persistent Auth
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/mcphub-ai/mcp-auth-google-calendarFAQ
Google Calendar Server With Persistent Auth MCP бесплатный?
Да, Google Calendar Server With Persistent Auth MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Google Calendar Server With Persistent Auth?
Нет, Google Calendar Server With Persistent Auth работает без API-ключей и переменных окружения.
Google Calendar Server With Persistent Auth — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить Google Calendar Server With Persistent Auth в Claude Desktop, Claude Code или Cursor?
Открой Google Calendar Server With Persistent Auth на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
wenb1n-dev/SmartDB_MCP
A universal database MCP server supporting simultaneous connections to multiple databases. It provides tools for database operations, health analysis, SQL optim
автор: wenb1n-devPostgres Server
This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools
автор: madhurprashPostgres
Query your database in natural language
автор: AnthropicPostgreSQL
Read-only database access with schema inspection.
автор: modelcontextprotocolCompare Google Calendar Server With Persistent Auth with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории data
