# Contributing to MCP OpenClaw
Thank you for your interest in contributing to MCP OpenClaw! This document provides guidelines and instructions for contributing.
## Code of Conduct
- Be respectful and inclusive
- Provide constructive feedback
- Focus on what is best for the community
## How to Contribute
### Reporting Bugs
Before creating bug reports, please check existing issues to avoid duplicates. When creating a bug report, include:
- **Title**: Clear and descriptive
- **Description**: Detailed explanation of the problem
- **Steps to reproduce**: Minimal reproduction steps
- **Expected behavior**: What should happen
- **Actual behavior**: What actually happens
- **Environment**: OS, Node version, etc.
- **Logs**: Relevant error messages or logs
### Suggesting Enhancements
Enhancement suggestions are welcome! Please include:
- **Title**: Clear and descriptive
- **Problem description**: What problem does this solve?
- **Proposed solution**: How should it work?
- **Alternatives considered**: Other approaches you considered
### Pull Requests
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Make your changes
4. Run tests (`npm test`)
5. Run linting (`npm run lint`)
6. Commit your changes (`git commit -m 'Add amazing feature'`)
7. Push to the branch (`git push origin feature/amazing-feature`)
8. Open a Pull Request
### Coding Standards
- Follow the existing code style
- Write clear, self-documenting code
- Add comments for complex logic
- Include tests for new features
- Update documentation as needed
### Commit Messages
Follow conventional commits format:
```
type(scope): description
[optional body]
[optional footer]
```
Types:
- `feat`: New feature
- `fix`: Bug fix
- `docs`: Documentation changes
- `style`: Code style changes (formatting, etc.)
- `refactor`: Code refactoring
- `test`: Test changes
- `chore`: Build process or auxiliary tool changes
Example:
```
feat(tools): add support for file attachments in send_message tool
- Add file parameter to SendMessageParams
- Update OpenClaw API client to handle multipart requests
- Add tests for file upload functionality
Closes #42
```
## Development Setup
```bash
# Clone the repository
git clone https://github.com/yourusername/mcp-openclaw.git
cd mcp-openclaw
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm test
# Run in watch mode
npm run watch
```
## Testing
- Write unit tests for new functionality
- Maintain test coverage above 80%
- Use descriptive test names
- Mock external dependencies
## Documentation
- Update README for user-facing changes
- Add API documentation for new endpoints
- Update ARCHITECTURE.md for structural changes
- Keep CHANGELOG.md updated
## Getting Help
- Open an issue for questions
- Check existing documentation
- Join community discussions
Thank you for contributing!