First off, thank you for considering contributing to PwnDoc MCP Server! It's people like you that make this tool better for the security community.
- Code of Conduct
- Getting Started
- How Can I Contribute?
- Development Setup
- Pull Request Process
- Style Guidelines
- Commit Messages
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
- Python 3.8 or higher
- Git
- A PwnDoc instance for testing (optional, mocks available)
# Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/pwndoc-mcp-server.git
cd pwndoc-mcp-server
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run linters
ruff check .
black --check .
mypy src/Before creating bug reports, please check the existing issues to avoid duplicates.
When creating a bug report, include:
- Clear title describing the issue
- Steps to reproduce the behavior
- Expected behavior vs. actual behavior
- Environment details (OS, Python version, PwnDoc version)
- Error messages or logs (sanitize any credentials!)
- Screenshots if applicable
Feature requests are welcome! Please:
- Check if the feature has already been requested
- Describe the use case and benefit
- Explain how it would work
- Consider if it fits the project scope
Look for issues labeled good first issue - these are great starting points.
- Bug fixes
- New PwnDoc API endpoint support
- Documentation improvements
- Test coverage improvements
- Performance optimizations
- Platform compatibility fixes
First, configure your Git identity:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"# Clone your fork
git clone https://github.com/YOUR_USERNAME/pwndoc-mcp-server.git
cd pwndoc-mcp-server
# Add upstream remote
git remote add upstream https://github.com/walidfaour/pwndoc-mcp-server.git
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install all development dependencies
pip install -e ".[all,dev]"
# Install pre-commit hooks
pre-commit install
# Verify setup
pytest
ruff check .
black --check .# Run all tests
pytest
# Run with coverage
pytest --cov=pwndoc_mcp_server --cov-report=html
# Run specific test file
pytest tests/test_client.py
# Run specific test
pytest tests/test_client.py::test_authentication
# Run with verbose output
pytest -v# Check code style
ruff check .
# Auto-fix issues
ruff check --fix .
# Format code
black .
# Check types
mypy src/
# Run all checks
pre-commit run --all-files- Update your fork with the latest upstream changes
- Create a feature branch from
main - Write tests for new functionality
- Update documentation if needed
- Run all tests and linters
- Update CHANGELOG.md if applicable
Use descriptive branch names:
feature/add-bulk-exportfix/authentication-retrydocs/improve-installation-guiderefactor/client-error-handling
- Push your branch to your fork
- Open a Pull Request against
main - Fill out the PR template completely
- Link any related issues
- Wait for review
- Maintainers will review within 48 hours
- Address feedback promptly
- Once approved, a maintainer will merge
We use:
- Black for code formatting (line length: 100)
- Ruff for linting
- isort for import sorting
- mypy for type checking
# Good: Type hints, docstrings, clear naming
async def get_audit_findings(
self,
audit_id: str,
*,
include_failed: bool = False,
) -> list[dict[str, Any]]:
"""
Retrieve all findings for a specific audit.
Args:
audit_id: The MongoDB ObjectId of the audit.
include_failed: Whether to include failed findings.
Returns:
List of finding dictionaries with full details.
Raises:
NotFoundError: If the audit doesn't exist.
AuthenticationError: If not authenticated.
"""
...- Use clear, concise language
- Include code examples
- Keep README updated
- Document breaking changes
Follow Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
feat: New featurefix: Bug fixdocs: Documentation onlystyle: Formatting, no code changerefactor: Code change that neither fixes nor addsperf: Performance improvementtest: Adding or fixing testschore: Build process, dependencies, etc.
feat(client): add bulk finding export endpoint
fix(auth): handle token refresh on 401 response
docs(readme): add Docker installation section
test(server): add integration tests for SSE transport
If you discover a security vulnerability, please follow our Security Policy instead of opening a public issue.
- Open a Discussion
- Check the Documentation
Contributors are recognized in:
- Release notes
- CONTRIBUTORS.md
- Project documentation
Thank you for contributing! 🎉