Skip to content

feat: Add Calendar Groups - Cross-Account Calendar Organization (v0.2.0)#13

Open
sussdorff wants to merge 13 commits intoOmar-V2:mainfrom
cognovis:main
Open

feat: Add Calendar Groups - Cross-Account Calendar Organization (v0.2.0)#13
sussdorff wants to merge 13 commits intoOmar-V2:mainfrom
cognovis:main

Conversation

@sussdorff
Copy link
Copy Markdown

Hi Omar ... I needed the ability to work in calendar groups (as it is possible in fantastical). And as they are not good in exposing the calendar sets .... I just added this function into the MCP server. I tested according to testing-plan.md with Claude Desktop, but haven't gotten into automatically testing this (as I haven't gotten good yet in utilizing claude code as the CLI agent in automated testing of MCP Servers).

Please let me know if you prefer that I keep this development separate, then I'd rename the server for sure.

🎉 Major Feature: Calendar Groups

This PR introduces Calendar Groups - a powerful new feature that allows users to organize calendars from different sources (iCloud, Google, Office365, Exchange) into logical collections for
streamlined management.

✨ What's New

📁 Calendar Groups Feature

  • Cross-Account Support: Group calendars from any source together
  • Persistent Storage: Groups persist between app launches with local JSON storage
  • Natural Language Integration: Use groups in everyday calendar queries
  • Complete CRUD Operations: Full create, read, update, delete support for groups

🛠️ New MCP Tools (8 total)

  • create_calendar_group() - Create new custom groups
  • update_calendar_group() - Modify group membership
  • delete_calendar_group() - Remove custom groups
  • list_calendar_groups() - List all custom groups
  • list_calendars_in_group() - Get calendars within a specific group
  • list_events_by_group() - Get events from all calendars in a group
  • add_calendar_to_group() - Add individual calendars to groups
  • remove_calendar_from_group() - Remove calendars from groups

📊 Enhanced Calendar Management

  • Account-Organized Listing: View calendars grouped by account
  • Default Calendar Highlighting: Easily identify your default calendar
  • Multi-Source Integration: Improved support for calendars from different providers

🏗️ Implementation Highlights

  • Modular Architecture: Clean separation of concerns across 5 components
  • Robust Storage: Atomic JSON operations with corruption recovery
  • Performance Optimized: Efficient group-based event filtering
  • Comprehensive Testing: Full test coverage for all components
  • Backward Compatible: All existing functionality preserved

📝 Documentation & Release

  • Version: Bumped to 0.2.0 reflecting significant new capabilities
  • README: Updated with comprehensive calendar groups documentation
  • Release Notes: Detailed feature documentation
  • Architecture Docs: Technical documentation for maintainers
  • License: Updated with co-copyright attribution

🧪 Testing

All existing tests pass, plus comprehensive new test coverage:

  • Unit tests for each component
  • Integration tests with real calendar data
  • Edge case handling (missing calendars, corrupted files)
  • MCP protocol testing

🔄 Breaking Changes

None - this is purely additive functionality.


Example Usage:
"Create a Work group with my Office365 and Google work calendars"
"What meetings do I have in my Work calendars this week?"
"Add my Project calendar to the Work group"

This transforms mcp-ical into a powerful multi-account calendar management system!

sussdorff and others added 13 commits May 22, 2025 10:52
- Create groups/ directory structure with __init__.py
- Implement GroupStorage class with atomic file I/O operations
- Add JSON persistence with backup and recovery mechanisms
- Support schema migration for future versions
- Include comprehensive unit tests with 100% pass rate
- Atomic write pattern using temp file + rename for safety

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Implement CalendarGroup model with comprehensive validation
- Add GroupsSchema for file structure with version support
- Support JSON serialization/deserialization with datetime handling
- Include name validation, calendar ID deduplication, and sanitization
- Comprehensive unit tests with 100% pass rate covering all validation scenarios
- Pydantic v2 field validators and model validators for robust data integrity

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Create CalendarGroupManager class with full CRUD functionality
- Add group creation, update, delete, and retrieval operations
- Implement calendar management within groups (add/remove)
- Support group renaming and statistics generation
- Include schema caching for performance optimization
- Add comprehensive error handling and validation
- 34 unit tests with 100% pass rate covering all operations including edge cases

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Create GroupCalendarBridge class bridging groups and CalendarManager
- Add event retrieval by group across multiple calendars
- Implement calendar validation and cleanup for groups
- Support name-to-ID resolution for seamless calendar operations
- Add comprehensive group statistics and calendar coverage metrics
- Include error handling for missing/invalid calendars
- 25 unit tests with 100% pass rate covering all integration scenarios

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Create comprehensive MCP tool endpoints for all group operations
- Add 11 user-facing tools: create, update, delete, list groups and calendars
- Support natural language responses with formatted output
- Include event listing by group with unified calendar view
- Add group statistics, validation, and cleanup functionality
- Integrate with existing FastMCP server infrastructure
- 13 workflow tests covering all tool functionality with 100% pass rate
- Update server.py to register group tools on startup

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix JSON storage location to use proper macOS ~/Library/Application Support/
- Simplify test_storage.py by removing overly complex test scenarios
- Replace placeholder calendar validation with real CalendarManager integration
- Remove problematic test_group_tools.py in favor of comprehensive simplified tests
- Update GroupManager to accept CalendarManager for real calendar validation
- Update GroupCalendarBridge to pass CalendarManager to GroupManager
- All 118 tests now pass with improved integration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Creates a comprehensive testing plan for validating the iCal server integration with calendar systems.

The plan details manual testing procedures using a desktop application, future automated testing strategies, and performance/security considerations.
…ult calendar

Improve calendar organization by grouping calendars by their source/account
(iCloud, Exchange, etc.) and marking the default calendar with a star indicator.
This resolves ambiguity when multiple calendars share the same name across
different accounts.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Enhanced convert_datetime to handle NSTaggedDate objects with fallback to timeIntervalSinceReferenceDate
- Fixed Event.from_ekevent to properly convert NSDate objects to Python datetime
- Updated Pydantic models to use FlexibleDateTime for automatic date conversion
- Added comprehensive test suite covering NSTaggedDate scenarios and edge cases
- Improved calendar listing with JSON output and group support
- Removed unused list_calendars_with_sources method

Resolves error: '__NSTaggedDate' object has no attribute 'date' when calling list_events_by_group

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add comprehensive calendar groups documentation to README
- Create structured docs/ with ARCHITECTURE.md and TECHNICAL_NOTES.md
- Update license to include co-copyright for major contributions
- Bump version to 0.2.0 reflecting significant new capabilities
- Add detailed release notes documenting all v0.2.0 features
- Remove completed planning documents (CALENDAR_GROUPS_*.md)

This release transforms mcp-ical into a powerful multi-account calendar
management system with persistent calendar grouping capabilities.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Describes how the collaboration with claude code was done and the steps taken.
- Create comprehensive Alfred setup documentation with step-by-step instructions
- Add Claude icon configuration and multiple instance support details
- Update README.md and install.md to link to new Alfred workflow guide
- Provide alternative to terminal launching while maintaining calendar permissions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Removes `uv` as the dependency management system.

This change involves:
- Deleting the `uv.lock` file
- Adding `uv.lock` to `.gitignore`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant