Skip to content

fix: doctor warns for an MCP server that starts through cmd /c (0.37.1) - #77

Merged
llima merged 11 commits into
mainfrom
fix/mcp-launcher-doctor
Oct 24, 2026
Merged

llima merged 11 commits into
mainfrom
fix/mcp-launcher-doctor

Conversation

@llima

@llima llima commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Version bumped to 0.37.1. Merging publishes craftar@0.37.1 to npm after approval in the npm environment.
  • craftar doctor gains the check mcp-launcher. It is present when the plan writes an MCP server. It gives one warn per server whose command is cmd (or a path to cmd.exe) and whose first argument is /c or /k: such a server starts on Windows only. The warning names the server and the files, never a command or args value. Otherwise the check is one ok. doctor --json gains the id, and the doctor tool of craftar mcp carries it.
  • mcp-env and mcp-launcher now share one walk of the written servers (writtenServers). The mcp-env lines were pinned byte for byte before the refactor. MCP_FILE in src/emitters/shared.ts is the one spelling of the two MCP file paths, checked against Target.
  • craftar import warns once per such server it reads from .mcp.json, in the summary and under --report. It writes the server as read.
  • README: the doctor row; a new section, MCP servers on Windows and Linux, covering the portable form and a matrix measured on Linux (2026-10-23) and on native Windows (2026-10-24); and to 0.37.1.
  • Contract change: a workspace that writes such a server now gets a warn, so doctor --strict exits 1 where it exited 0, as stated in Upgrading. No emitted byte, lock, registry entry or --json shape changes.

Test plan

  • npm run typecheck: pass
  • npm run build: pass
  • npx vitest run --maxWorkers=6 --exclude test/ci.test.ts: 3652 passed, 11 skipped (155 files passed, 1 skipped). Oracle skipped (no fixture).
  • No golden or pin file is touched, and all are green. The emitters only read the two paths from MCP_FILE (same strings).
  • Intended test change: test/doctor-merged.test.ts gains mcp-launcher in its id list and goes from ok: 8 to ok: 9 (its fixture writes a portable server).
  • New tests, each seen failing first: test/mcp-launcher.test.ts; mcp-launcher cases in test/doctor.test.ts; schema 4 rendering in test/server-params-doctor.test.ts; the doctor tool in test/mcp-tools.test.ts; doctor --strict in test/cli.test.ts; the import warning in test/importer.test.ts and test/import-report-cli.test.ts.

@llima
llima merged commit e240564 into main Oct 24, 2026
8 checks passed
@llima
llima deleted the fix/mcp-launcher-doctor branch October 24, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant