11# Contributing to MCP Hub
22
3- Thank you for your interest in contributing to MCP Hub! This document provides guidelines to help you get started.
3+ Thank you for your interest in contributing to MCP Hub! Please read this guide carefully before submitting.
4+
5+ ## Rules
6+
7+ 1 . ** Issue first** — Open an issue before working on any non-trivial change. PRs without a linked issue may be closed.
8+ 2 . ** One PR, one thing** — Keep PRs focused. Don't mix bug fixes with features.
9+ 3 . ** CI must pass** — All checks (build, test, lint) must be green before review.
10+ 4 . ** PR title must follow conventional commits** — ` feat: ` , ` fix: ` , ` docs: ` , etc.
11+ 5 . ** No AI-generated walls of text** — Write concise, human descriptions.
12+ 6 . ** Maintainer approval required** — All PRs require at least 1 approval from a maintainer before merging.
13+ 7 . ** No direct pushes to master** — All changes go through PRs.
414
515## Getting Started
616
@@ -13,7 +23,7 @@ Thank you for your interest in contributing to MCP Hub! This document provides g
1323### Setup
1424
1525``` bash
16- git clone https://github.com/mcphub /mcphub.git
26+ git clone https://github.com/Ricardo-M-L /mcphub.git
1727cd mcphub
1828make build
1929make test
@@ -22,38 +32,41 @@ make test
2232### Running Locally
2333
2434``` bash
25- # Build and run
2635go run ./cmd/mcphub search filesystem
27-
28- # Or build first
29- make build
30- ./bin/mcphub search filesystem
3136```
3237
3338## Types of Contributions
3439
3540### Bug Fixes
3641
37- - Check the [ issue tracker] ( https://github.com/mcphub /mcphub/issues ) for known bugs
42+ - Check the [ issue tracker] ( https://github.com/Ricardo-M-L /mcphub/issues ) for known bugs
3843- Look for issues labeled ` good first issue ` or ` help wanted `
39- - Open an issue before starting work on complex fixes
44+ - ** Open an issue first ** describing the bug and your fix approach
4045
4146### New Features
4247
43- - Open a feature request issue first to discuss the design
44- - Keep PRs focused on a single feature
48+ - ** Open a feature request issue first** to discuss the design
49+ - Wait for maintainer approval before starting work
4550- Include tests for new functionality
4651
4752### Documentation
4853
4954- Fix typos, improve examples, add missing docs
50- - Documentation PRs don't need an issue
55+ - Small doc fixes don't need an issue
5156
5257## Pull Request Process
5358
54- ### 1. Branch Naming
59+ ### 1. Fork & Branch
5560
56- Use conventional prefixes:
61+ ``` bash
62+ # Fork the repo on GitHub, then:
63+ git clone https://github.com/YOUR-USERNAME/mcphub.git
64+ cd mcphub
65+ git remote add upstream https://github.com/Ricardo-M-L/mcphub.git
66+ git checkout -b feat/your-feature
67+ ```
68+
69+ ### 2. Branch Naming
5770
5871```
5972feat/add-docker-support
@@ -63,9 +76,7 @@ refactor/simplify-installer-interface
6376test/add-config-manager-tests
6477```
6578
66- ### 2. Commit Messages
67-
68- Follow [ Conventional Commits] ( https://www.conventionalcommits.org/ ) :
79+ ### 3. PR Title (Conventional Commits)
6980
7081```
7182feat: add Docker-based MCP server installer
@@ -74,68 +85,73 @@ docs: add troubleshooting section to README
7485test: add integration tests for npm installer
7586```
7687
77- ### 3. Code Style
88+ ** Invalid titles will be automatically rejected by CI. **
7889
79- - Run ` make fmt ` before committing
80- - Run ` make lint ` to check for issues
81- - Follow Go conventions (effective Go, Go Code Review Comments)
82- - Keep functions focused and short
83- - Use meaningful variable names
84- - Add comments only where the logic isn't self-evident
85-
86- ### 4. Testing
87-
88- - Add unit tests for new code in ` *_test.go ` files
89- - Use table-driven tests where appropriate
90- - Mock external dependencies (HTTP calls, file system)
91- - Run ` make test ` before submitting
90+ ### 4. PR Description
9291
93- ### 5. PR Description
92+ Use the PR template. Must include:
9493
95- Use this template:
94+ - ** What** — Brief description of the change
95+ - ** Why** — The problem this solves
96+ - ** How** — Key implementation decisions
97+ - ** Testing** — How you verified it works
98+ - ** Closes #** — Link to the issue
9699
97- ``` markdown
98- ## What
100+ ### 5. Code Requirements
99101
100- Brief description of the change.
101-
102- ## Why
102+ - Run ` make fmt ` before committing
103+ - Run ` make test ` — all tests must pass
104+ - Run ` go vet ./... ` — no warnings
105+ - Add tests for new code
106+ - Keep functions focused and short
107+ - Comments only where logic isn't self-evident
103108
104- The problem this solves or feature this adds.
109+ ### 6. Review Process
105110
106- ## How
111+ 1 . CI checks run automatically (build, test, lint, PR title)
112+ 2 . Maintainer reviews the code
113+ 3 . Address review feedback with new commits (don't force-push during review)
114+ 4 . Maintainer approves and merges
107115
108- Key implementation decisions .
116+ ** Timeline: ** Expect 1-3 days for initial review. Complex PRs may take longer .
109117
110- ## Testing
118+ ### 7. What Will Get Your PR Closed
111119
112- How you verified this works.
113- ```
120+ - No linked issue (for non-trivial changes)
121+ - AI-generated spam descriptions
122+ - Unrelated changes mixed in
123+ - Failing CI
124+ - No response to review feedback for 7 days
125+ - Changes that break existing functionality without tests
114126
115- ## Architecture Overview
127+ ## Architecture
116128
117129```
118- cmd/mcphub/main.go # Entrypoint
119- internal/cli/ # Cobra commands (search, install, list, remove)
120- internal/registry/client.go # HTTP client for MCP Registry API
130+ cmd/mcphub/main.go # CLI entrypoint
131+ mcp/server.go # MCP server mode (stdio)
132+ internal/cli/ # Cobra commands
133+ internal/registry/client.go # MCP Registry API client
134+ internal/registry/github.go # GitHub search fallback
121135internal/installer/ # Package installation logic
122- internal/config/manager.go # MCP client config read/write
123- internal/store/store.go # Local lockfile management
124- internal/ui/ # Terminal output formatting
125- internal/platform/paths.go # OS-specific file paths
136+ internal/config/manager.go # MCP client config management
137+ internal/store/store.go # Local lockfile
138+ internal/ui/ # Terminal output
139+ internal/platform/paths.go # OS-specific paths
140+ server/ # Registry API server
141+ web/ # Next.js Web UI
126142```
127143
128- ### Key Design Principles
144+ ### Design Principles
129145
130- 1 . ** Config safety** - Always backup before modifying client configs
131- 2 . ** Zero infrastructure** - CLI works by querying the upstream registry directly
132- 3 . ** Single binary** - No runtime dependencies for the CLI
133- 4 . ** Preserve user config** - Use ` map[string]interface{} ` when reading configs to keep unknown fields
146+ 1 . ** Config safety** — Always backup before modifying client configs
147+ 2 . ** Zero infrastructure** — CLI queries upstream registry directly
148+ 3 . ** Single binary** — No runtime dependencies
149+ 4 . ** Preserve user config** — Use ` map[string]interface{} ` to keep unknown fields
134150
135151## Code of Conduct
136152
137- This project follows the [ Contributor Covenant Code of Conduct ] ( CODE_OF_CONDUCT.md ) . By participating, you are expected to uphold this code .
153+ Be respectful. No harassment, spam, or bad-faith contributions. Violations result in a permanent ban .
138154
139155## Questions?
140156
141- Open a [ Discussion] ( https://github.com/mcphub /mcphub/discussions ) or file an issue.
157+ Open a [ Discussion] ( https://github.com/Ricardo-M-L /mcphub/discussions ) or file an issue.
0 commit comments