This guide is for contributors who want to improve MCP Hub across the app, backend, infrastructure, and documentation. Keep changes focused, tested, and grounded in the current repository implementation.
- Prefer small, reviewable pull requests.
- Keep documentation aligned with code.
- Avoid describing repository feature modules as public API surfaces unless they are clearly mounted in the runtime.
- Preserve existing project structure and naming patterns unless a change explicitly requires refactoring.
Before you start, make sure you have:
- Node.js 20 or newer
- pnpm 9.12.0 or newer
- access to a MySQL-compatible database for
DATABASE_URL - optional Expo mobile tooling if you plan to run Android or iOS locally
Use the repository helper script or run the setup manually.
./scripts/setup.shManual setup:
git clone https://github.com/CassieMarie0728/mcp-hub.git
cd mcp-hub
pnpm install
cp .env.example .env
pnpm db:push
pnpm devThe setup script installs dependencies and creates .env from .env.example if it does not already exist.
Review .env.example and set values appropriate for your machine:
PORTfor the backend serverEXPO_PORTfor the Expo web appDATABASE_URLfor the MySQL-compatible databaseCOOKIE_SECRETandJWT_SECRETfor local auth/session behavior- any integration values you need for testing
- Create a branch from
main. - Make one scoped change at a time.
- Run the relevant local checks.
- Update documentation when behavior, setup, architecture, or API expectations change.
- Open a pull request using the repository template.
A typical full-stack loop is:
pnpm devThis runs the backend watcher and the Expo web development server together.
| Command | Purpose |
|---|---|
pnpm dev |
Run backend and Expo web development together |
pnpm dev:server |
Watch and restart the backend entry point |
pnpm dev:metro |
Start Expo for web |
pnpm build |
Build the production server bundle |
pnpm start |
Start the built production server |
pnpm check |
Type-check the codebase |
pnpm lint |
Run linting |
pnpm format |
Format the repository with Prettier |
pnpm test |
Run the Vitest suite |
pnpm db:push |
Generate and apply Drizzle migrations |
pnpm android |
Run the Android target |
pnpm ios |
Run the iOS target |
The repository currently uses:
- TypeScript in strict mode via
tsconfig.json - 2-space indentation and LF line endings via
.editorconfig - Expo and recommended ESLint rules via
.eslintrc - Prettier with semicolons, single quotes, trailing commas, and 100-column print width via
.prettierrc
When contributing:
- use TypeScript for application and server changes
- follow existing folder and module boundaries
- keep modules purpose-driven and readable
- run formatting and linting before opening a PR
- avoid large unrelated cleanup in feature branches
Use Conventional Commits where possible:
feat:new functionalityfix:bug fixesdocs:documentation-only changesrefactor:internal cleanup without intended behavior changetest:test changeschore:maintenance work
Example:
feat(mcp): add server health indicator for connection screen
Preferred branch names:
feature/<short-description>fix/<short-description>docs/<short-description>chore/<short-description>
Run the standard local checks before submitting a pull request:
./scripts/test.shEquivalent manual commands:
pnpm check
pnpm lint
pnpm testIf your change affects schema or persistence behavior, also run:
pnpm db:pushAdd or update tests when changing app logic, backend procedures, or integration behavior.
MCP Hub currently uses Drizzle with MySQL-oriented schema definitions.
When changing the schema:
- update
drizzle/schema.ts - run
pnpm db:push - verify generated migration output if applicable
- test against a local database before opening a PR
- update documentation if setup or schema assumptions changed
Documentation changes are part of the product surface.
When updating docs:
- prefer repository facts over assumptions
- verify backend/API claims against
server/_core/index.tsandserver/routers.ts - avoid documenting a repository module as a mounted or public API unless code confirms it
- update related docs together when a change affects setup, architecture, or usage
Before opening a pull request:
- fill out
.github/PULL_REQUEST_TEMPLATE.md - link related issues when applicable
- summarize what changed and why
- include testing evidence
- call out breaking changes or migration impact explicitly
- mention documentation changes when relevant
- My branch is scoped to one clear change
- I ran
pnpm check,pnpm lint, andpnpm test - I ran
pnpm db:pushif schema-related behavior changed - I updated docs/changelog where needed
- I verified technical claims against the current codebase
Use the existing GitHub templates in .github/ISSUE_TEMPLATE/:
bug_report.mdfor defectsfeature_request.mdfor proposed enhancementscustom_template.mdfor issues that do not fit the standard flows
Include reproduction steps, environment details, expected behavior, and actual behavior whenever possible.
- expect maintainer review before merge
- address review comments with targeted follow-up commits
- keep discussion tied to the scope of the change
- prefer clear commit history unless maintainers request a different merge strategy