Rethunk AI internal project. External PRs are not expected, but the process is documented for clarity.
- Node.js ≥ 22 — see docs/install.md Prerequisites for version notes.
- Bun ≥ 1.3.11 (
packageManagerinpackage.json) — only needed to build and test from source. - Git ≥ 2.28.
git clone https://github.com/Rethunk-AI/rethunk-github-mcp.git
cd rethunk-github-mcp
bun install
bun run build # rimraf dist && tsc → dist/
bun run check # Biome lint + format check
bun run check:fix # auto-fix with Biome
bun run test # bun test src/
bun run test:coverage # bun test src/ --coverage
bun run setup-hooks # one-time per clone: wire .githooks/bun run setup-hooks sets core.hooksPath = .githooks.
| Hook | Runs |
|---|---|
| pre-commit | bun run check + bun run test |
| pre-push | frozen install + build + check + test (mirrors CI) |
Set SKIP_GIT_HOOKS=1 to bypass.
type(scope): imperative summary ≤72 chars
Body explains WHY this change exists — motivation, context, constraints.
Not a file list. Not a summary of what the diff already shows.
| Type | When |
|---|---|
feat |
New capability |
fix |
Bug corrected |
docs |
Documentation only |
refactor |
No behaviour change |
test |
Test additions or fixes |
chore |
Maintenance, deps, tooling |
ci |
CI/CD config |
build |
Build system changes |
One logical unit per commit. Max ~7 files. Split by theme, not by file count.
.github/workflows/ci.yml runs on PRs and pushes to main:
bun install --frozen-lockfilebun run buildbun run check(Biome)bun run test:coverage+ 80% line coverage threshold assertion- Prerelease
npm packartifact uploaded (90-day retention)
Match the CI steps locally before opening a PR.
-
bun run buildpasses. -
bun run checkpasses (no Biome errors). -
bun run testpasses. - Any new tool has a corresponding
*.test.tsfile. -
docs/mcp-tools.mdandREADME.mdtool table updated if the public tool surface changed. -
CHANGELOG.mdentry added under[Unreleased].
- Create
src/server/<tool-name>-tool.tsexporting aregister<ToolName>Tool(server: FastMCP)function. - Register it in
src/server/tools.tsinsideregisterRethunkGitHubTools. - Add a test file
src/server/<tool-name>-tool.test.ts. - Update docs/mcp-tools.md (tool ID, parameters, JSON shape, error codes) and the README.md tool table.
- Follow contract-change rules in AGENTS.md — bump
MCP_JSON_FORMAT_VERSIONif the JSON envelope changes incompatibly.
Enforced by Biome (biome.json): recommended rules, 100-char lines, double quotes, semicolons, trailing commas.
TypeScript: strict: true, noUncheckedIndexedAccess: true, verbatimModuleSyntax: true. Avoid any; if genuinely necessary, add an inline comment explaining why.