|
| 1 | +# Contributing to MCP Protocol Validator |
| 2 | + |
| 3 | +Thank you for considering contributing to the MCP Protocol Validator! This document provides guidelines and instructions for contributing to this project. |
| 4 | + |
| 5 | +## Code of Conduct |
| 6 | + |
| 7 | +Please be respectful and considerate of others when contributing to this project. Any form of harassment or disrespectful behavior will not be tolerated. |
| 8 | + |
| 9 | +## How to Contribute |
| 10 | + |
| 11 | +### Reporting Issues |
| 12 | + |
| 13 | +If you find a bug or have a suggestion for improvement: |
| 14 | + |
| 15 | +1. Check if the issue already exists in the [GitHub Issues](https://github.com/your-username/mcp-protocol-validator/issues) |
| 16 | +2. If not, create a new issue using the appropriate template |
| 17 | +3. Provide as much detail as possible, including steps to reproduce, expected behavior, and your environment |
| 18 | + |
| 19 | +### Submitting Changes |
| 20 | + |
| 21 | +1. Fork the repository |
| 22 | +2. Create a new branch for your changes (`git checkout -b feature/your-feature-name`) |
| 23 | +3. Make your changes |
| 24 | +4. Run tests to ensure your changes don't break existing functionality |
| 25 | +5. Commit your changes with a descriptive commit message |
| 26 | +6. Push your branch to your fork |
| 27 | +7. Submit a pull request to the main repository |
| 28 | + |
| 29 | +### Pull Request Process |
| 30 | + |
| 31 | +1. Ensure your code follows the project's coding style |
| 32 | +2. Update documentation as necessary |
| 33 | +3. Include tests for new functionality |
| 34 | +4. Link any relevant issues in your pull request description |
| 35 | +5. Your pull request will be reviewed by maintainers who may request changes |
| 36 | + |
| 37 | +## Development Setup |
| 38 | + |
| 39 | +1. Clone the repository |
| 40 | +2. Create a virtual environment: `python -m venv .venv` |
| 41 | +3. Activate the virtual environment: |
| 42 | + - Windows: `.venv\Scripts\activate` |
| 43 | + - Unix/MacOS: `source .venv/bin/activate` |
| 44 | +4. Install dependencies: `pip install -r requirements.txt` |
| 45 | +5. Run tests: `pytest` |
| 46 | + |
| 47 | +## Testing |
| 48 | + |
| 49 | +All changes should include appropriate tests: |
| 50 | + |
| 51 | +- Unit tests for utility functions |
| 52 | +- Integration tests for protocol handling |
| 53 | +- End-to-end tests for server interaction |
| 54 | + |
| 55 | +Run the test suite with `pytest` before submitting changes. |
| 56 | + |
| 57 | +## Adding New Features |
| 58 | + |
| 59 | +### Supporting New Protocol Versions |
| 60 | + |
| 61 | +To add support for a new MCP protocol version: |
| 62 | + |
| 63 | +1. Create a new protocol adapter in `mcp_testing/protocols/` |
| 64 | +2. Update the test cases to include tests for the new protocol version |
| 65 | +3. Update the server implementations to support the new protocol |
| 66 | + |
| 67 | +### Adding New Transport Mechanisms |
| 68 | + |
| 69 | +To add support for a new transport mechanism: |
| 70 | + |
| 71 | +1. Create a new transport adapter in `mcp_testing/transports/` |
| 72 | +2. Implement the required interface methods |
| 73 | +3. Add tests for the new transport mechanism |
| 74 | + |
| 75 | +## Style Guide |
| 76 | + |
| 77 | +- Follow PEP 8 for Python code |
| 78 | +- Use descriptive variable names |
| 79 | +- Include docstrings for all modules, classes, and functions |
| 80 | +- Keep functions small and focused on a single responsibility |
| 81 | + |
| 82 | +## License |
| 83 | + |
| 84 | +By contributing to this project, you agree that your contributions will be licensed under the project's AGPL-3.0 license. |
0 commit comments