Skip to content

feat(mcp): settings_set, notify and mute, with a write switch and audit lines - #287

Merged
StuBehan merged 3 commits into
mainfrom
feat/mcp-write
Nov 25, 2026
Merged

StuBehan merged 3 commits into
mainfrom
feat/mcp-write

Conversation

@StuBehan

@StuBehan StuBehan commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Second of four for the local MCP server, following #286. This is the write side, which is the main reason for doing it: an agent can tell you something, and change a setting when you ask it to.

  • notify raises a nudge in Events under a new mcp source, with a title, message, kind (done, waiting, info), an https link and a tag. Acting on it opens the link, otherwise takes you back to the session that sent it (matched on the Claude session id or the pid the bridge saw), or for Claude Desktop the app. The hook socket can't post as mcp, a script claiming it is read as a script
  • settings_set changes any setting the registry says is writable. The ones that protect how permission prompts reach you, the away lock and the hotkeys stay read only, each with a reason the client is told. Every change leaves a line in Events saying which client set what
  • mute for up to a day, 0 resumes. It spares permission prompts, so an agent can quiet stack-nudge but not hide its own prompt from you
  • Settings → Actions gets two rows: one copies the claude mcp add command, and "MCP clients can change settings" (STACKNUDGE_MCP_WRITES, on by default) turns settings_set off, which is itself not writable over MCP
  • the feed's duplicate check counts the source too

Before and after, Settings → Actions:

A nudge from Claude Code in Events:

They're from scripts/render-screenshots.sh <dir> mcp, which this adds, so they're the real views on fixtures.

I've had this installed and driven it with a scripted client and real Claude Code: refusals for read-only keys, bad values, http and javascript links all come back as tool errors with the reason, and the nudge lands against the right session.

Tests: MCPWriteTests, MCPNudgeTests and the session tests pass, plus the EventStore and EventsList suites.

Base automatically changed from feat/mcp-read to main November 25, 2026 00:32
…inute

Two nudges a second apart that share a message and title but come from different sources are two events. Tests pin the title and source part, since two notify calls with no message are the common case. Muting for one minute no longer reads "1 minutes".
render-screenshots gains an mcp set: Settings, Actions with the two new rows, and an MCP client's nudge in Events. Its filter chip read "Mcp"; mcp joins the tag acronyms.
@StuBehan
StuBehan merged commit 7218b7d into main Nov 25, 2026
6 checks passed
@StuBehan
StuBehan deleted the feat/mcp-write branch November 25, 2026 00:44
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