|
1 | | -# Contributing to MCP Protocol Validator |
| 1 | +# Contributing to MCP Validator |
2 | 2 |
|
3 | | -Thank you for considering contributing to the MCP Protocol Validator! This document provides guidelines and instructions for contributing to this project. |
| 3 | +Thank you for your interest in contributing to the MCP Validator project! This guide will help you get started with the development environment and understand our workflow. |
4 | 4 |
|
5 | | -## Code of Conduct |
| 5 | +## Getting Started |
6 | 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. |
| 7 | +1. **Clone the repository** |
| 8 | + ```bash |
| 9 | + git clone https://github.com/yourusername/mcp-validator.git |
| 10 | + cd mcp-validator |
| 11 | + ``` |
8 | 12 |
|
9 | | -## How to Contribute |
| 13 | +2. **Set up a virtual environment** |
| 14 | + ```bash |
| 15 | + python -m venv .venv |
| 16 | + source .venv/bin/activate # On Windows: .venv\Scripts\activate |
| 17 | + pip install -r requirements.txt |
| 18 | + ``` |
10 | 19 |
|
11 | | -### Reporting Issues |
| 20 | +3. **Explore the codebase** |
| 21 | + - See `README.md` for an overview |
| 22 | + - Check `test_procedures.md` for how to run tests |
| 23 | + - Review `report.md` for the current state of the project |
12 | 24 |
|
13 | | -If you find a bug or have a suggestion for improvement: |
| 25 | +## Repository Structure |
14 | 26 |
|
15 | | -1. Check if the issue already exists in the [GitHub Issues](https://github.com/Janix-ai/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 |
| 27 | +- `mcp_testing/`: Core testing framework |
| 28 | + - `protocols/`: Protocol version adapters |
| 29 | + - `transports/`: Transport adapters (HTTP, STDIO) |
| 30 | + - `scripts/`: Test scripts and utilities |
| 31 | + - `utils/`: Shared utilities |
18 | 32 |
|
19 | | -### Submitting Changes |
| 33 | +- `ref_stdio_server/`: Reference STDIO server implementations |
| 34 | + - `stdio_server_2024_11_05.py`: 2024-11-05 protocol version |
| 35 | + - `stdio_server_2025_03_26.py`: 2025-03-26 protocol version |
20 | 36 |
|
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 |
| 37 | +- `ref_http_server/`: HTTP server with SSE transport |
| 38 | + - `fastmcp_server.py`: Main server implementation |
28 | 39 |
|
29 | | -### Pull Request Process |
| 40 | +- `reports/`: Generated test reports |
| 41 | +- `schema/`: JSON schema definitions |
| 42 | +- `archive/`: Deprecated code (kept for reference) |
30 | 43 |
|
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 |
| 44 | +## Workflow |
36 | 45 |
|
37 | | -## Development Setup |
| 46 | +1. **Check the TODO list** |
| 47 | + - See `TODO.md` for current tasks and priorities |
38 | 48 |
|
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` |
| 49 | +2. **Create a feature branch** |
| 50 | + ```bash |
| 51 | + git checkout -b feature/your-feature-name |
| 52 | + ``` |
46 | 53 |
|
47 | | -## Testing |
| 54 | +3. **Develop and test** |
| 55 | + - Follow the test procedures in `test_procedures.md` |
| 56 | + - Ensure all tests pass before submitting a PR |
48 | 57 |
|
49 | | -All changes should include appropriate tests: |
| 58 | +4. **Submit a pull request** |
| 59 | + - Include a clear description of your changes |
| 60 | + - Reference any related issues |
50 | 61 |
|
51 | | -- Unit tests for utility functions |
52 | | -- Integration tests for protocol handling |
53 | | -- End-to-end tests for server interaction |
| 62 | +## Testing Guidelines |
54 | 63 |
|
55 | | -Run the test suite with `pytest` before submitting changes. |
| 64 | +- All new code should have accompanying tests |
| 65 | +- Run both HTTP and STDIO tests to ensure full compatibility |
| 66 | +- Generate compliance reports to verify specification adherence |
56 | 67 |
|
57 | | -## Adding New Features |
| 68 | +## Code Style |
58 | 69 |
|
59 | | -### Supporting New Protocol Versions |
| 70 | +- Follow PEP 8 guidelines for Python code |
| 71 | +- Use clear, descriptive variable and function names |
| 72 | +- Add docstrings to all functions and classes |
| 73 | +- Keep lines to a reasonable length (120 characters max) |
60 | 74 |
|
61 | | -To add support for a new MCP protocol version: |
| 75 | +## Documentation |
62 | 76 |
|
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 |
| 77 | +- Update README.md when adding new features |
| 78 | +- Keep documentation in sync with code changes |
| 79 | +- Document public APIs with clear examples |
66 | 80 |
|
67 | | -### Adding New Transport Mechanisms |
| 81 | +## Need Help? |
68 | 82 |
|
69 | | -To add support for a new transport mechanism: |
| 83 | +- Check the existing documentation |
| 84 | +- Review test reports for insights |
| 85 | +- File an issue for questions or problems |
70 | 86 |
|
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. |
| 87 | +Thank you for contributing to the MCP Validator project! |
0 commit comments