We welcome contributions to the MCP Java Bridge project! This document provides guidelines for contributing to the project.
- Java 17 or higher
- Gradle 8.5 or higher
- Git
-
Fork the repository
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/mcp-java-bridge.git cd mcp-java-bridge -
Build the project:
./gradlew build
-
Run tests:
./gradlew test
git checkout -b feature/your-feature-name- Follow the existing code style
- Add tests for new functionality
- Update documentation as needed
./gradlew testFollow the conventional commit format:
<type>: <description>
<detailed explanation if needed>
🤖 Generated with Claude Wing Coding support (https://claude.ai)
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changesrefactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
git push origin feature/your-feature-nameThen create a pull request on GitHub.
- Use 4 spaces for indentation
- Follow standard Java naming conventions
- Use Lombok annotations where appropriate
- Add Javadoc for public APIs
org.gegolabs.mcp.bridge
├── transport/ # Transport implementations
├── client/ # Client-side components
├── utils/ # Utility classes
└── examples/ # Example implementations
- Use SLF4J with
@Slf4jannotation - Log levels:
- ERROR: Unrecoverable errors
- WARN: Recoverable errors, deprecations
- INFO: Important state changes
- DEBUG: Detailed flow information
- TRACE: Very detailed debugging
- Test class naming:
<ClassName>Test - Use JUnit 5 (Jupiter)
- Use Mockito for mocking
- Aim for >80% code coverage
Example:
@Test
void testTcpTransportCreation() {
var transport = McpBridge.tcpTransport(3000);
assertNotNull(transport);
assertInstanceOf(BridgeTransportProvider.class, transport);
}- Test actual TCP connections
- Test stdio↔TCP conversion
- Test error scenarios
- Add Javadoc to all public classes and methods
- Include examples in Javadoc where helpful
- Document thrown exceptions
Update README.md when:
- Adding new features
- Changing API
- Adding configuration options
Update docs/API.md when:
- Adding new public APIs
- Changing method signatures
- Adding new utility classes
- Description: Clearly describe what the PR does
- Testing: Describe how you tested the changes
- Breaking Changes: Note any breaking changes
- Related Issues: Link related issues with "Fixes #123"
## Description
Brief description of changes
## Problem
What issue does this solve?
## Solution
How does this solve it?
## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update- Update version in
build.gradle - Update CHANGELOG.md
- Create release tag:
v1.0.0 - Build and publish artifacts
- Open an issue for bugs
- Start a discussion for features
- Join our community chat (if available)
- Be respectful and inclusive
- Welcome newcomers
- Focus on constructive criticism
- Follow the project's code of conduct
Thank you for contributing to MCP Java Bridge!