sync-agents-settings

March 29, 2026 ยท View on GitHub

License: MIT npm npm downloads TypeScript Node.js pnpm Vitest MCP code style: prettier CI

Sync MCP server configurations and instruction files (CLAUDE.md) from Claude Code to Gemini CLI, Codex CLI, OpenCode, Kiro CLI, Cursor, Kimi CLI, Vibe CLI (Mistral), Qwen Code, Amp (Sourcegraph), Cline CLI, Windsurf, and Aider CLI.

README translations: ๐Ÿ‡น๐Ÿ‡ผ ็น้ซ”ไธญๆ–‡ | ๐Ÿ‡จ๐Ÿ‡ณ ็ฎ€ไฝ“ไธญๆ–‡ | ๐Ÿ‡ฏ๐Ÿ‡ต ๆ—ฅๆœฌ่ชž | ๐Ÿ‡ฐ๐Ÿ‡ท ํ•œ๊ตญ์–ด Support matrix: CLI compatibility matrix

Why

If you use Claude Code as your primary AI coding agent but also switch between other agents (Gemini CLI, Codex CLI, OpenCode, Kiro, Cursor, Kimi CLI, Vibe CLI, Qwen Code, Amp, Cline CLI, Windsurf) to take advantage of their free tiers or different models, you know the pain โ€” every tool has its own MCP config format, and setting them up one by one is tedious. Same goes for instruction files โ€” CLAUDE.md, GEMINI.md, AGENTS.md all need the same content but in different formats.

This tool lets you configure MCP servers and write instructions once in Claude Code, then sync everywhere with a single command.

Quick Start

Install as a Claude Code plugin via marketplace:

# 1. Add the marketplace
claude plugin marketplace add Leoyang183/sync-agents-settings

# 2. Install the plugin
claude plugin install sync-agents-settings

# Then use slash commands in any conversation:
#   /sync               โ€” sync MCP configs (with dry-run preview)
#   /sync-list          โ€” list all MCP servers
#   /sync-diff          โ€” compare configs between agents
#   /sync-doctor        โ€” detect config drift and parse errors
#   /sync-validate      โ€” validate schema and target capabilities
#   /sync-reconcile     โ€” validate + detect drift + sync only missing
#   /sync-instructions  โ€” sync CLAUDE.md to other agents
#   /report-schema      โ€” print or write report JSON schema markdown

The plugin also includes a sync-awareness skill that automatically suggests syncing when you edit MCP settings or CLAUDE.md files.

Option B: CLI via npx

No installation needed โ€” just run with npx:

# List all MCP servers detected from Claude Code
npx sync-agents-settings list

# Preview sync (no files modified)
npx sync-agents-settings sync --dry-run

# Sync to all targets (with automatic backup)
npx sync-agents-settings sync

# Sync CLAUDE.md instructions to all targets
npx sync-agents-settings sync-instructions

Option C: Global Install

# Global install for the `sync-agents` command
npm install -g sync-agents-settings

# Then use directly
sync-agents list
sync-agents sync

Usage

# Sync to a specific target
sync-agents sync --target gemini
sync-agents sync --target codex
sync-agents sync --target opencode
sync-agents sync --target kiro
sync-agents sync --target cursor
sync-agents sync --target kimi
sync-agents sync --target vibe
sync-agents sync --target qwen
sync-agents sync --target amp
sync-agents sync --target cline
sync-agents sync --target windsurf

# Sync to Codex project-level config
sync-agents sync --target codex --codex-home ./my-project/.codex

# Sync to Kimi project-level config
sync-agents sync --target kimi --kimi-home ./my-project/.kimi

# Sync to custom home directories
sync-agents sync --target qwen --qwen-home ./my-project/.qwen
sync-agents sync --target amp --amp-home ./my-project/.amp
sync-agents sync --target cline --cline-home ./my-project/.cline
sync-agents sync --target windsurf --windsurf-home ./my-project/.windsurf

# Compare differences
sync-agents diff

# Check drift / parse errors between Claude and targets
sync-agents doctor

# Validate source schema and target capability compatibility
sync-agents validate

# One-shot safe reconcile (validate + doctor + sync missing)
sync-agents reconcile --dry-run

# CI-friendly JSON output
sync-agents reconcile --report json

# CI-friendly JSON output for drift checker
sync-agents doctor --report json

# CI-friendly JSON output for schema/capability validation
sync-agents validate --report json

# CI-friendly JSON output for sync result
sync-agents sync --report json --dry-run

# CI-friendly JSON output for instruction sync
sync-agents sync-instructions --report json --dry-run --global --target gemini

# CI-friendly JSON output for diff result
sync-agents diff --report json --target gemini codex

# Note: all --report json outputs include `schemaVersion: 1`

Report schema reference: `docs/report-schema.md`

# Regenerate report schema documentation
sync-agents report-schema --write docs/report-schema.md

# CI check: ensure report schema doc is up to date
sync-agents report-schema --check

# Auto-fix from doctor (internally runs reconcile)
sync-agents doctor --fix --dry-run

# Auto-fix after validation passes
sync-agents validate --fix --dry-run

# Skip OAuth-only servers (e.g. Slack)
sync-agents sync --skip-oauth

# Skip backup
sync-agents sync --no-backup

# Verbose output
sync-agents sync -v

# Check only specific targets
sync-agents doctor --target gemini codex

# Check Codex project-level config drift
sync-agents doctor --target codex --codex-home ./.codex

# Validate only selected targets and ignore OAuth-only servers
sync-agents validate --target codex opencode --skip-oauth

# Validation semantics:
# - blank-only command/url values are treated as missing
# - OAuth-only servers produce manual-setup warnings without duplicate field errors

# Reconcile selected targets only
sync-agents reconcile --target gemini codex

# Sync instruction files (CLAUDE.md โ†’ GEMINI.md / AGENTS.md / Kiro steering / Cursor rules / Aider conventions)
# Targets: gemini, codex, opencode, kimi, vibe, kiro, cursor, aider, qwen, amp
sync-agents sync-instructions

# Sync only global instructions
sync-agents sync-instructions --global

# Sync only project-level instructions
sync-agents sync-instructions --local

# Sync to specific targets
sync-agents sync-instructions --target gemini codex kimi vibe aider qwen amp

# Auto-overwrite without prompts (for CI)
sync-agents sync-instructions --on-conflict overwrite

# Keep legacy behavior: remove standalone @import lines instead of expanding
sync-agents sync-instructions --import-mode strip

# Allow standalone @import to read files outside current project root (use with care)
sync-agents sync-instructions --allow-unsafe-imports

# Preview instruction sync
sync-agents sync-instructions --dry-run

Development

git clone https://github.com/Leoyang183/sync-agents-settings.git
cd sync-agents-settings
pnpm install
pnpm dev list        # Run from source
pnpm test            # Run tests

How It Works

Claude Code is the single source of truth for MCP settings, synced to all supported targets.

                                                 โ”Œโ”€โ†’ Gemini Writer    โ”€โ†’ ~/.gemini/settings.json
                                                 โ”œโ”€โ†’ Codex Writer     โ”€โ†’ ~/.codex/config.toml
~/.claude.json โ”€โ”€โ”€โ”€โ”€โ”                            โ”œโ”€โ†’ OpenCode Writer  โ”€โ†’ ~/.config/opencode/opencode.json
                     โ”œโ”€โ†’ Reader โ”€โ†’ UnifiedMcpServer[] โ”€โ”ผโ”€โ†’ Kiro Writer      โ”€โ†’ ~/.kiro/settings/mcp.json
~/.claude/plugins/ โ”€โ”€โ”˜                            โ”œโ”€โ†’ Cursor Writer    โ”€โ†’ ~/.cursor/mcp.json
                                                 โ”œโ”€โ†’ Kimi Writer      โ”€โ†’ ~/.kimi/mcp.json
                                                 โ”œโ”€โ†’ Vibe Writer      โ”€โ†’ ~/.vibe/config.toml
                                                 โ”œโ”€โ†’ Qwen Writer      โ”€โ†’ ~/.qwen/settings.json
                                                 โ”œโ”€โ†’ Amp Writer       โ”€โ†’ ~/.config/amp/settings.json
                                                 โ”œโ”€โ†’ Cline Writer     โ”€โ†’ ~/.cline/data/settings/cline_mcp_settings.json
                                                 โ””โ”€โ†’ Windsurf Writer  โ”€โ†’ ~/.codeium/windsurf/mcp_config.json
StageDescription
ReaderReads from ~/.claude.json and enabled plugin .mcp.json files, merges into a unified format
Gemini WriterJSON โ†’ JSON, type: "http" โ†’ httpUrl, ${VAR} โ†’ $VAR
Codex WriterJSON โ†’ TOML, ${VAR:-default} โ†’ expanded to actual value (env value or fallback)
OpenCode WriterJSON โ†’ JSON, command+args โ†’ merged command array, env โ†’ environment, type: "local"/"remote"
Kiro WriterSame format as Claude, ${VAR:-default} โ†’ expanded
Cursor WriterSame format as Claude, ${VAR:-default} โ†’ expanded
Kimi WriterSame format as Claude, ${VAR:-default} โ†’ expanded
Vibe WriterJSON โ†’ TOML [[mcp_servers]] array-of-tables, explicit transport field, ${VAR:-default} โ†’ expanded
Qwen WriterJSON โ†’ JSON, type: "http" โ†’ httpUrl, ${VAR} โ†’ $VAR (same as Gemini)
Amp WriterJSON โ†’ JSON, uses "amp.mcpServers" key, ${VAR} preserved (same as Claude)
Cline WriterSame format as Claude, ${VAR:-default} โ†’ expanded
Windsurf WriterJSON โ†’ JSON, url โ†’ serverUrl, ${VAR} โ†’ ${env:VAR}

Instruction Sync (sync-instructions)

Syncs CLAUDE.md instruction files to each target's native format:

                                          โ”Œโ”€โ†’ ~/.gemini/GEMINI.md             (plain copy)
                                          โ”œโ”€โ†’ ~/.codex/AGENTS.md              (plain copy)
~/.claude/CLAUDE.md (+ ~/.claude/rules/*.md) โ”€โ†’ expand @imports โ”€โ”€โ”ผโ”€โ†’ ~/.config/opencode/AGENTS.md    (plain copy)
                                          โ”œโ”€โ†’ ~/.kimi/AGENTS.md               (plain copy)
                                          โ”œโ”€โ†’ ~/.vibe/AGENTS.md               (plain copy)
                                          โ”œโ”€โ†’ ~/.qwen/AGENTS.md               (plain copy)
                                          โ”œโ”€โ†’ ~/.config/amp/AGENTS.md         (plain copy)
                                          โ”œโ”€โ†’ ~/.kiro/steering/claude-instructions.md  (+ inclusion: always)
                                          โ””โ”€โ†’ โš  Cursor global not supported  (SQLite)

                                          โ”Œโ”€โ†’ ./GEMINI.md                     (plain copy)
                                          โ”œโ”€โ†’ ./AGENTS.md                     (Codex + OpenCode + Kimi + Vibe + Qwen + Amp share)
./.claude/CLAUDE.md (fallback: ./CLAUDE.md) + ./.claude/rules/*.md โ”€โ†’ expand @imports โ”€โ”€โ”ผโ”€โ†’ .kiro/steering/claude-instructions.md    (+ inclusion: always)
                                          โ””โ”€โ†’ .cursor/rules/claude-instructions.mdc   (+ alwaysApply: true)
TargetGlobalLocalFormat Transform
Gemini~/.gemini/GEMINI.md./GEMINI.mdPlain copy (expand standalone @import lines)
Codex~/.codex/AGENTS.md./AGENTS.mdPlain copy (expand standalone @import lines)
OpenCode~/.config/opencode/AGENTS.md./AGENTS.md (shared with Codex)Plain copy (expand standalone @import lines)
Kimi~/.kimi/AGENTS.md./AGENTS.md (shared with Codex/OpenCode/Vibe/Qwen/Amp)Plain copy (expand standalone @import lines)
Vibe~/.vibe/AGENTS.md./AGENTS.md (shared with Codex/OpenCode/Kimi/Qwen/Amp)Plain copy (expand standalone @import lines)
Qwen Code~/.qwen/AGENTS.md./AGENTS.md (shared with Codex/OpenCode/Kimi/Vibe/Amp)Plain copy (expand standalone @import lines)
Amp~/.config/amp/AGENTS.md./AGENTS.md (shared with Codex/OpenCode/Kimi/Vibe/Qwen)Plain copy (expand standalone @import lines)
ClineNot supportedNot supported (uses .clinerules)โ€”
WindsurfNot supportedNot supported (uses own rules format)โ€”
Aider~/.aider/CONVENTIONS.md.aider/CONVENTIONS.mdPlain copy + upsert read entry in .aider.conf.yml
Kiro~/.kiro/steering/claude-instructions.md.kiro/steering/claude-instructions.mdAdd inclusion: always frontmatter
CursorNot supported (SQLite).cursor/rules/claude-instructions.mdcAdd alwaysApply: true frontmatter

Notes:

  • Local source resolution prefers ./.claude/CLAUDE.md, then falls back to ./CLAUDE.md.
  • Extra rules in .claude/rules/**/*.md are appended automatically (unless already included via @import).
  • If a rule file has frontmatter paths, it is included only when at least one project file matches.
  • @import handling defaults to inline (expand). Use --import-mode strip to remove standalone import lines.
  • By default, standalone @import can only read files inside the current project root. Use --allow-unsafe-imports to opt out.
  • Inline import expansion has guardrails (max depth: 20, max files: 200) to avoid runaway recursion.
  • Aider sync also upserts .aider.conf.yml read so CONVENTIONS.md is loaded automatically (global/project follows the sync scope).
  • Kimi CLI currently loads AGENTS.md from the working directory. ~/.kimi/AGENTS.md is synced as a reusable global template.

When a target file already exists, you'll be prompted to choose: overwrite, append (keep existing + add CLAUDE.md below), or skip. Use --on-conflict overwrite|append|skip for non-interactive mode.

Safety mechanisms:

  • Existing servers are never overwritten (idempotent, safe to re-run)
  • Automatic backup to ~/.sync-agents-backup/ by default (--no-backup to skip)
  • --dry-run previews changes without writing any files

Source: Claude Code

Reads MCP servers from two sources:

  1. ~/.claude.json โ†’ mcpServers object (user-configured servers)
  2. ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/.mcp.json โ†’ enabled plugin MCP servers (matched against ~/.claude/settings.json enabledPlugins)

Claude Code has two .mcp.json formats:

// Format 1: Flat (e.g. context7, firebase)
{ "context7": { "command": "npx", "args": ["-y", "@upstash/context7-mcp"] } }

// Format 2: Nested under mcpServers (e.g. sentry, stripe)
{ "mcpServers": { "sentry": { "type": "http", "url": "https://mcp.sentry.dev/mcp" } } }

Target: Gemini CLI

Writes to ~/.gemini/settings.json โ†’ mcpServers object.

Key format differences from Claude:

  • Claude type: "http" โ†’ Gemini httpUrl
  • Claude type: "sse" โ†’ Gemini url
  • Claude command (stdio) โ†’ Gemini command (same)
  • Env var syntax: Claude ${VAR} โ†’ Gemini $VAR (auto-converted)
// Gemini settings.json
{
  "theme": "Dracula",          // existing settings preserved
  "mcpServers": {
    "context7": {              // stdio server
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"]
    },
    "sentry": {                // http server
      "httpUrl": "https://mcp.sentry.dev/mcp"
    }
  }
}

Target: Codex CLI

Writes to ~/.codex/config.toml (global) by default. Use --codex-home <path> to write to a project-level .codex/config.toml instead.

Note: Codex CLI does NOT merge global and project configs. When a project has .codex/, Codex only reads that directory. Global ~/.codex/ is ignored entirely.

Key format differences:

  • Uses TOML instead of JSON
  • command/args for stdio (same concept)
  • url for HTTP servers (no type field needed)
  • env is a TOML sub-table [mcp_servers.<name>.env]
[mcp_servers.context7]
command = "npx"
args = ["-y", "@upstash/context7-mcp"]

[mcp_servers.sentry]
url = "https://mcp.sentry.dev/mcp"

[mcp_servers.n8n-mcp]
command = "npx"
args = ["n8n-mcp"]

  [mcp_servers.n8n-mcp.env]
  N8N_API_KEY = "your-key"
  N8N_API_URL = "https://your-n8n.example.com"

Target: OpenCode

Writes to ~/.config/opencode/opencode.json โ†’ mcp object.

Key format differences:

  • Root key is mcp (not mcpServers)
  • stdio servers use type: "local" with a merged command array (command + args combined)
  • HTTP/SSE servers use type: "remote"
  • Environment variables use environment field (not env)
// opencode.json
{
  "model": "anthropic/claude-sonnet-4-5",  // existing settings preserved
  "mcp": {
    "context7": {                          // stdio โ†’ local
      "type": "local",
      "command": ["npx", "-y", "@upstash/context7-mcp"]
    },
    "sentry": {                            // http โ†’ remote
      "type": "remote",
      "url": "https://mcp.sentry.dev/mcp"
    },
    "n8n-mcp": {                           // env โ†’ environment
      "type": "local",
      "command": ["npx", "n8n-mcp"],
      "environment": {
        "N8N_API_KEY": "your-key"
      }
    }
  }
}

Target: Kiro CLI

Writes to ~/.kiro/settings/mcp.json โ†’ mcpServers object.

Same format as Claude Code. ${VAR:-default} syntax in URLs is auto-expanded during sync.

Target: Cursor

Writes to ~/.cursor/mcp.json โ†’ mcpServers object.

Same format as Claude Code. ${VAR:-default} syntax in URLs is auto-expanded during sync.

Target: Kimi CLI

Writes to ~/.kimi/mcp.json by default. Use --kimi-home <path> to sync to a custom base directory (for example, project-level .kimi/).

Same format as Claude Code. ${VAR:-default} syntax in URLs is auto-expanded during sync.

Target: Vibe CLI (Mistral)

Writes to ~/.vibe/config.toml by default. Use --vibe-home <path> to sync to a custom base directory (for example, project-level .vibe/).

Key format differences:

  • Uses TOML [[mcp_servers]] (array of tables) โ€” each entry has a name and explicit transport field
  • Claude "http" โ†’ Vibe "streamable-http", Claude "sse" โ†’ Vibe "http"
  • command is a string (not array), env is a TOML sub-table
  • ${VAR:-default} syntax in URLs is auto-expanded during sync
[[mcp_servers]]
name = "context7"
transport = "stdio"
command = "npx"
args = ["-y", "@upstash/context7-mcp"]

[[mcp_servers]]
name = "supabase"
transport = "streamable-http"
url = "https://mcp.supabase.com/mcp"

Target: Qwen Code

Writes to ~/.qwen/settings.json โ†’ mcpServers object. Use --qwen-home <path> to sync to a custom base directory.

Same conversion pattern as Gemini:

  • Claude type: "http" โ†’ Qwen httpUrl
  • Claude type: "sse" โ†’ Qwen url
  • Env var syntax: Claude ${VAR} โ†’ Qwen $VAR (auto-converted)
// ~/.qwen/settings.json
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"]
    },
    "sentry": {
      "httpUrl": "https://mcp.sentry.dev/mcp"
    }
  }
}

Target: Amp (Sourcegraph)

Writes to ~/.config/amp/settings.json โ†’ "amp.mcpServers" key. Use --amp-home <path> to sync to a custom base directory.

Key format differences:

  • Root key is "amp.mcpServers" (not mcpServers)
  • url field preserved as-is (same as Claude)
  • ${VAR} syntax preserved (no conversion needed)
// ~/.config/amp/settings.json
{
  "amp.mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"]
    },
    "sentry": {
      "type": "http",
      "url": "https://mcp.sentry.dev/mcp"
    }
  }
}

Target: Cline CLI

Writes to ~/.cline/data/settings/cline_mcp_settings.json โ†’ mcpServers object. Use --cline-home <path> to sync to a custom base directory.

Same format as Claude Code. ${VAR:-default} syntax in URLs is auto-expanded during sync.

// ~/.cline/data/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"]
    },
    "sentry": {
      "type": "http",
      "url": "https://mcp.sentry.dev/mcp"
    }
  }
}

Target: Windsurf

Writes to ~/.codeium/windsurf/mcp_config.json โ†’ mcpServers object. Use --windsurf-home <path> to sync to a custom base directory.

Key format differences:

  • Claude url โ†’ Windsurf serverUrl
  • Env var syntax: Claude ${VAR} โ†’ Windsurf ${env:VAR} (auto-converted)
// ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"]
    },
    "sentry": {
      "type": "http",
      "serverUrl": "https://mcp.sentry.dev/mcp"
    }
  }
}

Transport Type Mapping

Claude CodeGemini CLICodex CLIOpenCodeKiro CLICursorKimi CLIVibe CLIQwen CodeAmpCline CLIWindsurf
command + args (stdio)command + argscommand + argstype: "local", command: [cmd, ...args]same as Claudesame as Claudesame as Claudetransport: "stdio", command + args + namecommand + argssame as Claudesame as Claudecommand + args
type: "http" + urlhttpUrlurltype: "remote", urlsame as Claudesame as Claudesame as Claudetransport: "streamable-http", url + namehttpUrlsame as Claudesame as ClaudeserverUrl
type: "sse" + urlurlurltype: "remote", urlsame as Claudesame as Claudesame as Claudetransport: "http", url + nameurlsame as Claudesame as ClaudeserverUrl
envenvenvenvironmentenvenvenvenvenvenvenvenv
oauthskippedskippedskippedskippedskippedskippedskippedskippedskippedskippedskipped

Backup

Every sync automatically backs up all affected config files to ~/.sync-agents-backup/<timestamp>/ before writing, preserving the original directory structure relative to ~:

~/.sync-agents-backup/2026-03-20T00-06-08-042Z/
โ”œโ”€โ”€ .claude.json                  # โ† ~/.claude.json
โ”œโ”€โ”€ .claude/
โ”‚   โ””โ”€โ”€ settings.json             # โ† ~/.claude/settings.json
โ”œโ”€โ”€ .gemini/
โ”‚   โ””โ”€โ”€ settings.json             # โ† ~/.gemini/settings.json
โ”œโ”€โ”€ .codex/
โ”‚   โ””โ”€โ”€ config.toml               # โ† ~/.codex/config.toml
โ”œโ”€โ”€ .config/
โ”‚   โ”œโ”€โ”€ opencode/
โ”‚   โ”‚   โ””โ”€โ”€ opencode.json         # โ† ~/.config/opencode/opencode.json
โ”‚   โ””โ”€โ”€ amp/
โ”‚       โ””โ”€โ”€ settings.json         # โ† ~/.config/amp/settings.json
โ”œโ”€โ”€ .kiro/
โ”‚   โ””โ”€โ”€ settings/
โ”‚       โ””โ”€โ”€ mcp.json              # โ† ~/.kiro/settings/mcp.json
โ”œโ”€โ”€ .cursor/
โ”‚   โ””โ”€โ”€ mcp.json                  # โ† ~/.cursor/mcp.json
โ”œโ”€โ”€ .kimi/
โ”‚   โ””โ”€โ”€ mcp.json                  # โ† ~/.kimi/mcp.json
โ”œโ”€โ”€ .vibe/
โ”‚   โ””โ”€โ”€ config.toml               # โ† ~/.vibe/config.toml
โ”œโ”€โ”€ .qwen/
โ”‚   โ””โ”€โ”€ settings.json             # โ† ~/.qwen/settings.json
โ”œโ”€โ”€ .cline/
โ”‚   โ””โ”€โ”€ data/
โ”‚       โ””โ”€โ”€ settings/
โ”‚           โ””โ”€โ”€ cline_mcp_settings.json  # โ† ~/.cline/data/settings/cline_mcp_settings.json
โ””โ”€โ”€ .codeium/
    โ””โ”€โ”€ windsurf/
        โ””โ”€โ”€ mcp_config.json       # โ† ~/.codeium/windsurf/mcp_config.json

Use --no-backup to skip. Target directories that don't exist (CLI not installed) will be skipped with a warning, not created.

Config File Locations

MCP Settings

ToolConfig PathFormat
Claude Code (user MCP)~/.claude.jsonJSON
Claude Code (settings)~/.claude/settings.jsonJSON
Claude Code (plugin MCP)~/.claude/plugins/cache/.../.mcp.jsonJSON
Gemini CLI~/.gemini/settings.jsonJSON
Codex CLI (global)~/.codex/config.tomlTOML
Codex CLI (project).codex/config.toml (use --codex-home)TOML
OpenCode (global)~/.config/opencode/opencode.jsonJSON
OpenCode (project)opencode.json in project rootJSON
Kiro CLI (global)~/.kiro/settings/mcp.jsonJSON
Kiro CLI (project).kiro/settings/mcp.json in project rootJSON
Cursor (global)~/.cursor/mcp.jsonJSON
Cursor (project).cursor/mcp.json in project rootJSON
Kimi CLI (global)~/.kimi/mcp.jsonJSON
Kimi CLI (project).kimi/mcp.json (use --kimi-home ./.kimi)JSON
Vibe CLI (global)~/.vibe/config.tomlTOML
Vibe CLI (project).vibe/config.toml (use --vibe-home ./.vibe)TOML
Qwen Code (global)~/.qwen/settings.jsonJSON
Qwen Code (project).qwen/settings.json (use --qwen-home ./.qwen)JSON
Amp (global)~/.config/amp/settings.jsonJSON
Amp (project).config/amp/settings.json (use --amp-home ./.amp)JSON
Cline CLI (global)~/.cline/data/settings/cline_mcp_settings.jsonJSON
Cline CLI (project).cline/data/settings/cline_mcp_settings.json (use --cline-home ./.cline)JSON
Windsurf (global)~/.codeium/windsurf/mcp_config.jsonJSON
Windsurf (project).codeium/windsurf/mcp_config.json (use --windsurf-home ./.codeium/windsurf)JSON

Instruction Files

ToolGlobal PathProject PathFormat
Claude Code~/.claude/CLAUDE.md./.claude/CLAUDE.md (fallback ./CLAUDE.md)Markdown
Gemini CLI~/.gemini/GEMINI.md./GEMINI.mdMarkdown
Codex CLI~/.codex/AGENTS.md./AGENTS.mdMarkdown
OpenCode~/.config/opencode/AGENTS.md./AGENTS.mdMarkdown
Kimi CLI~/.kimi/AGENTS.md./AGENTS.mdMarkdown
Vibe CLI~/.vibe/AGENTS.md./AGENTS.mdMarkdown
Qwen Code~/.qwen/AGENTS.md./AGENTS.mdMarkdown
Amp~/.config/amp/AGENTS.md./AGENTS.mdMarkdown
Cline CLINot supportedNot supported (uses .clinerules)โ€”
WindsurfNot supportedNot supported (uses own rules format)โ€”
Kiro CLI~/.kiro/steering/claude-instructions.md.kiro/steering/claude-instructions.mdMarkdown + frontmatter
CursorNot supported (SQLite).cursor/rules/claude-instructions.mdcMDC (Markdown + frontmatter)

Claude Code Plugin

This project is both a Claude Code plugin and marketplace, providing slash commands and a contextual skill directly inside Claude Code conversations.

Installation

# From GitHub (remote โ€” clones the repo)
claude plugin marketplace add Leoyang183/sync-agents-settings
claude plugin install sync-agents-settings

# Or from local path (symlink โ€” reflects local changes instantly)
claude plugin marketplace add /path/to/sync-agents-settings
claude plugin install sync-agents-settings

Slash Commands

CommandDescription
/syncSync MCP server configs to other agents (with dry-run preview and confirmation)
/sync-listList all MCP servers configured in Claude Code
/sync-diffCompare MCP configs between Claude and other agents
/sync-doctorDetect MCP config drift between Claude and targets
/sync-validateValidate MCP schema and target capability compatibility
/sync-reconcileValidate + detect drift + sync only missing servers
/sync-instructionsSync CLAUDE.md instruction files to other agent formats
/report-schemaPrint or write report JSON schema markdown

Sync-Awareness Skill

The plugin includes a skill that automatically detects when you're editing MCP settings (.claude.json, .mcp.json) or CLAUDE.md files, and suggests syncing to other agents.

Plugin Development

# Validate plugin/marketplace structure
claude plugin validate /path/to/sync-agents-settings

Limitations

  • OAuth servers (e.g. Slack with oauth.clientId) are synced as URL-only โ€” you'll need to authenticate manually in each CLI
  • ${CLAUDE_PLUGIN_ROOT} env vars won't resolve in other CLIs
  • Codex CLI doesn't support ${VAR:-default} syntax in URLs โ€” these are auto-expanded during sync (env value if set, otherwise the default)
  • Re-running sync will not overwrite existing entries (safe to run multiple times)
  • Codex CLI does NOT merge global and project configs โ€” when .codex/ exists in a project, global ~/.codex/ is ignored
  • If target config directories don't exist, sync will skip that target (won't create directories)

Star History

Star History Chart

License

MIT