Skip to main content

Contributing

Thank you for your interest in contributing to MCP Gatekeeper!

Development Setup​

See Development Guide for initial setup instructions.

Contribution Workflow​

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/your-feature-name
  3. Make your changes
  4. Test thoroughly
  5. Update documentation if needed
  6. Commit with clear messages
  7. 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 any types
  • 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 /memory directory 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:

  1. Test manually in development environment
  2. Verify all affected features still work
  3. Check both light and dark themes
  4. 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 feature
  • fix: - Bug fix
  • docs: - Documentation only
  • refactor: - Code refactoring
  • test: - Adding tests
  • chore: - 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.