cadcraft/apps
Valentin Klein bcbbc5e8a4
cadcraft-cli mcp: --connect without HOST:PORT is an error, not a headless session (fixes #103) (#167)
* cadcraft-cli mcp: --connect without HOST:PORT is an error, not a headless session (#103)

`mcp --connect` with no address (or an empty or flag-like one) fell through
to the headless backend, so a client meant for the app got successful edits
in a separate drawing. The mcp arguments now go through parse_mcp_args:
--connect must be followed by a non-empty value that doesn't start with `-`,
unknown arguments and a repeated --connect are rejected, and every error
exits non-zero before any MCP request is served. Plain `mcp` is still
headless; a real address still connects, and an unreachable one still fails.

- Unit tests for the parser; integration tests (tests/mcp_connect.rs) run the
  binary: missing/empty/flag-like address, headless control, loopback
  endpoint routing, closed port.
- docs/mcp.md says what happens without an address.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Move tests away from other PRs' hunks to avoid merge conflicts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:15:50 -04:00
..
cadcraft M1/M2/M6/M10: draw/modify depth, grips API, layouts/viewports/PLOT to PDF, GPU canvas, R-tree index 2026-10-06 00:40:03 -04:00
cadcraft-cli cadcraft-cli mcp: --connect without HOST:PORT is an error, not a headless session (fixes #103) (#167) 2026-10-10 12:15:50 -04:00
cadcraft-web M1/M2/M6/M10: draw/modify depth, grips API, layouts/viewports/PLOT to PDF, GPU canvas, R-tree index 2026-10-06 00:40:03 -04:00