Documentation
Daily Agenda from Google Calendar
A simple Go program that fetches and displays your daily agenda from Google Calendar.
Prerequisites
This project uses Task for task automation. Install it first:
# macOS
brew install go-task/tap/go-task
# Linux
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
# Windows
choco install go-task
# Or install via Go
go install github.com/go-task/task/v3/cmd/task@latestSetup Instructions
1. Enable Google Calendar API
1. Go to the Google Cloud Console
2. Create a new project or select an existing one
3. Enable the Google Calendar API:
- Go to "APIs & Services" > "Library"
- Search for "Google Calendar API"
- Click on it and press "Enable"
2. Create Credentials
1. Go to "APIs & Services" > "Credentials"
2. Click "Create Credentials" > "OAuth client ID"
3. If prompted, configure the OAuth consent screen first:
- Choose "External" user type
- Fill in the required information (app name, user support email, developer contact)
- Add your email to test users
4. For Application type, choose "Desktop application"
5. Give it a name (e.g., "Daily Agenda App")
6. Important: Add http://localhost:8080 to the "Authorized redirect URIs"
7. Download the JSON file and save it as credentials.json in this directory
3. Install Dependencies
task mod-tidy4. Build the Application
task buildUsage
The program supports 2 modes:
Text Mode (Display Calendar Agenda)
Display today's agenda:
task run-text
# or directly: ./agenda-mcp textDisplay agenda for a specific date:
./agenda-mcp text 2024-12-25The date must be in YYYY-MM-DD format. If no date is provided, today's agenda is displayed.
MCP Server Mode
task run-mcpOn first run (auth mode):
1. The program will automatically open your browser (or show you a URL if it can't)
2. Sign in with your Google account
3. Grant permission to read your calendar
4. The authorization will complete automatically - you'll see a success page
5. Your credentials are saved for future runs
After authentication, you can use task run-test to display your agenda or task run-mcp to run as an MCP server.
Available Tasks
Run task --list to see all available tasks:
task build- Build the local binarytask clean- Clean build artifactstask mod-tidy- Tidy and verify go modulestask run-text- Show today's agenda in the command linetask run-mcp- Start MCP servertask inspector- Run the npx MCP inspector
MCP Inspector
For debugging and testing the MCP server, you can use the MCP inspector:
task inspectorThis will start the MCP inspector at http://localhost:8080 for testing the MCP server functionality.
Alternative: Direct Go Commands
If you prefer not to use Task, you can run the commands directly:
# Install dependencies
go mod tidy
# Run modes directly
go run main.go text # Show today's agenda
go run main.go text 2024-12-25 # Show agenda for specific date
go run main.go mcp # Start MCP serverFeatures
- 📅 Shows today's events in chronological order
- 🕐 Displays event times (or "All day" for full-day events)
- 🎨 Shows event colors with your actual category names (Focus Time, Internal Group Meetings, External Meetings, Personal, etc.)
- 📍 Shows event locations if available
- 📝 Displays event descriptions (truncated to 100 characters)
- 👥 Lists attendees with their response status (✅ accepted, ❌ declined, ❓ tentative, ⏳ pending)
- 👁️ Shows event visibility settings
- ⏱️ Displays transparency settings (busy/free)
- 🎉 Friendly message when no events are scheduled
- 🔌 MCP Server: Exposes calendar data via Model Context Protocol for integration with LLM applications
MCP Server Mode
When run in MCP mode (task run-mcp), the program acts as a Model Context Protocol server that can be integrated with LLM applications like Claude, providing two calendar tools:
Available MCP Tools
1. **get_todays_agenda** - Get today's calendar agenda from Google Calendar
2. **get_agenda_for_date** - Get calendar agenda for a specific date (YYYY-MM-DD format)
MCP Integration
Add this to your MCP client configuration:
{
"mcpServers": {
"google-calendar": {
"command": "/path/to/your/agenda-mcp",
"args": ["mcp"],
"env": {
"client_id": "your-google-oauth-client-id",
"project_id": "your-google-project-id",
"client_secret": "your-google-oauth-client-secret"
}
}
}
}Note: Replace /path/to/your/agenda-mcp with the actual full path to your built binary, and set the environment variables with your Google OAuth credentials from the credentials.json file.
This allows LLM applications to:
- Fetch your daily Google Calendar agenda using the
get_todays_agendatool - Get calendar events for any specific date using the
get_agenda_for_datetool with a date parameter (e.g., "2024-12-25")
Security Notes
- Keep
credentials.jsonandtoken.jsonprivate - Don't commit these files to version control
- The program only requests read-only access to your calendar
Similar MCP
Based on tags & features
Trending MCP
Most active this week