Thank you for your interest in contributing! This document provides guidelines for contributing to the project.
Clone the repository
git clone https://github.com/sweetrb/apple-mail-mcp.git
cd apple-mail-mcp
Install dependencies
npm install
Build the project
npm run build
Run tests
npm test
This project uses ESLint and Prettier for code quality and formatting.
# Check for linting issues
npm run lint
# Auto-fix linting issues
npm run lint:fix
# Format code
npm run format
# Check formatting
npm run format:check
All new features should include tests. We use Vitest for testing.
# Run unit tests
npm test
# Run tests in watch mode
npm run test:watch
# Run integration tests (requires macOS with Mail.app configured)
npm run test:integration
# Run all tests (unit + integration)
npm run test:all
src/services/appleMailManager.test.ts (core logic), src/security.test.ts (input validation and security schemas)test/integration.test.ts (live Mail.app interaction)executeAppleScript function since AppleScript only works on macOSsrc/security.test.tsCreate a feature branch
git checkout -b feature/your-feature-name
Make your changes
Run all checks
npm run lint
npm run typecheck
npm test
npm run build
Commit your changes
Push and create a PR
When adding a new MCP tool:
src/index.tssrc/services/appleMailManager.tssrc/types.tssrc/services/appleMailManager.test.tsescapeForAppleScript()console.error() for debuggingOpen an issue for any questions about contributing.