feat: improve MCP sync UX (enable/disable/status, *bool semantics)#45
Open
sametbrr wants to merge 1 commit into
Open
feat: improve MCP sync UX (enable/disable/status, *bool semantics)#45sametbrr wants to merge 1 commit into
sametbrr wants to merge 1 commit into
Conversation
Add `mcp status`, `mcp enable`, and `mcp disable` subcommands and make the auto-sync setting an explicit, inspectable tri-state. - `mcp status` shows auto-sync state, configured server count, and whether there are unpushed local changes. - `mcp enable` writes `mcp_sync: true` and immediately pushes the current MCP state, so enabling auto-sync syncs right away. Subsequent push/pull auto-include MCP. - `mcp disable` writes `mcp_sync: false` explicitly so the disabled state is visible in config. The `MCPSync` config field becomes `*bool` with `omitempty`: - nil (field absent) reads as disabled, so old configs keep working with no migration step; - &true = auto-sync enabled; - &false = explicitly disabled and visible in config. This keeps full backward compatibility while encoding all three states in the type itself, avoiding a separate config-migration path.
This was referenced Jun 20, 2026
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.
This is one of two focused PRs that replace #40 (which bundled paths + MCP + docs into a single 688-line change). This PR contains only the MCP sync UX work; the paths redesign is a separate PR.
What changed
New
mcpsubcommands:mcp status— shows auto-sync state, configured server count, and whether there are unpushed local changes.mcp enable— writesmcp_sync: trueand immediately pushes the current MCP state, so enabling auto-sync syncs right away. Subsequentpush/pullauto-include MCP.mcp disable— writesmcp_sync: falseexplicitly so the disabled state is visible in config.--include-mcponpush/pullstill works for one-off syncs without changing config.On the
*booldesign (re: review feedback on #40)The
MCPSyncconfig field becomes*boolwithomitempty. This was a deliberate choice over a config migration, and I think it's the simpler option here:&true= auto-sync enabled.&false= explicitly disabled, written to config so the state is visible/inspectable (a plainbool+omitemptycan't distinguish "off" from "unset").So the three states (unset / on / off) are encoded in the type itself. A migration would have to detect old configs and rewrite them on first load to achieve the same backward compatibility; the pointer keeps that logic out of the load path entirely.
Docs
CLAUDE.mdandREADME.mdupdated to document the newmcpsubcommands and the*boolfield semantics.Scope
Diff is limited to MCP only:
cmd/claude-sync/main.go(3 new subcommands + 2 push/pull check sites),internal/config/config.go(field type),internal/config/config_test.go(adapt existing test to the new type), and the MCP doc sections.