Repository navigation
feat(mcp): settings_set, notify and mute, with a write switch and audit lines - #287
Merged
Merged
Conversation
…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
force-pushed
the
feat/mcp-write
branch
from
November 25, 2026 00:34
22427ab to
ccb827a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
notifyraises a nudge in Events under a newmcpsource, 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 asmcp, a script claiming it is read as a scriptsettings_setchanges 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 whatmutefor up to a day, 0 resumes. It spares permission prompts, so an agent can quiet stack-nudge but not hide its own prompt from youclaude mcp addcommand, and "MCP clients can change settings" (STACKNUDGE_MCP_WRITES, on by default) turns settings_set off, which is itself not writable over MCPBefore 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,MCPNudgeTestsand the session tests pass, plus the EventStore and EventsList suites.