Thank you for your interest in contributing to the Calendar MCP Server! This document provides guidelines and information for contributors.
- macOS 13.0 or later
- Swift 5.9 or later
- Xcode Command Line Tools
- Access to macOS Calendar (EventKit permissions)
-
Clone the repository
git clone https://github.com/alexchambers/calendar-mcp.git cd calendar-mcp -
Build the project
swift build
-
Run tests
swift test -
Build for release
swift build -c release
├── Sources/CalendarMCP/
│ └── SimpleServer.swift # Main MCP server implementation
├── Tests/CalendarMCPTests/
│ └── CalendarMCPTests.swift # Test cases
├── Package.swift # Swift Package Manager configuration
├── README.md # Project documentation
├── build.sh # Convenience build script
└── .github/ # GitHub templates and workflows
- Follow Swift API Design Guidelines
- Use descriptive variable and function names
- Keep functions focused and small
- Add comments for complex logic
- Use
// MARK:to organize code sections
- All MCP server logic is in
SimpleServer.swift - Keep the single-file architecture for simplicity
- Group related functions together
- Use private functions for internal logic
- Always check calendar access permissions
- Provide clear, user-friendly error messages
- Handle EventKit errors gracefully
- Log errors to stderr for debugging
- Check existing issues - Look for related issues or feature requests
- Create an issue - For significant changes, create an issue first to discuss the approach
- Fork the repository - Create your own fork to work in
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Write clean, readable code
- Add comments for complex logic
- Follow the existing code style
-
Test your changes
swift test swift build -c release -
Update documentation - Update README.md if you add new features
-
Commit your changes
git add . git commit -m "Add feature: brief description"
-
Push to your fork
git push origin feature/your-feature-name
-
Create a Pull Request
- Use the provided PR template
- Describe your changes clearly
- Include testing instructions
- Reference any related issues
- Fix calendar access issues
- Resolve date/time parsing problems
- Handle EventKit API edge cases
- Additional calendar operations
- Enhanced search capabilities
- Better error reporting
- Performance improvements
- Improve README.md
- Add usage examples
- Update tool documentation
- Fix typos and clarity issues
- Add test cases for new features
- Improve test coverage
- Add integration tests
Since this is a calendar integration:
-
Test with different calendar types
- Local calendars
- iCloud calendars
- Exchange calendars
- Subscribed calendars
-
Test edge cases
- All-day events
- Recurring events
- Events with attachments
- Events with attendees
-
Test permissions
- First-time calendar access
- Denied permissions
- Revoked permissions
- Add unit tests for new functions
- Test error conditions
- Test date/time parsing logic
- Mock EventKit when possible
- Always check authorization status
- Request permissions gracefully
- Handle both macOS 14+ and earlier versions
- Not all calendars allow modifications
- Some calendars are read-only
- Handle subscription calendars appropriately
- Some recurring events can't be modified
- Attendee information may be read-only
- Alarms have specific requirements
- Use
log()function for debugging output - Logs go to stderr and appear in Claude Desktop
- Calendar access denied: Check System Settings > Privacy & Security > Calendars
- Events not appearing: Verify date range and calendar selection
- Build failures: Ensure Xcode Command Line Tools are installed
- Follow Semantic Versioning
- Update version in
Package.swiftand README.md - Create git tags for releases
- All tests pass
- Documentation is updated
- Version numbers are bumped
- Release notes are prepared
- Binary builds successfully
- Issues: Create a GitHub issue for bugs or feature requests
- Discussions: Use GitHub Discussions for questions
- Email: Contact the maintainer for sensitive issues
- Be respectful and inclusive
- Focus on constructive feedback
- Help newcomers learn
- Maintain a welcoming environment
Thank you for contributing to making Calendar MCP Server better!