> ## Documentation Index
> Fetch the complete documentation index at: https://docs.harbormcp.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Host Sync

> How Harbor syncs MCP servers to Claude Code, Claude Desktop, Codex, VS Code, and Cursor.

Harbor supports syncing your MCP server fleet to multiple AI development tools simultaneously.

## Supported Hosts

| Host               | Config File                                                       | Config Key    |
| ------------------ | ----------------------------------------------------------------- | ------------- |
| **Claude Code**    | `~/.claude.json`                                                  | `mcpServers`  |
| **Claude Desktop** | `~/Library/Application Support/Claude/claude_desktop_config.json` | `mcpServers`  |
| **Codex**          | `~/.codex/config.toml`                                            | `mcp_servers` |
| **VS Code**        | `.vscode/mcp.json`                                                | `servers`     |
| **Cursor**         | `~/.cursor/mcp.json`                                              | `mcpServers`  |

## Linking Hosts

Before Harbor can sync to a host, you must link it:

```sh theme={null}
harbor port link claude
harbor port link claude-desktop
harbor port link vscode
```

Or use the **Ports** page in the desktop app and click **Link** next to each host.

## Automatic Syncing

Harbor automatically syncs your fleet to all linked hosts whenever you:

* **Dock** or **undock** a server
* **Toggle** a server on/off
* **Link** or **unlink** a host

You can also force a manual sync with `harbor signal` or the **Signal All** button in the desktop app.

## How Syncing Works

Each host stores MCP server configuration in its own format. Harbor handles the translation:

<Steps>
  <Step title="Read">
    Harbor reads the host's existing config file.
  </Step>

  <Step title="Merge">
    Your enabled servers are merged into the config. Servers you've configured directly in the host are left untouched.
  </Step>

  <Step title="Resolve">
    Any `vault:` references in environment variables are resolved to actual values from your OS keychain.
  </Step>

  <Step title="Write">
    The updated config is written back to the host's config file.
  </Step>
</Steps>

## Per-Host Control

You can enable or disable individual servers for specific hosts. A server might be enabled for Claude Code but disabled for Cursor:

```toml theme={null}
[servers.github]
url = "https://api.githubcopilot.com/mcp/"
enabled = true

[servers.github.hosts]
claude = true
claude-desktop = true
codex = true
vscode = false
cursor = false
```

## Safe Merges

<Note>
  Harbor never overwrites your host configs. It identifies which servers it manages and only modifies those entries, leaving your manually-configured servers intact.
</Note>
