Skip to content

bootstrap writes .mcp.json with unpinned npx, bypassing the repo's pinned CLI #399

Closed

Description

@stackbilt-admin

Problem

bootstrap writes an .mcp.json that runs the CLI through an unpinned npx (packages/cli/src/commands/bootstrap.ts:947-950 on main):

{ "mcpServers": { "charter": { "command": "npx", "args": ["@stackbilt/cli", "serve", "--ai-dir", ".ai"] } } }

The same template is used in a repo that pins the CLI as a devDependency and uses pnpm.

Why it matters

.mcp.json is committed and agent clients can start it automatically. Before dependencies are installed, npx can fetch whatever is currently latest, so a repo that pinned the CLI may run a different, unreviewed version. This is the same class of problem #380 and #379 fixed for CI and git hooks; those fixes did not cover this file.

Expected

Follow the #379/#380 approach and resolve through the repo's package manager with no fetch, for example pnpm exec charter serve --ai-dir .ai, or npm exec --no --package=@stackbilt/cli -- charter serve --ai-dir .ai for npm.

Scope

The generated file is measured on 2.1.0 and the template was read on main. I did not observe an actual version mismatch at runtime.

Activity

  1. added
    bug
    priority:p1
    on Oct 31, 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:p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions