Contributing to @gatefare/mcp
April 29, 2026 · View on GitHub
Thanks for your interest. This is a small, focused codebase — the bar for changes is "does it make the agent experience better?"
Setup
git clone git@github.com:gatefareio/mcp-server.git
cd mcp-server
npm install
npm run test
Workflow
- Open an issue first for non-trivial changes (new tool, schema change, breaking behavior).
- Branch from
main. - Write tests. The bar is one happy path + one error path per tool, plus zod input coverage.
- Run
npm run typecheck && npm run test && npm run buildlocally. - Open a PR with a clear before/after.
Style
- TypeScript strict mode. No
anyunless interop forces it. - Error mapping goes through
GatefareErrorwith a stablecode. - Tools live under
src/tools/<domain>.tsand export a singleregister*Tools()factory. - No comments unless the why is non-obvious. Names should explain what.
Adding a new tool
- Define the zod schema next to the handler in the matching domain file.
- Add the tool to that domain's
register*Tools()return. - Add a unit test in
tests/tools/<domain>.test.ts. - Update the tool table in
README.md. - Note it in
CHANGELOG.mdunder## [Unreleased].
Releasing
Maintainers only:
npm version <patch|minor|major>
git push --follow-tags
The publish.yml workflow handles npm.