Thank you for your interest in contributing to the Google Calendar MCP Server! This document provides guidelines and instructions for contributing to this project.
By participating in this project, you agree to abide by our Code of Conduct:
- Be respectful and inclusive
- Use welcoming and inclusive language
- Be collaborative
- Accept constructive criticism
- Check the issue tracker to avoid duplicate reports
- If no existing issue covers your bug, create a new issue
- Include in your report:
- Clear description of the bug
- Steps to reproduce
- Expected behavior
- Actual behavior
- Environment details (OS, Node.js version, etc.)
- Relevant logs
- Screenshots if applicable
- Check existing issues and pull requests
- Create a new issue with:
- Clear description of the enhancement
- Use cases
- Benefits
- Potential implementation approach
- Any potential impacts on existing functionality
-
Fork the repository
-
Create a new branch:
git checkout -b feature/your-feature-name # or git checkout -b fix/your-fix-name
-
Make your changes following our coding standards
-
Test your changes thoroughly
-
Commit your changes with clear messages:
git commit -m "feat: add new calendar sync feature" # or git commit -m "fix: resolve authentication timeout issue"
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request with:
- Clear description of changes
- Link to related issues
- Screenshots/videos for UI changes
- Updated documentation if needed
- Clone the repository:
git clone https://github.com/your-username/google-calendar-mcp.git
cd google-calendar-mcp
- Install dependencies:
npm install
- Create a test Google Cloud project for development
- Set up your environment variables in
.env
- Build the project:
npm run build
- Use TypeScript strict mode
- Provide clear type definitions
- Avoid
any
types when possible - Use interfaces for object shapes
- Document complex types
- Use 2 spaces for indentation
- Use semicolons
- Use single quotes for strings
- Use template literals for string interpolation
- Add trailing commas in multi-line objects/arrays
- Keep lines under 100 characters
Example:
interface CalendarEvent {
id: string;
summary: string;
startTime: string;
endTime: string;
attendees?: string[];
}
function formatEvent(event: CalendarEvent): string {
return `Event: ${event.summary}
Start: ${event.startTime}
End: ${event.endTime}`;
}
- Add JSDoc comments for functions and classes
- Keep comments current with code changes
- Document non-obvious code behavior
- Include examples for complex functionality
Example:
/**
* Creates a new calendar event with specified parameters.
*
* @param {string} summary - Event title
* @param {string} startTime - ISO string for event start time
* @param {string} endTime - ISO string for event end time
* @param {string[]} [attendees] - Optional list of attendee emails
* @returns {Promise<CalendarEvent>} Created event object
* @throws {Error} If authentication fails or invalid parameters
*/
async function createEvent(
summary: string,
startTime: string,
endTime: string,
attendees?: string[]
): Promise<CalendarEvent> {
// Implementation
}
- Write unit tests for new functionality
- Include integration tests for API interactions
- Test error conditions
- Maintain test coverage
- Use meaningful test descriptions
Example:
describe('Calendar Event Creation', () => {
it('should create an event with valid parameters', async () => {
// Test implementation
});
it('should handle invalid date formats', async () => {
// Test implementation
});
it('should retry on API timeout', async () => {
// Test implementation
});
});
-
Automated checks must pass:
- TypeScript compilation
- Linting
- Tests
- Code coverage
-
Code Review Requirements:
- One approved review required
- All review comments addressed
- Documentation updated
- Tests included
- No merge conflicts
-
Merge Process:
- Squash and merge preferred
- Clear commit message
- Delete branch after merge
- Version numbers follow Semantic Versioning
- Update CHANGELOG.md with changes
- Create a new release in GitHub
- Update documentation if needed
- Notify users of breaking changes
- Check existing documentation
- Ask in GitHub Discussions
- Join our community chat
- Contact maintainers
- Attend community meetings
By contributing, you agree that your contributions will be licensed under the same license as the project (see LICENSE file).
Feel free to open an issue or contact the maintainers if you have any questions about contributing.