AI Calendar Assistant
Provides tools for managing Google Calendar events, including listing, creating, updating, deleting events, and checking availability.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ποΈ AI Calendar Assistant
Personal calendar management powered by local LLM (Ollama), Google Calendar API, and Model Context Protocol (MCP)
A lightweight, privacy-first AI calendar assistant that runs entirely on your local machine. Chat with your calendar using natural language, powered by Llama 3.2 running locally via Ollama - completely free, no API costs.
β¨ Features
π€ Local AI - Uses Ollama (llama3.2:3b) running on your machine
π Google Calendar Integration - Full read/write access via OAuth2
π¬ Natural Language - Ask questions in plain English
β‘ Fast - Responses in 1-2 seconds
π Privacy-First - LLM runs locally, only calendar sync requires internet
π 100% Free - No API costs, no subscriptions
π MCP Compatible - Integrates with Claude Desktop and other MCP clients
π¨ Beautiful CLI - Rich terminal interface with color and formatting
Related MCP server: Google Calendar MCP Server
ποΈ Architecture
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MCP Client for Ollama (ollmcp) β
β Terminal UI - Natural Language Interface β
βββββββββββββββββββ¬βββββββββββββββββββββββ¬ββββββββββββββββββββββββ
β β
β (MCP Protocol) β (Ollama API)
β β
βΌ βΌ
ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββ
β Calendar MCP Server β β Ollama β
β (calendar_server.py) β β Llama 3.2 3B β
β β β (Local LLM) β
β Exposes 7 Calendar Tools: β β β
β β’ list_events β β Handles: β
β β’ get_today_events β β β’ Intent parsing β
β β’ create_event β β β’ Natural language β
β β’ search_events β β β’ Response generation β
β β’ update_event β β β’ Tool orchestration β
β β’ delete_event β β β
β β’ check_availability β β β
βββββββββββββββ¬βββββββββββββββββ ββββββββββββββββββββββββββββββ
β
β (Google Calendar API)
β
βΌ
ββββββββββββββββββββββββββββββββ
β GoogleCalendarClient β
β β’ OAuth2 Authentication β
β β’ Event CRUD Operations β
βββββββββββββββ¬βββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββ
β Google Calendar β
β (Cloud Storage) β
ββββββββββββββββββββββββββββββββFlow:
You type natural language β MCP Client (ollmcp)
Ollama (Llama 3.2) understands intent and determines which MCP tools to call
MCP Client calls appropriate calendar tools via MCP protocol
Calendar MCP Server executes Google Calendar operations
Response flows back through MCP β Ollama β formatted natural language response
π Quick Start
Prerequisites
Python 3.8+
macOS, Linux, or Windows
Google account
4GB RAM (for local LLM)
Installation
Install Ollama
# macOS brew install ollama # Start Ollama service ollama serve # Pull the model (in a new terminal) ollama pull llama3.2:3bClone & Setup
git clone https://github.com/othmane-zizi-pro/ai-calendar-assistant.git cd ai-calendar-assistant pip install -r requirements.txtGet Google Calendar Credentials
Go to Google Cloud Console
Create a new project
Enable "Google Calendar API"
Create OAuth 2.0 credentials (Desktop app)
Download JSON and save as
credentials.json
Install MCP Client for Ollama
pip install mcp-client-for-ollamaRun - Start Natural Language Calendar Chat
# First run - authenticate with Google (this will open browser) python run_calendar_server.py # Test server once, then Ctrl+C # Start interactive MCP chat with Ollama ollmcp --servers-json ollmcp_config.json --model llama3.2:3b
π‘ Usage
Interactive MCP-Powered Chat
# Start the MCP client with Ollama
ollmcp --servers-json ollmcp_config.json --model llama3.2:3bExample conversation:
You: What's on my calendar today?
AI: Let me check your calendar for today...
[Calls get_today_events tool via MCP]
You have 3 events scheduled today:
1. Team Standup at 9:00 AM
2. Client Meeting at 2:00 PM
3. Gym Session at 6:00 PM
You: Create a meeting tomorrow at 3pm for 1 hour called "Project Review"
AI: I'll create that event for you...
[Calls create_event tool via MCP]
β
Done! Event "Project Review" scheduled for tomorrow 3:00 PM - 4:00 PM
You: Am I free on Friday afternoon?
AI: Let me check your availability...
[Calls check_availability tool via MCP]
Yes, you're free after 2:00 PM on Friday!Available MCP Tools
The calendar MCP server exposes these tools (automatically used by Ollama through the MCP client):
list_events - Get upcoming calendar events
get_today_events - Retrieve today's schedule
create_event - Create new calendar event
search_events - Search events by keyword
update_event - Modify existing event
delete_event - Remove event from calendar
check_availability - Check if time slot is free
Alternative: Use with Claude Desktop
If you prefer using Claude Desktop instead of the local Ollama setup:
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"calendar": {
"command": "python3",
"args": ["run_calendar_server.py"],
"cwd": "/path/to/ai-calendar-assistant"
}
}
}Restart Claude Desktop - now Claude can access your calendar via MCP!
π οΈ Technical Stack
Core Technologies
Component | Technology | Purpose |
MCP Client | mcp-client-for-ollama (ollmcp) | Bridges Ollama with MCP servers, terminal UI |
Local LLM | Ollama (Llama 3.2 3B) | Natural language understanding, intent parsing, tool orchestration |
MCP Server | Model Context Protocol SDK | Exposes calendar tools via MCP protocol |
Calendar API | Google Calendar API v3 | Event management, OAuth2 authentication |
NLP | LangChain | Prompt engineering, chain-of-thought |
Key Features Implementation
1. MCP Server - Tool Exposure
# Expose calendar tools via MCP protocol
@app.list_tools()
async def list_tools():
return [
Tool(name="list_events", description="List upcoming calendar events", ...),
Tool(name="create_event", description="Create a new calendar event", ...),
Tool(name="search_events", description="Search events by keyword", ...),
Tool(name="get_today_events", ...),
Tool(name="update_event", ...),
Tool(name="delete_event", ...),
Tool(name="check_availability", ...)
]
@app.call_tool()
async def call_tool(name: str, arguments: Any):
client = get_calendar_client()
if name == "list_events":
events = client.list_events(...)
return [TextContent(type="text", text=formatted_output)]2. OAuth2 Authentication
# Google Calendar OAuth2 flow
flow = InstalledAppFlow.from_client_secrets_file(
'credentials.json',
SCOPES=['https://www.googleapis.com/auth/calendar']
)
creds = flow.run_local_server(port=0)3. MCP + Ollama Integration
# ollmcp connects Ollama to MCP servers
ollmcp --servers-json ollmcp_config.json --model llama3.2:3b
# User types: "What's on my calendar today?"
# β Ollama (Llama 3.2) understands intent
# β Calls get_today_events tool via MCP protocol
# β Calendar server executes Google Calendar API call
# β Response formatted and returned via MCP
# β Ollama generates natural language responseπ Performance
Metric | Value |
Response Time | 1-2 seconds (local LLM) |
Memory Usage | ~4GB RAM (Llama 3.2 3B) |
API Calls | Only for calendar sync (free tier: 1M requests/day) |
Offline Capability | LLM works offline, calendar requires internet |
Cost | $0/month (100% free) |
Model Comparison
Model | Size | RAM | Speed | Quality | Use Case |
llama3.2:3b | 2GB | 4GB | β‘β‘β‘ | ββββ | Recommended |
gemma:2b | 1.4GB | 3GB | β‘β‘β‘β‘ | βββ | Faster, lower RAM |
phi3:mini | 2.3GB | 4GB | β‘β‘β‘ | ββββ | Better code understanding |
mistral:7b | 4.1GB | 8GB | β‘β‘ | βββββ | Highest quality |
π§ Project Structure
ai-calendar-assistant/
βββ calendar_assistant/
β βββ mcp_server/
β β βββ __init__.py
β β βββ calendar_server.py # MCP server implementation
β βββ llm/
β β βββ __init__.py
β β βββ local_assistant.py # Ollama integration
β βββ utils/
β β βββ __init__.py
β β βββ google_calendar.py # Google Calendar API wrapper
β βββ __init__.py
β βββ cli.py # CLI interface
βββ calendar_assistant.py # Main entry point
βββ requirements.txt # Dependencies
βββ verify_setup.py # Setup verification script
βββ .env.example # Environment configuration template
βββ .gitignore # Git ignore rules
βββ README.md # This file
βββ QUICKSTART.md # 5-minute setup guide
βββ SETUP.md # Detailed setup instructions
βββ LOCAL_LLM_SETUP.md # Ollama installation guideπ― MCP Tools Available
When integrated with Claude Desktop, the following tools are exposed:
Tool | Description | Parameters |
| Get upcoming calendar events |
|
| Retrieve today's schedule | None |
| Create a new calendar event |
|
| Search events by keyword |
|
| Modify existing event |
|
| Remove event from calendar |
|
| Check if time slot is free |
|
π Privacy & Security
β Local LLM - All AI processing happens on your machine
β OAuth2 - Secure Google authentication
β No Cloud LLM APIs - No data sent to OpenAI/Anthropic
β Credentials Protected -
credentials.jsonandtoken.picklein.gitignoreβ Open Source - Full transparency, audit the code yourself
Data Flow:
Your query β Local LLM (Ollama) β Intent extracted
Calendar operation β Google Calendar API (OAuth2)
Response β Local LLM β Natural language response
π Documentation
Quick Start Guide - Get running in 5 minutes
Setup Guide - Detailed installation instructions
Local LLM Setup - Ollama configuration
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/AmazingFeature)Commit your changes (
git commit -m 'Add some AmazingFeature')Push to the branch (
git push origin feature/AmazingFeature)Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
Ollama - Local LLM runtime
Model Context Protocol - AI integration framework
Google Calendar API - Calendar integration
LangChain - LLM orchestration
Rich - Beautiful terminal output
π§ Contact
Othmane Zizi - othmane.zizi.pro@gmail.com
Project Link: https://github.com/othmane-zizi-pro/ai-calendar-assistant
β Star this repo if you found it helpful!
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
Calendar API for AI agents: events, availability, Google/Microsoft setup, scheduling, and iCal.
Read and change Google Calendar and Outlook events, find free time and add meeting links.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceEnables ChatGPT to interact with Google Calendar through a remote MCP server. Provides tools to list, create, update, and delete calendar events with OAuth authentication.-
- FlicenseNot gradedqualityDmaintenanceIntegrates Google Calendar with AI assistants via MCP, enabling calendar listing and event CRUD operations.-
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Google Calendar through a unified MCP API for managing events, calendars, and related tools.MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to manage Google Calendar events and Google Tasks through a set of MCP tools.25 npm2MIT