Skip to content

Commit 17ae770

Browse files
docs(cli-ref): update mcp sync command documentation
1 parent 7f448a1 commit 17ae770

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

docs/articles/users/CLIReference.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,8 @@ When configuring a server with fields not supported by the target host, those fi
736736

737737
Synchronize MCP configurations across environments and hosts.
738738

739+
The sync command displays a preview of servers to be synced before requesting confirmation, giving visibility into which servers will be affected.
740+
739741
Syntax:
740742

741743
`hatch mcp sync [--from-env ENV | --from-host HOST] --to-host HOSTS [--servers SERVERS | --pattern PATTERN] [--dry-run] [--auto-approve] [--no-backup]`
@@ -751,6 +753,27 @@ Syntax:
751753
| `--auto-approve` | flag | Skip confirmation prompts | false |
752754
| `--no-backup` | flag | Skip backup creation before synchronization | false |
753755

756+
**Example Output (pre-prompt)**:
757+
758+
```
759+
hatch mcp sync:
760+
[INFO] Servers: weather-server, my-tool (2 total)
761+
[SYNC] environment 'dev' → 'claude-desktop'
762+
[SYNC] environment 'dev' → 'cursor'
763+
Proceed? [y/N]:
764+
```
765+
766+
When more than 3 servers match, the list is truncated: `Servers: srv1, srv2, srv3, ... (7 total)`
767+
768+
**Error Output**:
769+
770+
Sync failures use standardized error formatting with structured details:
771+
772+
```
773+
[ERROR] Synchronization failed
774+
claude-desktop: Config file not found
775+
```
776+
754777
#### `hatch mcp remove server`
755778

756779
Remove an MCP server from one or more hosts.

0 commit comments

Comments
 (0)