- Install dependencies:
npm install. - Copy
.env.exampleto.envand setMCP_BASIC_KEY,MCP_PAPERSCORE_KEY, and any other secrets required by the agents. - Run
npm run startto boot the API via ts-node, or usemake devfor the auto-rebuilding Docker dev stack (api-devservice).make build && make upbuilds and starts the production docker-compose stack locally.
npm test: runs the Jest suites insrc/*.test.tsand any request tests.npm run test:coverage: produces a coverage report undercoverage/.npm run build: compiles TypeScript intodist/and copiessrc/templates/.npm run serve: executes the compileddist/app.jsusing Node. Use these commands locally before pushing to keep CI green.
The repository publishes multi-architecture images to ghcr.io/<owner>/paperdebugger-mcp-server via the Build and Push Docker Image workflow (.github/workflows/build.yaml). When you push to main or open/update a pull request targeting main, GitHub Actions:
- Checks out the repo (with submodules) using
actions/checkout. - Sets up Buildx and authenticates to GHCR with
${{ secrets.GITHUB_TOKEN }}. - Generates tags for the branch, PR, and short SHA through
docker/metadata-action. - Builds
docker/Dockerfileforlinux/amd64andlinux/arm64and pushes all tags to GHCR. Manual publishing is rarely needed, but you can mimic the pipeline locally:docker build -t ghcr.io/<owner>/paperdebugger-mcp-server:dev -f docker/Dockerfile .and thendocker push ghcr.io/<owner>/paperdebugger-mcp-server:devafterdocker login ghcr.iowith a PAT scoped to packages.
To consume the newest container, pull the tag emitted by the workflow:
docker pull ghcr.io/<owner>/paperdebugger-mcp-server:main
docker pull ghcr.io/<owner>/paperdebugger-mcp-server:main-<short_sha>Tags main, pr-<id>, and <branch>-<short_sha> are updated during each run; production deployments typically use the main tag or a specific SHA tag for reproducibility.
- Trigger: push to
mainor PR targetingmain. - Inputs: repository source,
${{ secrets.PERSONAL_ACCESS_TOKEN }}for checkout,${{ secrets.GITHUB_TOKEN }}for GHCR login. - Process: checkout → Buildx setup → tag calculation → multi-arch build → push to GHCR (with caching via
type=gha). - Output: versioned Docker images stored in GHCR plus workflow metadata (tags, labels).
- Trigger: push or PR against
mainordevelop. - Inputs: codebase, Node 20 runtime, secrets like
MCP_AUTO_TEST_KEYfor OpenAI calls. - Process: checkout →
npm ci→npm run test:coverage→ uploadcoverage/artifact → append summary → comment on PR (when applicable). - Output: stored coverage artifact, GitHub step summary, and a PR comment showing line/function/branch/statement coverage.