Skip to content

Contributing

Thanks for taking the time to contribute to MCPGate.

  • Docker Desktop 4.0+
  • Python 3.12+
  • pre-commit — linting and formatting hooks
Terminal window
pip install pre-commit
pre-commit install
Terminal window
# 1. Clone the repo
git clone https://github.com/gatesuite/mcpgate.git
cd mcpgate
# 2. Create your credentials file
cp .env.example .env
# Edit .env — set SECRET_KEY, ADMIN_API_KEY, and other values
# Generate keys with: openssl rand -hex 32
# 3. Start the stack (MCPGate + Postgres)
make app-up

MCPGate will be available at http://localhost:8000.

Terminal window
# Run the full E2E test suite (builds test image, starts Postgres, runs pytest)
make test-run
# Tear down test containers and volumes
make test-down

Tests use a real PostgreSQL instance and cover key issuance, verification, revocation, and admin API endpoints.

Hooks run automatically on git commit. To run them manually across all files:

Terminal window
pre-commit run --all-files

Hooks include: black, isort, flake8, check-yaml, detect-private-key.

CommandDescription
make app-upBuild and start MCPGate + Postgres from source
make app-downStop the stack (volumes preserved)
make app-logsTail MCPGate container logs
make test-runRun E2E tests
make test-downRemove test containers and volumes
make docs-upStart the docs dev server
make cleanWipe all containers, volumes, and caches

This project uses Conventional Commits — releases and the changelog are automated via release-please.

PrefixWhen to use
feat:New feature or behaviour
fix:Bug fix
docs:Documentation changes only
chore:CI, deps, tooling — no user-facing change
test:Adding or fixing tests
refactor:Internal restructure, no behaviour change

Breaking changes: add ! after the type (feat!:) and include a BREAKING CHANGE: footer in the commit body.

  1. Fork and branch off main.
  2. Keep PRs focused — one logical change per PR.
  3. Ensure pre-commit run --all-files and make test-run pass locally before pushing.
  4. Fill in the PR description — what changed and why.

Use the GitHub issue templates — they prompt for the information needed to reproduce the problem.

Include your OS, Docker version, MCPGate version, deployment method, and the exact steps to reproduce.