Sync MCP servers across coding agents
You want the same MCP servers available in every coding agent, but each tool stores them in a different config file and format.
Updated November 15, 2026
Short answer: put your MCP servers in one canonical catalog, then sync that catalog into each coding agent’s native config. BrigadeStack does this with brigadestack mcp sync: one .brigade/mcp.json, projected into Claude Code, Codex, Cursor, VS Code, OpenCode, and Grok in the project, plus Antigravity, Hermes, OpenClaw, Kimi, and user-wide configs with --user-scope, with a dry-run diff before anything is written.
The problem
MCP is the common protocol. The config files are not common.
Claude Code reads .mcp.json. Codex reads TOML under .codex/config.toml. Cursor and VS Code use JSON, but not the same shape. OpenCode has its own format. Antigravity can be user-scoped. If you add the GitHub MCP server in one agent and forget the others, your tools drift immediately.
That drift is hard to spot because nothing dramatic happens. One agent has the server. Another silently does not.
The BrigadeStack path
brigadestack mcp init
brigadestack mcp add --name github --command npx \
--args "-y @modelcontextprotocol/server-github" \
--env GITHUB_TOKEN=ref:GITHUB_TOKEN --timeout 60
brigadestack mcp sync # preview across configured agents
brigadestack mcp sync --write # apply after review
brigadestack mcp verify # optional: probe that the servers start
brigadestack mcp sync is dry-run first. It shows the target agent, server key, current state, and planned action, then a field-fidelity report for anything a target cannot carry. You review the plan, then run with --write only when the diff is what you expect.
What gets synced
| Coding agent | Native config target |
|---|---|
| Claude Code | .mcp.json (repo) or ~/.claude.json with --user-scope |
| Codex CLI | .codex/config.toml or ~/.codex/config.toml with --user-scope |
| Cursor | .cursor/mcp.json (project) or ~/.cursor/mcp.json with --harness cursor --user-scope |
| VS Code | .vscode/mcp.json, only when the repo already has a .vscode/ directory. VS Code now marks this editor-managed file deprecated for new setups |
| OpenCode | opencode.json or ~/.config/opencode/opencode.json with --user-scope |
| Antigravity | ~/.gemini/config/mcp_config.json with --user-scope |
| Grok CLI | .grok/config.toml or ~/.grok/config.toml with --user-scope |
| Kimi Code | ~/.kimi-code/mcp.json with --harness kimi-user --user-scope |
| Hermes | ~/.hermes/config.yaml under mcp_servers with --user-scope |
| OpenClaw | ~/.openclaw/openclaw.json with --user-scope |
BrigadeStack merges by server key. Servers you added by hand are preserved. A server that changed outside BrigadeStack is treated as a conflict unless you pass --force. Secrets stay as environment references instead of literal values.
When this is enough
Use BrigadeStack for MCP sync when you run two or more coding agents and want the same tool servers available everywhere, with a reviewable plan. Use add-mcp if you only need a quick install into many clients and do not need a catalog file or a dry-run diff.
If you specifically searched for Claude Code plus Codex, read the narrower page: share MCP servers across Claude Code and Codex.
Questions
Can I sync MCP servers across coding agents without moving my whole dotfile setup? Yes. BrigadeStack’s MCP catalog is local to the repo or workspace you target. You do not need to replace chezmoi, Stow, or your normal shell config.
Does BrigadeStack start MCP servers? Sync writes config files, and your agent tools start their own servers. The mcp verify command (or sync --write --verify) starts the selected servers briefly to check that they respond.
Does it work for remote MCP servers? Yes, within the supported adapter shapes. Remote transports and auth headers are stored as config references, with secrets kept out of the catalog.
Full behavior is in the MCP sync docs.