Home / Servers

opencode-sync-mcp-server

by severin-ye

<p align="center"> <img src="https://img.shields.io/badge/Node.js-18%2B-brightgreen?style=flat-square" alt="Node.js 18+"> <img src="https://img.shields.io/npm/v/opencode-sync-mcp-server?style=flat-square&color=blue" alt="npm"> <img src="https://img.shields.io/badge/MCP-stdio-purple?style=flat-square" alt="MCP stdio"> <img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="MIT"> </p> <h1 align="center">opencode-sync</h1> <p align="center"> <strong>One command to backup. One command to restore. Your entire dev environment, synced across machines.</strong> </p> <p align="center"> Export your opencode workspace — submodules, configs, skills, API keys — to a private GitHub repo.<br> On a new machine, pull it back and everything installs itself. </p>

Why?

You have multiple machines. Each has opencode with different plugins, MCP servers, skills, and submodules checked out at different commits. Keeping them in sync is a nightmare of git submodule update, npx skills add, and copy-pasting config files.

opencode-sync makes it a single command:

# On your main machine
opencode_sync_push "Friday backup"

# On your new laptop
opencode_sync_pull

That's it. Submodules reset to exact commits. MCP servers rebuilt. Skills reinstalled. Config merged. API keys templated. Everything just works.


Quick Start

# 1. Install
git clone https://github.com/<you>/opencode-sync-mcp-server
cd opencode-sync-mcp-server
npm install && npm run build

# 2. Add to your opencode config (~/.config/opencode/opencode.jsonc)
# {
#   "mcp": {
#     "opencode-sync": {
#       "type": "local",
#       "command": ["node", "<path-to>/dist/index.js"],
#       "enabled": true
#     }
#   }
# }

# 3. Restart opencode, then:
opencode_sync_init          # detect your workspace
opencode_sync_push "init"   # first backup

New machine? opencode_sync_init initType=sync githubUrl=<url> then opencode_sync_pull.


What It Syncs

CategoryWhatHow
SubmodulesAll 14+ repos, exact commit hashgit clone + git reset --hard
OpenCode Configplugins, MCP servers, providersDeep-merge, never overwrite
Skills40+ installed skillsnpx skills add <source> -g from known source map
API KeysNames + descriptions (never values)Template file at keys/API.md
Dependenciesgh CLI, Ralph, Skills CLIAuto-install via winget/brew/apt/npm
Windows FixesNTFS path issuesAuto-detects problematic filenames, applies git config core.protectNTFS
Install LogEvery install, its source, any pitfallsstate/install-log.json — provenance you can trust

Tools (13)

ToolWhat it does
opencode_sync_initDetect workspace, guide first-time setup. Only asks once.
opencode_sync_pushExport state → commit → push to GitHub. One command.
opencode_sync_pullPull from GitHub → restore everything. One command.
opencode_sync_exportExport full workspace state as JSON
opencode_sync_importRestore from JSON (with dryRun preview)
opencode_sync_diffCompare current state vs saved state
opencode_sync_statusShow every submodule: commit, branch, dirty?
opencode_sync_verifyHealth check: gh, git, config, ralph, skills, submodules
opencode_sync_setupInstall everything: gh, submodules, config, ralph, skills CLI, skill packages
opencode_sync_create_repoCreate a private GitHub repo (warns if public)
opencode_sync_api_keysDetect, template, or add API keys
opencode_sync_guideGenerate guide/SYNC-GUIDE.md — the restore playbook
opencode_sync_logRead/write install provenance log

Architecture

opencode-sync-mcp-server/      # ← This repo (code only, never modified at runtime)
├── src/
│   ├── lib/                   # 11 modules, each <200 lines
│   │ 

Related servers

n8n

by n8n-io

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

NOASSERTION198,904

@modelcontextprotocol/server-everything

Official

by modelcontextprotocol

MCP server that exercises all the features of the MCP protocol

89,105

@modelcontextprotocol/server-filesystem

Official

by modelcontextprotocol

MCP server for filesystem access

SEE LICENSE IN LICENSE89,105

mcp-server-fetch

Official

by modelcontextprotocol

A Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs

89,105