Contributing
Welcome! We’re glad you want to contribute. This page is a quick orientation — detailed guides are linked below.
Quick Start
Section titled “Quick Start”-
Clone and build:
Terminal window git clone https://github.com/jmrplens/portainer-mcp-enhanced.gitcd portainer-mcp-enhancedmake build # → dist/portainer-mcp-enhanced -
Run tests:
Terminal window make test # Unit testsmake test-all # Unit + integration (requires Docker) -
Format and lint:
Terminal window gofmt -s -w .go vet ./...
Developer Guides
Section titled “Developer Guides” Project Structure File layout, layer diagram, and key source files
Development Workflow Setup, build, test, debug, and release
Adding Tools Step-by-step guide from YAML definition to meta-tool integration
Testing Guide Unit tests, integration tests, mocking, and coverage
Dependencies & Toolchain Go modules, build tools, and CI/CD infrastructure
CI/CD & Releases GitHub Actions, GoReleaser, Docker images
Key Conventions
Section titled “Key Conventions”| Area | Convention |
|---|---|
| Naming | PascalCase exported, camelCase private |
| Errors | fmt.Errorf("context: %w", err) — always wrap with context |
| Imports | Standard lib → external → internal (blank line separated) |
| Tests | Table-driven with descriptive case names |
| Models | Raw SDK → Local models (never expose raw to handlers) |
| Logging | zerolog to stderr; never log to stdout (MCP transport) |
| Commits | Conventional Commits — feat:, fix:, docs:, etc. |
Pull Request Process
Section titled “Pull Request Process”- Fork and create a branch:
feat/my-featureorfix/my-fix - Implement with tests
- Verify:
go build ./... && go vet ./... && make test-all - Submit with a clear title and description
Architecture Reference
Section titled “Architecture Reference” Architecture Server layers, client model, tool registration
Clients & Models Two-layer model architecture and conventions
Design Decisions Architectural records and decision log
Security
Section titled “Security”Report vulnerabilities privately — see the Security Policy for details.