Contributing Guidelines
Thank you for contributing to the PagerDuty MCP Server!
Getting Startedโ
- Fork the repository on GitHub
- Set up your development environment
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes
- Run tests:
make check - Submit a Pull Request
Code Standardsโ
Python Styleโ
- Formatter: Ruff (configured in
pyproject.toml) - Line length: 120 characters
- Docstrings: Google style
- Type hints: Required on all public functions
Commit Messagesโ
Follow Conventional Commits:
feat: add new tool for listing X
fix: correct parameter handling in Y
docs: update README for Z
Adding a New Toolโ
- Add the tool function to the appropriate file in
pagerduty_mcp/tools/ - Add Pydantic models to
pagerduty_mcp/models/if needed - Register the tool in
pagerduty_mcp/tools/__init__.py(inread_toolsorwrite_tools) - Add tests in
tests/
Tool Annotationsโ
All tools must use ToolAnnotations:
# Read-only tool
@mcp.tool(annotations=ToolAnnotations(readOnlyHint=True, destructiveHint=False))
async def list_something(...):
...
# Write tool
@mcp.tool(annotations=ToolAnnotations(readOnlyHint=False, destructiveHint=True))
async def create_something(...):
...
Pull Request Processโ
- Ensure all tests pass:
make check - Update documentation if adding new tools or changing behavior
- Fill out the pull request template completely
- Request review from a maintainer
Code of Conductโ
This project follows the PagerDuty Code of Conduct.
Reporting Security Issuesโ
See SECURITY.md for the vulnerability disclosure policy.