Skip to content

fix: the stdio MCP server asks the open window before changing anything - #17

Merged
nodemode-ai merged 3 commits into
mainfrom
fix/owner-decisions-2026-11-29
Nov 30, 2026
Merged

nodemode-ai merged 3 commits into
mainfrom
fix/owner-decisions-2026-11-29

Conversation

@gbarnai

@gbarnai gbarnai commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The stdio MCP server asks the open formfabric window to approve any tool that changes the garment, using the same prompt agents over HTTP see; read-only tools still answer without asking.
  • With no window open, or when the person declines, changing tools over stdio are refused with a clear sentence and nothing changes.
  • New POST /api/mcp/permit route, reached through a per-start key in a 0600 link file in the data folder; the service signs its verdict so only the running service can approve a change.
  • Tests cover allow, decline, no window, no watcher, read-only calls, the stdio program end to end, and the permit route's key and host checks; docs, the modeling skill and the backend log describe the new rule.

Tests

  • Each change has tests that fail on the code before it.
  • The repo's CI commands were run locally on macOS; every local failure also fails on main in the same environment. Please rely on this PR's CI for Linux and Windows.

How to ship

  • Follows the earlier hardening PR, already merged. Independent of other repos. No version bump.

The stdio MCP server now asks the running formfabric window for approval before any tool that changes the garment, through the same prompt agents over HTTP get. With no window open, or when the person declines, the change is refused with a sentence that says why; read-only tools still answer.

The service writes a small link file in its data folder at start (port and a key made at each start, mode 0600) and removes it at shutdown. The stdio process asks POST /api/mcp/permit with that key, and the service signs its verdict so only the running service can approve.
…r asks

The stdio server now sends a signature of a fresh nonce instead of the link key itself, so a program answering on a port the service left behind never learns the key and cannot approve a change. The permit route also refuses a body nonce other than the signed one.

Also adds the missing space between two sentences of the MCP instructions, and says in the agents page that the stdio server keeps its own garment.
@gbarnai
gbarnai requested a review from nodemode-ai as a code owner November 29, 2026 21:21
…not follow the clock

ZipFile.writestr stamps each entry with the current time at two-second steps, so the outside garment written at the start of a test and the bytes rebuilt for the check could differ when the test crossed a step. The file itself was never touched by forget.
@nodemode-ai
nodemode-ai merged commit e86cf09 into main Nov 30, 2026
7 checks passed
@nodemode-ai
nodemode-ai deleted the fix/owner-decisions-2026-11-29 branch November 30, 2026 18:24
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.

2 participants