Thank you for your interest in contributing to payments-mcp! This guide will help you get started.
src/
├── cli.ts # CLI entry point with Commander.js
├── installer.ts # Main orchestrator class
├── types/
│ └── index.ts # TypeScript interfaces and types
├── services/ # Business logic layer
│ ├── versionService.ts # Version checking and comparison
│ ├── downloadService.ts # Package download and extraction
│ ├── installService.ts # npm/electron installation
│ └── configService.ts # MCP client configuration
└── utils/ # Utility layer
├── logger.ts # Colored terminal output
├── httpUtils.ts # HTTP client with retry logic
├── fileUtils.ts # Safe file operations
└── pathUtils.ts # Cross-platform path utilities
- Node.js 22.0.0 or higher
- npm (included with Node.js)
- Git
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/payments-mcp.git cd payments-mcp -
Install dependencies:
npm install
-
Build the project:
npm run build
-
Test locally:
npm run dev
-
Create a Feature Branch
git checkout -b feature/your-feature-name
-
Make Your Changes
- Write clear, concise commit messages
- Add tests for new functionality
- Update documentation as needed
-
Test Your Changes
npm test npm run lint npm run build -
Commit Your Changes
- All commits must be signed (see Setting up Signed Commits)
git add . git commit -S -m "feat: add new feature"
-
Push to Your Fork
git push origin feature/your-feature-name
-
Create a Pull Request
- Go to the GitHub repository
- Click "New Pull Request"
- Fill out the pull request template
- Request review from maintainers
Signed commits are required for all contributions. Follow these steps:
-
Generate a GPG key (if you don't have one):
gpg --full-generate-key
-
List your GPG keys:
gpg --list-secret-keys --keyid-format LONG
-
Export your public key:
gpg --armor --export YOUR_KEY_ID
-
Add the GPG key to your GitHub account:
- Go to GitHub Settings > SSH and GPG keys
- Click "New GPG key"
- Paste your public key
-
Configure Git to use your GPG key:
git config --global user.signingkey YOUR_KEY_ID git config --global commit.gpgsign true
For more details, see GitHub's documentation on signing commits.
This project uses a standard tag-based release workflow. To publish a new version:
Use npm's built-in version command to update package.json and create a git tag:
# For bug fixes (1.0.0 → 1.0.1)
npm version patch
# For new features (1.0.0 → 1.1.0)
npm version minor
# For breaking changes (1.0.0 → 2.0.0)
npm version majorThis automatically:
- Updates
package.jsonandpackage-lock.json - Creates a git commit with the version change
- Creates a git tag (e.g.,
v1.0.1)
git push && git push --tagsOnce the tag is pushed, the GitHub Actions workflow will automatically:
- Run tests and linting
- Build the project
- Verify the version matches the tag
- Publish to NPM with provenance
Note: The workflow only triggers on tags matching the pattern v*.*.* (e.g., v1.0.0, v2.1.3).
- Use TypeScript for all new code
- Follow existing code style and patterns
- Use proper type definitions
- Avoid
anytypes when possible
- Write unit tests for new functionality
- Maintain or improve test coverage
- Use Jest for testing framework
- Test files should be in
__tests__directories
- Use descriptive error messages
- Handle edge cases appropriately
- Follow the existing error handling patterns
- Use the provided Logger utility
- Include appropriate log levels (info, debug, error)
- Provide helpful debugging information
The project follows a layered architecture:
- CLI Layer (
cli.ts) - Command-line interface - Orchestrator (
installer.ts) - Coordinates installation workflow - Services Layer (
src/services/) - Business logic - Utilities Layer (
src/utils/) - Foundational functionality
See the main README for detailed architecture documentation.
Releases are handled by maintainers through GitHub Actions workflows:
- Dry Run: Test the release process
- Production Deploy: Publish to npm and create GitHub release
When reporting issues:
- Search existing issues first to avoid duplicates
- Use the issue template if available
- Provide detailed information:
- Node.js version
- Operating system
- Steps to reproduce
- Expected vs actual behavior
- Error messages or logs
- Documentation: Check the README and service documentation
- Issues: Create a GitHub issue for bugs or feature requests
- Security: Use our security policy for vulnerability reports
This project follows the Coinbase Code of Conduct. Please be respectful and constructive in all interactions.
By contributing to payments-mcp, you agree that your contributions will be licensed under the Apache-2.0 License.