Skip to content

Documentation versions

This is Binary GIN Editor 0.6.2. The main version is Binary GIN Editor 0.6.3.

MCP and shared editing ​

The Binary GIN sidebar combines the converter with MCP connections. Several clients can work with the same live VS Code document. You can see their edits, actions and renders and intervene through normal editing.

Connect a client ​

Normal editing uses the bundled worker and needs no Python. The stdio MCP adapter currently requires Python 3.10 or newer and the release sources. Install its dependencies from the repository folder:

text
python -m pip install -e ".[mcp]"

Resources using old Zstd v0.6 require a library built with legacy support. In PowerShell, build it from source:

powershell
$env:ZSTD_LEGACY = '1'
python -m pip install --use-pep517 --no-binary=zstd --no-cache-dir --force-reinstall zstd==1.5.7.2
python -c "import zstd; assert zstd.ZSTD_legacy_support()"

On macOS/Linux, set ZSTD_LEGACY=1 before the same python -m pip install command. The bundled VSIX worker is built with this support automatically.

  1. Open a trusted workspace and a BGIN document in VS Code.
  2. Select Copy client command in the Binary GIN sidebar.
  3. Configure that command in your MCP client. Give each client its own --client-name. If the client separates program and arguments, use bgin-mcp as the program and the remaining parts as arguments.
text
bgin-mcp --mode connected --editor-bridge <connection-file> --client-name <name>

The connection file belongs to one VS Code window and contains a local access key. Do not include it in shared resource archives. An unavailable window causes an explicit error; connected mode never falls back to a detached disk copy. Standalone MCP file operations remain a separate scenario.

What the user and model see ​

A client starts with bgin_editor, then reads through bgin_read. Edits provide the returned revision as base_revision and a unique operation_id. The revision is checked again after validation. Concurrent changes cause a conflict and require rereading the document. Retrying an already applied operation ID does not apply the edit twice.

Manual unsaved changes are part of the shared document. Temporarily invalid JSON remains the current text; clients do not receive a hidden last-valid copy. Changes use normal VS Code Undo/Redo. Writing to disk requires explicit saving, which preserves the source BGIN format.

Subscribing to bgin://editor/state reports changes. The server sends the event, but whether and when it enters an already running model's context depends on the MCP client. Revision checks prevent stale edits from being applied.

Intervene ​

The sidebar lists clients, operations and recent events. You can:

  • Open an affected document and edit it manually.
  • Pause a client's edits and resume them later.
  • Stop an operation that has not yet been applied.
  • Disconnect a client session.

Stopping does not undo previous changes; use Undo for those. Client renders appear in a gallery with their author. Document changes mark earlier results stale. Resources are shared with the workspace. The result remains a preview, not a running game.