Contribution Guide¶
Thank you for your interest in contributing to Litestar MCP! This guide will help you get started.
Development Setup¶
Clone the repository:
git clone https://github.com/litestar-org/litestar-mcp.git
cd litestar-mcp
Install development dependencies:
uv sync --group dev
Install pre-commit hooks:
pre-commit install
Running Tests¶
# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov
# Run specific test
uv run pytest tests/test_plugin.py
Code Quality¶
We use several tools to maintain code quality:
# Linting
uv run ruff check src tests examples
uv run mypy src tests examples
# Formatting
uv run ruff format src tests examples
Building Documentation¶
# Install doc dependencies
uv sync --group doc
# Build docs
cd docs
uv run sphinx-build -b html . _build/html
# Live preview
uv run sphinx-autobuild . _build/html
Pull Request Guidelines¶
Fork and Branch: Create a feature branch from main
Test Coverage: Ensure new code has appropriate tests
Documentation: Update docs for new features
Commit Messages: Use clear, descriptive commit messages
Pull Request: Create a PR with a clear description
Code Style¶
Follow PEP 8
Use type hints for all public APIs
Write docstrings for all public functions/classes
Keep line length to 120 characters
Issue Guidelines¶
When reporting bugs or requesting features:
Check existing issues first
Provide minimal reproduction code
Include environment details
Be specific about expected vs actual behavior
Community¶
Discord: Join the Litestar Discord server
GitHub Discussions: For questions and ideas
GitHub Issues: For bugs and feature requests