Sync MCP (Model Context Protocol) configurations across AI tools
Project description
mcp-sync
Sync MCP (Model Context Protocol) configurations across AI tools.
Overview
mcp-sync is a command-line tool that helps you manage and synchronize MCP server configurations across different AI coding tools like Claude Desktop, Claude Code, Cline, VS Code extensions, and more.
Features
- Auto-discovery: Automatically finds MCP configs on your system
- Manual registration: Add custom config file locations for future-proofing
- Global & project configs: Supports both user-wide and project-specific servers
- Conflict resolution: Smart merging with project configs taking priority
- Dry-run mode: Preview changes before applying them
- Cross-platform: Works on macOS, Windows, and Linux
Installation
Quick Usage (Recommended)
uvx mcp-sync status
uvx mcp-sync sync --dry-run
Persistent Installation
uv tool install mcp-sync
mcp-sync status
Development Install
git clone <repo-url>
cd mcp-sync
./scripts/setup.sh # Installs dependencies and git hooks automatically
Quick Start
-
Scan for existing configs:
mcp-sync scan -
Check current status:
mcp-sync status -
Add a server to global config:
mcp-sync add-server filesystem # Follow prompts to configure
-
Preview sync changes:
mcp-sync diff mcp-sync sync --dry-run
-
Sync configurations:
mcp-sync sync
Commands
Discovery & Status
mcp-sync scan- Auto-discover known MCP configsmcp-sync status- Show sync statusmcp-sync diff- Show config differences
Config Location Management
mcp-sync add-location <path> [--name <alias>]- Register custom config filemcp-sync remove-location <path>- Unregister config locationmcp-sync list-locations- Show all registered config paths
Sync Operations
mcp-sync sync- Sync all registered configsmcp-sync sync --dry-run- Preview changes without applyingmcp-sync sync --global-only- Sync only global configsmcp-sync sync --project-only- Sync only project configsmcp-sync sync --location <path>- Sync specific location only
Server Management
mcp-sync add-server <name>- Add MCP server to sync (interactive prompts)mcp-sync add-server <name> --command <cmd> --args <args> --env <vars> --scope <global|project>- Add server with inline parametersmcp-sync remove-server <name>- Remove server from sync (interactive prompts)mcp-sync remove-server <name> --scope <global|project>- Remove server with inline scopemcp-sync list-servers- Show all managed servers
Migration
mcp-sync vacuum- Import MCP servers from discovered configs--auto-resolve <first|last>choose conflict resolution automatically--skip-existingavoid overwriting servers already in global config
Adding Servers: When adding a server, you need to provide:
- Command: The executable to run (e.g.,
python,npx,node) - Arguments: Command-line arguments (comma-separated, optional)
- Environment: Environment variables as
KEY=valuepairs (comma-separated, optional) - Scope: Whether to add to global config (synced everywhere) or project config (this project only)
Interactive example:
mcp-sync add-server filesystem
# Prompts for: scope, command, args, env vars
Automated example:
mcp-sync add-server filesystem --command npx --args "-y,@modelcontextprotocol/server-filesystem,/home/user/docs" --scope global
Project Management
mcp-sync init- Create project.mcp.jsonmcp-sync template- Show template config
Client Management
mcp-sync list-clients- Show all supported clients and their detection statusmcp-sync client-info [client-id]- Show detailed client information and pathsmcp-sync edit-client-definitions- Edit user client definitions to add custom clients
Configuration Hierarchy
mcp-sync uses a three-tier configuration system:
-
Global Config (
~/.mcp-sync/global.json)- Personal development servers
- Synced across all tools
-
Project Config (
.mcp.jsonin project root)- Project-specific servers
- Version controlled with your project
- Takes priority over global config
-
Tool Configs (Auto-discovered locations)
- Claude Desktop, VS Code, Cline, etc.
- Updated by sync operations
Supported Tools
mcp-sync uses a configuration-driven approach to support AI tools and editors. Client definitions are managed through JSON configuration files.
Built-in client support:
- Claude Desktop - Official Claude Desktop application
- Claude Code - Claude CLI for code editing
- Cline - VS Code extension for AI assistance
- Roo - Roo VS Code extension for AI assistance
- VS Code User Settings - VS Code global user settings
- Cursor - Cursor AI code editor
- Continue - Continue VS Code extension
Run mcp-sync list-clients to see which clients are detected on your system, or mcp-sync client-info <client-id> for detailed information about specific clients.
Adding custom clients: Users can add their own client definitions by running mcp-sync edit-client-definitions. This creates ~/.mcp-sync/client_definitions.json where custom client configurations can be added. User definitions take precedence over built-in ones, allowing customization and adding support for new tools without modifying the codebase.
Example Workflow
# 1. Initialize project config
mcp-sync init
# 2. Add project-specific server
mcp-sync add-server database
# Choose "2. Project config"
# Command: python
# Args: /path/to/db-server.py
# Env: DB_URL=postgresql://...
# 3. Add global development server
mcp-sync add-server filesystem
# Choose "1. Global config"
# Command: npx
# Args: -y, @modelcontextprotocol/server-filesystem, /home/user
# 4. Sync to all tools
mcp-sync sync
# 5. Check status
mcp-sync status
Configuration File Format
MCP Server Configuration
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/directory"
]
},
"custom-server": {
"command": "python",
"args": ["/path/to/server.py"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
Development
Requirements
- Python 3.12+
- uv package manager
Setup
git clone <repo-url>
cd mcp-sync
uv sync
uv pip install -e .
Code Quality
uv run ruff check . # Linting
uv run ruff format . # Formatting
uv run pytest # Tests (when available)
Running Tests
Tests require the package to be on PYTHONPATH. Either install it in editable mode:
uv pip install -e .
uv run pytest
or set PYTHONPATH manually when invoking pytest:
PYTHONPATH=$PWD uv run pytest
License
[License details here]
Contributing
[Contributing guidelines here]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_sync-0.3.3.tar.gz.
File metadata
- Download URL: mcp_sync-0.3.3.tar.gz
- Upload date:
- Size: 36.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78627983b0a2577fdc2bff665f9c2c07bdd162eb9e0349787d284a43754fa64f
|
|
| MD5 |
84010713cba6c3e9cf4cca37ba5bde59
|
|
| BLAKE2b-256 |
657b08f641e27c6a559fb6f872158e6b2d9b1d7cdf2d6d296a63a65ca3890585
|
Provenance
The following attestation bundles were made for mcp_sync-0.3.3.tar.gz:
Publisher:
publish.yml on ztripez/mcp-sync
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_sync-0.3.3.tar.gz -
Subject digest:
78627983b0a2577fdc2bff665f9c2c07bdd162eb9e0349787d284a43754fa64f - Sigstore transparency entry: 244190619
- Sigstore integration time:
-
Permalink:
ztripez/mcp-sync@346aea44b11cff8473711ed6397a68258d98fa55 -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/ztripez
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@346aea44b11cff8473711ed6397a68258d98fa55 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mcp_sync-0.3.3-py3-none-any.whl.
File metadata
- Download URL: mcp_sync-0.3.3-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce90b78affdafb2eb7ccdde0c8a6c30330e7cea11ac5d6b617cea0bfd7a43204
|
|
| MD5 |
fabd778e9b6c5615c4b573e61f8b6fee
|
|
| BLAKE2b-256 |
1625d08bd10ea0d7f30bfe55245e03fd3f4064a6dd89ee1cc399a2b4397c96ae
|
Provenance
The following attestation bundles were made for mcp_sync-0.3.3-py3-none-any.whl:
Publisher:
publish.yml on ztripez/mcp-sync
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_sync-0.3.3-py3-none-any.whl -
Subject digest:
ce90b78affdafb2eb7ccdde0c8a6c30330e7cea11ac5d6b617cea0bfd7a43204 - Sigstore transparency entry: 244190626
- Sigstore integration time:
-
Permalink:
ztripez/mcp-sync@346aea44b11cff8473711ed6397a68258d98fa55 -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/ztripez
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@346aea44b11cff8473711ed6397a68258d98fa55 -
Trigger Event:
release
-
Statement type: