Skip to content

Your first sync

This is the greenfield path: start clean, end with an MCP server live in two agents. About five minutes.

  1. Create ~/.agentsync/ and its layout.

    Terminal window
    agentsync init
  2. Register the agents you use.

    Terminal window
    agentsync agent add claude
    agentsync agent add opencode
  3. Add an MCP server once — it will fan out to both agents.

    Terminal window
    agentsync mcp add github \
    --command npx \
    --args "-y,@modelcontextprotocol/server-github"
  4. Preview before writing anything. Always safe; never touches disk.

    Terminal window
    agentsync apply --dry-run
  5. Apply for real.

    Terminal window
    agentsync apply

The one server you added now lives in both agents’ native configs, each in its own shape:

Terminal window
jq '.mcpServers.github' ~/.claude.json
jq '.mcp.github' ~/.config/opencode/opencode.json
flowchart LR
    SRC["~/.agentsync/mcp/github.toml<br/>(one file you own)"]
    SRC -->|apply| CLAUDE["~/.claude.json<br/>.mcpServers.github"]
    SRC -->|apply| OC["opencode.json<br/>.mcp.github"]

You wrote one small TOML file. apply rendered it into each agent’s native schema — Claude’s mcpServers, OpenCode’s mcp (with its different transport and command shape). That’s the fan-out.