Contributing
Thank you for your interest in contributing to MCP Gatekeeper!
Development Setup
See Development Guide for initial setup instructions.
Contribution Workflow
- Fork the repository
- Create a feature branch
git checkout -b feature/your-feature-name
- Make your changes
- Test thoroughly
- Update documentation if needed
- Commit with clear messages
- Push and create a Pull Request
Code Standards
Backend (Python)
- Follow PEP 8 style guide
- Use type hints
- Use Pydantic models for all data validation
- Add docstrings for all functions and classes
- Handle errors appropriately
- No hardcoded values - use constants
Example:
from pydantic import BaseModel
from typing import Optional
class ServerConfig(BaseModel):
"""Server configuration model."""
name: str
server_url: str
timeout: int = 30
headers: Optional[dict] = None
Frontend (TypeScript)
- Use TypeScript strictly - no
anytypes - Follow React best practices
- Use functional components with hooks
- Extract reusable logic into custom hooks
- Keep components small and focused
- Use Material-UI components consistently
Example:
interface ServerProps {
name: string;
status: 'active' | 'inactive' | 'error';
onUpdate: (id: number) => void;
}
const Server: React.FC<ServerProps> = ({ name, status, onUpdate }) => {
// Component implementation
};
Documentation
Code Documentation
- Update
/memorydirectory for architectural changes - Follow the existing memory file structure
- Include implementation details and design decisions
User Documentation
- Update relevant docs in
apps/docs/docs/ - Ensure examples are accurate and tested
- Use clear, concise language
Testing
Before submitting:
- Test manually in development environment
- Verify all affected features still work
- Check both light and dark themes
- Test with multiple agents if relevant
Commit Messages
Use clear, descriptive commit messages:
feat: add HTTP server payload logging
fix: resolve proxy connection timeout issue
docs: update API reference for new endpoints
refactor: extract HTTP proxy logging logic
Prefixes:
feat:- New featurefix:- Bug fixdocs:- Documentation onlyrefactor:- Code refactoringtest:- Adding testschore:- Maintenance tasks
Pull Request Guidelines
- Provide clear description of changes
- Reference related issues if applicable
- Include screenshots for UI changes
- Ensure CI checks pass
- Be responsive to review feedback
Questions?
Check Troubleshooting or review existing code for examples.