|
| 1 | +# Contributing to MCP DevTools |
| 2 | + |
| 3 | +Thank you for your interest in contributing to MCP DevTools! This document provides guidelines and instructions for contributing to this project. |
| 4 | + |
| 5 | +## Table of Contents |
| 6 | + |
| 7 | +- [Code of Conduct](#code-of-conduct) |
| 8 | +- [Getting Started](#getting-started) |
| 9 | +- [Development Workflow](#development-workflow) |
| 10 | +- [Pull Request Process](#pull-request-process) |
| 11 | +- [Coding Standards](#coding-standards) |
| 12 | +- [Commit Guidelines](#commit-guidelines) |
| 13 | +- [Testing](#testing) |
| 14 | +- [Documentation](#documentation) |
| 15 | +- [Release Process](#release-process) |
| 16 | + |
| 17 | +## Code of Conduct |
| 18 | + |
| 19 | +By participating in this project, you are expected to uphold our Code of Conduct: |
| 20 | + |
| 21 | +- Be respectful and inclusive |
| 22 | +- Use welcoming and inclusive language |
| 23 | +- Be collaborative and constructive |
| 24 | +- Focus on what is best for the community |
| 25 | +- Show empathy towards other community members |
| 26 | + |
| 27 | +## Getting Started |
| 28 | + |
| 29 | +### Prerequisites |
| 30 | + |
| 31 | +- [Node.js](https://nodejs.org/) (v14 or later) |
| 32 | +- [pnpm](https://pnpm.io/) for package management |
| 33 | + |
| 34 | +### Setup |
| 35 | + |
| 36 | +1. Fork the repository on GitHub |
| 37 | +2. Clone your fork locally: |
| 38 | + ```bash |
| 39 | + git clone https://github.com/YOUR-USERNAME/mcp-devtools.git |
| 40 | + cd mcp-devtools |
| 41 | + ``` |
| 42 | +3. Install dependencies: |
| 43 | + ```bash |
| 44 | + pnpm install |
| 45 | + ``` |
| 46 | +4. Build the packages: |
| 47 | + ```bash |
| 48 | + pnpm build |
| 49 | + ``` |
| 50 | + |
| 51 | +## Development Workflow |
| 52 | + |
| 53 | +1. Create a new branch for your feature or bugfix: |
| 54 | + ```bash |
| 55 | + git checkout -b feature/your-feature-name |
| 56 | + ``` |
| 57 | +2. Make your changes, following the [coding standards](#coding-standards) |
| 58 | + |
| 59 | +3. For development with auto-rebuild: |
| 60 | + |
| 61 | + ```bash |
| 62 | + pnpm dev |
| 63 | + ``` |
| 64 | + |
| 65 | +4. Test your changes: |
| 66 | + |
| 67 | + ```bash |
| 68 | + pnpm test |
| 69 | + ``` |
| 70 | + |
| 71 | +5. Lint your code: |
| 72 | + |
| 73 | + ```bash |
| 74 | + pnpm lint |
| 75 | + ``` |
| 76 | + |
| 77 | +6. Commit your changes following the [commit guidelines](#commit-guidelines) |
| 78 | + |
| 79 | +## Pull Request Process |
| 80 | + |
| 81 | +1. Update the README.md and documentation with details of changes, if applicable |
| 82 | +2. Ensure all tests pass and code linting is clean |
| 83 | +3. Submit a pull request to the `main` branch of the original repository |
| 84 | +4. The maintainers will review your PR and provide feedback |
| 85 | +5. Once approved, your PR will be merged |
| 86 | + |
| 87 | +## Coding Standards |
| 88 | + |
| 89 | +- Follow the existing code style |
| 90 | +- Use TypeScript for all new code |
| 91 | +- Ensure code is properly typed |
| 92 | +- Follow the principle of [clean code](https://github.com/ryanmcdermott/clean-code-javascript) |
| 93 | +- Use meaningful variable and function names |
| 94 | +- Write comments for non-obvious code |
| 95 | +- Keep functions small and focused on a single responsibility |
| 96 | + |
| 97 | +### TypeScript Style Guide |
| 98 | + |
| 99 | +- Use interfaces for object types |
| 100 | +- Use proper access modifiers for class members |
| 101 | +- Avoid using `any` type where possible |
| 102 | +- Use arrow functions for callbacks |
| 103 | +- Use async/await instead of Promise chains when appropriate |
| 104 | + |
| 105 | +## Commit Guidelines |
| 106 | + |
| 107 | +This project uses [Conventional Commits](https://www.conventionalcommits.org/) to automate versioning and changelog generation. Please format your commit messages following this pattern: |
| 108 | + |
| 109 | +``` |
| 110 | +<type>[optional scope]: <description> |
| 111 | +
|
| 112 | +[optional body] |
| 113 | +
|
| 114 | +[optional footer(s)] |
| 115 | +``` |
| 116 | + |
| 117 | +Types: |
| 118 | + |
| 119 | +- `feat`: A new feature |
| 120 | +- `fix`: A bug fix |
| 121 | +- `docs`: Documentation changes |
| 122 | +- `style`: Changes that don't affect the code's meaning (formatting, etc.) |
| 123 | +- `refactor`: Code changes that neither fix bugs nor add features |
| 124 | +- `perf`: Performance improvements |
| 125 | +- `test`: Adding or fixing tests |
| 126 | +- `chore`: Changes to the build process or auxiliary tools |
| 127 | + |
| 128 | +Examples: |
| 129 | + |
| 130 | +``` |
| 131 | +feat(jira): add comment creation endpoint |
| 132 | +fix(http-client): resolve timeout issue |
| 133 | +docs: update README with new setup instructions |
| 134 | +``` |
| 135 | + |
| 136 | +Breaking changes should be indicated by adding an exclamation mark after the type/scope and describing the breaking change in the body of the commit message: |
| 137 | + |
| 138 | +``` |
| 139 | +feat!: redesign http-client API |
| 140 | +
|
| 141 | +BREAKING CHANGE: The http-client API has been completely redesigned to improve usability. |
| 142 | +``` |
| 143 | + |
| 144 | +## Testing |
| 145 | + |
| 146 | +- Write tests for all new features and bug fixes |
| 147 | +- Ensure all existing tests pass before submitting a PR |
| 148 | +- Follow the existing testing patterns in the codebase |
| 149 | +- Aim for high test coverage, especially for critical functionality |
| 150 | + |
| 151 | +To run tests: |
| 152 | + |
| 153 | +```bash |
| 154 | +# Run all tests |
| 155 | +pnpm test |
| 156 | + |
| 157 | +# Run specific tests |
| 158 | +pnpm test -- --grep="pattern" |
| 159 | +``` |
| 160 | + |
| 161 | +## Documentation |
| 162 | + |
| 163 | +- Update documentation for any changed functionality |
| 164 | +- Document all public APIs |
| 165 | +- Ensure README.md is kept up-to-date |
| 166 | +- Add JSDoc comments to functions and classes |
| 167 | +- Include code examples where appropriate |
| 168 | + |
| 169 | +## Release Process |
| 170 | + |
| 171 | +This repository is set up with automated release management using release-please and GitHub Actions for publishing packages to npmjs.org. |
| 172 | + |
| 173 | +### Beta Status |
| 174 | + |
| 175 | +All published packages are currently in beta status (0.x.x versions) and use the `beta` npm tag. During this phase: |
| 176 | + |
| 177 | +- Breaking changes may occur in minor version updates |
| 178 | +- Install the packages using: `npm install @mcp-devtools/package-name@beta` |
| 179 | +- When the project reaches stability, we will release version 1.0.0 |
| 180 | + |
| 181 | +## Need Help? |
| 182 | + |
| 183 | +If you need help with contributing, please: |
| 184 | + |
| 185 | +- Check the existing [issues](https://github.com/modelcontextprotocol/mcp-devtools/issues) on GitHub |
| 186 | +- Open a new issue if your question isn't already addressed |
| 187 | +- Reach out to the maintainers through the project's communication channels |
| 188 | + |
| 189 | +Thank you for contributing to MCP DevTools! |
0 commit comments