Skip to content

Scaffolded mcp-server repos fail their own CI on first push (npm ci with no lockfile, no build output) #102

Closed

Description

@TMHSDigital

Why it matters

The scaffold promises "born green": a generated repo should pass its own CI on the first push. For --type mcp-server, the first CI run fails, so every new MCP server starts red and needs manual fixes.

Evidence

  • No lockfile for npm ci. scaffold/templates/ci.yml.j2:20-28 runs actions/setup-node with cache: npm, then npm ci, but the generator never writes a package-lock.json.
    • On a freshly generated mcp-server, npm ci fails with EUSAGE ... can only install with an existing package-lock.json.
    • setup-node's npm cache step also errors when there is no lockfile.
  • No build output. The generated package.json has bin and main set to dist/index.js and an echo-only build script. No src/, tsconfig.json or tests are generated, so publish.yml would publish a package whose bin does not exist.
  • The docs describe a pipeline that isn't there. scaffold/templates/AGENTS.md.j2:82-84 tells agents that CI does a "TypeScript build" and runs "vitest, offline", but the output contains neither.
  • CI doesn't catch it. standards/born-green-contract.md (C1-C5) and tests/test_scaffold_born_green.py only check the drift checker.

Suggested approach

  1. Generate a minimal working TypeScript MCP skeleton:

    • src/index.ts with one example tool on @modelcontextprotocol/sdk
    • tsconfig.json
    • a vitest smoke test
    • a committed package-lock.json

    Or, as a stopgap, drop cache: npm and use npm install.

  2. Add a born-green clause: "the generated repo's own CI commands succeed on the generated tree".

  3. Add a test, which can be marked slow or nightly, that runs npm ci && npm run build && npm test on a scaffolded mcp-server.

Done when

A freshly scaffolded mcp-server passes its generated ci.yml with no edits, and a test enforces this.

Activity

  1. added
    bug
    priority: high
    on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority: highscaffold

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions