# Contributing to TrustLayer MCP Server
Thank you for your interest in contributing to TrustLayer MCP Server! This document provides guidelines and instructions for contributing.
## Code of Conduct
By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors.
## How to Contribute
### Reporting Bugs
If you find a bug, please open an issue with:
- A clear, descriptive title
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Environment details (Python version, OS, etc.)
- Relevant error messages or logs
### Suggesting Features
Feature suggestions are welcome! Please open an issue with:
- A clear description of the feature
- Use case and motivation
- Potential implementation approach (if you have ideas)
### Pull Requests
1. **Fork the repository** and create a new branch from `main`:
```bash
git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fix
```
2. **Set up development environment**:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
pip install -e ".[dev]" # Install dev dependencies
```
3. **Make your changes**:
- Follow the existing code style
- Add tests if applicable
- Update documentation as needed
- Ensure all tests pass
4. **Run tests and linting**:
```bash
# Run tests (if available)
pytest
# Format code
black src/
# Lint code
ruff check src/
```
5. **Commit your changes**:
- Use clear, descriptive commit messages
- Follow conventional commit format when possible:
- `feat: add new feature`
- `fix: fix bug description`
- `docs: update documentation`
- `refactor: refactor code`
- `test: add tests`
6. **Push and create a Pull Request**:
- Push your branch to your fork
- Open a Pull Request with a clear description
- Reference any related issues
## Development Guidelines
### Code Style
- Follow PEP 8 Python style guide
- Use type hints where appropriate
- Keep functions focused and small
- Add docstrings to public functions and classes
### Project Structure
```
mcp-server/
├── src/
│ ├── server.py # Stdio MCP server
│ ├── http_server.py # HTTP MCP server
│ ├── trustlayer_client.py # TrustLayer API client
│ ├── config.py # Configuration management
│ ├── resources.py # MCP resources
│ └── tools.py # MCP tools
├── tests/ # Test files (if added)
├── README.md
├── CONTRIBUTING.md
└── LICENSE
```
### Testing
- Write tests for new features and bug fixes
- Ensure existing tests continue to pass
- Test both stdio and HTTP modes when applicable
### Documentation
- Update README.md if adding new features
- Add docstrings to new functions and classes
- Update API documentation if changing tool/resource interfaces
## Areas for Contribution
- **Bug fixes**: Fix issues reported in the issue tracker
- **New features**: Add support for additional TrustLayer API endpoints
- **Performance**: Optimize API calls and data processing
- **Documentation**: Improve README, add examples, clarify instructions
- **Testing**: Add test coverage
- **Code quality**: Refactor and improve code organization
## Questions?
If you have questions about contributing, please open an issue with the `question` label.
Thank you for contributing to TrustLayer MCP Server!