Skip to content

MCP: --root for relative paths; say when claims were not checked - #23

Merged
sajonaro merged 1 commit into
mainfrom
mcp-root-and-skipped
Oct 3, 2026
Merged

sajonaro merged 1 commit into
mainfrom
mcp-root-and-skipped

Conversation

@sajonaro

@sajonaro sajonaro commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Two more issues from live testing.

  • Relative paths resolved against System32. Claude Desktop, going through WSL, starts the server in C:\Windows\System32. writ-mcp --root DIR (or WRIT_MCP_ROOT) now changes to DIR at startup. Paths on the command line stay relative to the launch directory, and a root that doesn't exist exits 2 with a message. A missing relative path now names the working directory and --root. The server never writes to its working directory, only to temporary files.
  • Claims looked clean while the model was broken. Claims and rules are typed against the model, so they still aren't read while it has errors, but writ_validate now adds note E_NOT_CHECKED in claims (and in rules), so a client knows to re-validate after fixing the model.

Docs: docs/mcp.md (a config example with --root) and the CHANGELOG.

Testing: make test passes (257 checks in test_mcp_authoring), and so does make lint. I checked --root by hand against the built binary, including a root that doesn't exist; it has no unit test, because the flag lives in the binary, not the library.

🤖 Generated with Claude Code

From live testing (Claude Desktop via WSL):

- The server's working directory was C:\Windows\System32, so every relative
  model or claims path failed. `writ-mcp --root DIR` (or WRIT_MCP_ROOT) moves
  there before reading anything; command-line paths stay relative to where it
  was started, and a bad root is refused at startup. A missing relative path
  now names the working directory and the flag. The server writes nothing in
  its working directory, only temporary files.
- With errors in both model and claims, only the model's were reported, and
  the claims looked clean until the next round trip. Claims and rules are
  typed against the model, so they are still not read, but writ_validate now
  says so: `note E_NOT_CHECKED in claims`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sajonaro
sajonaro merged commit 23a8fe3 into main Oct 3, 2026
7 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant