Local tooling for keeping agent/client configuration consistent across Claude Code, Codex, and OpenCode.
The MCP sync utility keeps MCP server definitions in one source file and renders each client-specific config format. It supports local stdio servers, remote HTTP/SSE servers where each client supports them, per-platform include/exclude rules, and platform-specific overrides for auth differences.
Canonical files live in mcp-sync/:
mcp-sync/servers.example.jsonis a template for your local MCP servers.mcp-sync/servers.jsondefines MCP servers once and is intentionally ignored by git.mcp-sync/sync-mcp-configs.mjsupdates Claude, Codex, and OpenCode configs.mcp-sync/test-sync-mcp-configs.mjsruns fixture checks without touching live configs.mcp-sync/servers.schema.jsondocuments the source format.
Set up your local config:
cp mcp-sync/servers.example.json mcp-sync/servers.jsonThen edit mcp-sync/servers.json for your local paths and MCP server names.
Run it with:
node ~/projects/agent-tooling/mcp-sync/sync-mcp-configs.mjsOr point it at another source or backup directory:
node ~/projects/agent-tooling/mcp-sync/sync-mcp-configs.mjs --source ./servers.json
node ~/projects/agent-tooling/mcp-sync/sync-mcp-configs.mjs --backup-dir ~/.local/state/agent-tooling/mcp-sync/backups/manualEach source file is authoritative for the target files it configures. Multiple profiles targeting the same Codex config replace this tool's generated Codex block rather than merging generated blocks from each profile.
Restart already-running agent sessions after syncing so they reload MCP tools.
Before overwriting an existing target config, the sync utility copies it into a timestamped backup directory under ~/.local/state/agent-tooling/mcp-sync/backups/, or into backupDir / --backup-dir when configured. New target files are created without backups.
Run fixture checks with:
node mcp-sync/test-sync-mcp-configs.mjsUseful source fields:
type: "local"usescommand,args, and optionalenvironment.type: "remote"usesurl, optionalheaders, and platform-specific OAuth config.platformsincludes a server only for listed clients.excludePlatformsomits a server from listed clients.claude,codex, andopencodeoverride fields for one client, orfalsedisables that server for that client.claudemeans Claude Code's local MCP config, not Claude.ai account connectors. UseexcludePlatforms: ["claude"]when Claude.ai already provides the server.- Claude MCP targets use
mcpConfigPathfor~/.claude.jsonor.mcp.json;settingsPathis only for optional permissions allow-list updates. - Target paths and source paths support
~expansion. - A local
*.state.jsonfile tracks generated JSON-target servers, Codex target paths, and Claude MCP permission entries so stale entries can be pruned on later syncs.
Skills (SKILL.md files) are managed differently per platform:
- Claude Code loads skills via the plugin system (marketplace plugins at
~/.claude/plugins/). Personal skills can also go in~/.claude/skills/, but avoid duplicating what a plugin already provides. - Codex, OpenCode, OpenClaw load skills from their respective directories (
~/.codex/skills/,~/.config/opencode/skills/,~/.openclaw/skills/).
skillshare syncs a single source directory to all non-Claude targets:
brew install skillshare
skillshare initConfiguration lives at ~/.config/skillshare/config.yaml. Point source: at your skills repo's skills directory, then add targets:
skillshare target add codex ~/.codex/skills
skillshare target add opencode ~/.config/opencode/skills
skillshare target add openclaw ~/.openclaw/skillsSet Codex to copy mode so skills survive system updates that rebuild ~/.codex/skills/:
skillshare target codex --mode copySync after editing skills or after a platform update wipes a target directory:
skillshare syncClaude Code's plugin system bundles skills with agents, hooks, and MCP servers. Most of the Claude Code ecosystem distributes via plugins/marketplaces, not raw SKILL.md files. Using the plugin for Claude Code and skillshare for everything else avoids duplicates and keeps each platform using its native distribution mechanism.
Codex periodically rebuilds ~/.codex/skills/ during system skill updates, which deletes all user-installed skills. Copy mode means skillshare sync restores them. Symlink mode (the default for other targets) would leave dangling links after a rebuild.
MIT