|
| 1 | +--- |
| 2 | +title: Contributing |
| 3 | +description: How to contribute to the MCP Java SDK |
| 4 | +--- |
| 5 | + |
| 6 | +# Contributing |
| 7 | + |
| 8 | +Thank you for your interest in contributing to the Model Context Protocol Java SDK! |
| 9 | +This guide outlines how to contribute to this project. |
| 10 | + |
| 11 | +## Prerequisites |
| 12 | + |
| 13 | +!!! info "Required Software" |
| 14 | + - **Java 17** or above |
| 15 | + - **Docker** |
| 16 | + - **npx** |
| 17 | + |
| 18 | +## Getting Started |
| 19 | + |
| 20 | +1. Fork the repository |
| 21 | +2. Clone your fork: |
| 22 | + |
| 23 | + ```bash |
| 24 | + git clone https://github.com/YOUR-USERNAME/java-sdk.git |
| 25 | + cd java-sdk |
| 26 | + ``` |
| 27 | + |
| 28 | +3. Build from source: |
| 29 | + |
| 30 | + ```bash |
| 31 | + ./mvnw clean install -DskipTests # skip the tests |
| 32 | + ./mvnw test # run tests |
| 33 | + ``` |
| 34 | + |
| 35 | +## Reporting Issues |
| 36 | + |
| 37 | +Please create an issue in the repository if you discover a bug or would like to |
| 38 | +propose an enhancement. Bug reports should have a reproducer in the form of a code |
| 39 | +sample or a repository attached that the maintainers or contributors can work with to |
| 40 | +address the problem. |
| 41 | + |
| 42 | +## Making Changes |
| 43 | + |
| 44 | +1. Create a new branch: |
| 45 | + |
| 46 | + ```bash |
| 47 | + git checkout -b feature/your-feature-name |
| 48 | + ``` |
| 49 | + |
| 50 | +2. Make your changes. |
| 51 | + |
| 52 | +3. Validate your changes: |
| 53 | + |
| 54 | + ```bash |
| 55 | + ./mvnw clean test |
| 56 | + ``` |
| 57 | + |
| 58 | +### Change Proposal Guidelines |
| 59 | + |
| 60 | +#### Principles of MCP |
| 61 | + |
| 62 | +1. **Simple + Minimal**: It is much easier to add things to the codebase than it is to |
| 63 | + remove them. To maintain simplicity, we keep a high bar for adding new concepts and |
| 64 | + primitives as each addition requires maintenance and compatibility consideration. |
| 65 | +2. **Concrete**: Code changes need to be based on specific usage and implementation |
| 66 | + challenges and not on speculative ideas. Most importantly, the SDK is meant to |
| 67 | + implement the MCP specification. |
| 68 | + |
| 69 | +## Submitting Changes |
| 70 | + |
| 71 | +1. For non-trivial changes, please clarify with the maintainers in an issue whether |
| 72 | + you can contribute the change and the desired scope of the change. |
| 73 | +2. For trivial changes (for example a couple of lines or documentation changes) there |
| 74 | + is no need to open an issue first. |
| 75 | +3. Push your changes to your fork. |
| 76 | +4. Submit a pull request to the main repository. |
| 77 | +5. Follow the pull request template. |
| 78 | +6. Wait for review. |
| 79 | +7. For any follow-up work, please add new commits instead of force-pushing. This will |
| 80 | + allow the reviewer to focus on incremental changes instead of having to restart the |
| 81 | + review process. |
| 82 | + |
| 83 | +## Code of Conduct |
| 84 | + |
| 85 | +This project follows a Code of Conduct. Please review it in |
| 86 | +[CODE_OF_CONDUCT.md](https://github.com/modelcontextprotocol/java-sdk/blob/main/CODE_OF_CONDUCT.md). |
| 87 | + |
| 88 | +## Questions |
| 89 | + |
| 90 | +If you have questions, please create a discussion in the repository. |
| 91 | + |
| 92 | +## License |
| 93 | + |
| 94 | +By contributing, you agree that your contributions will be licensed under the MIT |
| 95 | +License. |
| 96 | + |
| 97 | +## Security |
| 98 | + |
| 99 | +This SDK is maintained by [Anthropic](https://www.anthropic.com/) as part of the Model Context Protocol project. |
| 100 | + |
| 101 | +The security of our systems and user data is Anthropic's top priority. We appreciate the work of security researchers acting in good faith in identifying and reporting potential vulnerabilities. |
| 102 | +
|
| 103 | +!!! warning "Reporting Security Vulnerabilities" |
| 104 | + Do **not** report security vulnerabilities through public GitHub issues. Instead, report them through our HackerOne [submission form](https://hackerone.com/anthropic-vdp/reports/new?type=team&report_type=vulnerability). |
| 105 | +
|
| 106 | +Our Vulnerability Disclosure Program guidelines are defined on our [HackerOne program page](https://hackerone.com/anthropic-vdp). |
0 commit comments