Skip to content

# Contributing Guide 🤝

Thank you for your interest in contributing to the MCP Server project!

## Getting Started

### Prerequisites

- Bun >= 1.0.26
- Home Assistant instance
- Basic understanding of TypeScript

### Development Setup

1. Fork the repository

2. Clone your fork:

       git clone https://github.com/YOUR_USERNAME/homeassistant-mcp.git
       cd homeassistant-mcp

3. Install dependencies:

       bun install

4. Configure environment:

       cp .env.example .env
       # Edit .env with your Home Assistant details

## Development Workflow

### Branch Naming

- `feature/` - New features
- `fix/` - Bug fixes
- `docs/` - Documentation updates

Example:

    git checkout -b feature/device-control-improvements

### Commit Messages

Follow simple, clear commit messages:

    type: brief description

    [optional detailed explanation]

Types: - `feat:` - New feature - `fix:` - Bug fix - `docs:` - Documentation - `chore:` - Maintenance

### Code Style

- Use TypeScript
- Follow existing code structure
- Keep changes focused and minimal

## Testing

Run tests before submitting:

    # Run all tests
    bun test

    # Run specific test
    bun test test/api/control.test.ts

## Pull Request Process

1. Ensure tests pass
2. Update documentation if needed
3. Provide clear description of changes

### PR Template

    ## Description
    Brief explanation of the changes

    ## Type of Change
    - [ ] Bug fix
    - [ ] New feature
    - [ ] Documentation update

    ## Testing
    Describe how you tested these changes

## Reporting Issues

- Use GitHub Issues
- Provide clear, reproducible steps
- Include environment details

## Code of Conduct

- Be respectful
- Focus on constructive feedback
- Help maintain a positive environment

## Resources

- API Documentation
- Troubleshooting Guide

Thank you for contributing!

February 5, 2025
February 4, 2025
Was this page helpful?
Thanks for your feedback!
Thanks for your feedback! Please consider creating an issue to help us improve.

#### Cookie consent

We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. With your consent, you're helping us to make our documentation better.

- Google Analytics
- GitHub

Manage settings