VS Code Extension and MCP Servers
Syncplify provides a SyncJS extension for Visual Studio Code that makes writing .syncjs scripts significantly easier. The extension adds full IntelliSense support including code completion, hover documentation, and signature help for all SyncJS built-in globals, VFS client types, product-specific functions, and the entire SyncJS API surface.
The extension also bundles a set of MCP (Model Context Protocol) servers that expose SyncJS knowledge to AI coding assistants such as GitHub Copilot, enabling AI-assisted script authoring with accurate, real-time API awareness.
Installation
The extension is published on the Visual Studio Code Marketplace under the publisher name syncplify. Search for SyncJS in the VS Code Extensions panel and install it from there.
Minimum requirement: Visual Studio Code 1.99 or later.
IntelliSense Support
Once installed, the extension activates automatically whenever your VS Code workspace contains one or more .syncjs files. On activation it writes type declaration files to a .syncjs-types/ directory in the workspace root, and creates or updates jsconfig.json to include them. This provides:
- Code completion for all SyncJS globals and their members
- Hover documentation with type signatures and parameter descriptions
- Signature help while typing function calls
- Full resolution of member access chains (for example, hovering
client.Options.UploadPolicyshows the correct type and description)
TIP
Add .syncjs-types/ to your .gitignore file if you prefer not to commit the auto-generated type declarations to source control. The extension regenerates them on every activation.
Product Setting
The globals available in a script depend on which Syncplify product will run it. Tell the extension which product you are targeting by setting syncjs.product in your VS Code workspace settings:
| Value | Description |
|---|---|
server | Syncplify Server! — adds Session, EventHandler, MakeTOTP, ValidateTOTP, GetCurrentVFS, and all related server-side globals |
aft | Syncplify AFT! — adds FsWatcher, RemoteWatcher, JobID, HaltSignalReceived, Params |
r2fs | R2FS! — reserved for future product-specific extensions |
none | Core SyncJS globals only, no product-specific additions |
The default value is aft. When writing scripts for Syncplify Server!, change this to server. You can set it in your VS Code user settings or in a .vscode/settings.json file inside the script project directory:
{
"syncjs.product": "server"
}Refreshing Type Declarations on Demand
Type declaration files are written automatically when the extension activates. If you need to regenerate them after upgrading the extension, run the SyncJS: Write Type Declaration Files to Workspace command from the VS Code Command Palette (Ctrl+Shift+P on Windows and Linux, Cmd+Shift+P on macOS).
MCP Servers and AI-Assisted Scripting
The extension contributes three MCP servers to VS Code. When you use an AI coding assistant such as GitHub Copilot, it can call these servers to look up the SyncJS API, check script syntax, retrieve inline documentation, and run script snippets in a sandboxed environment. This means the AI never has to guess about the SyncJS API: it fetches authoritative, version-matched information directly from the scripting engine.
Requirements: VS Code 1.99 or later (required for MCP server support). The MCP servers are launched automatically by VS Code; no manual configuration is needed.
The three servers and their intended use cases are:
| Server | Use for |
|---|---|
syncjs-server | Syncplify Server! event-handler and session scripts |
syncjs-aft | Syncplify AFT! automation and job scripts |
syncjs-core | Scripts that target no specific product (pure SyncJS core) |
Each server exposes four tools:
| Tool | Description |
|---|---|
syntax_check | Validates a SyncJS script and reports any syntax errors |
list_api | Returns the complete list of globals, objects, and methods available for the selected product |
get_docs | Returns the reference documentation for a specific function, object, or type |
run_sandbox | Executes a SyncJS snippet in a sandboxed environment and returns the result; useful for the AI to verify generated code before presenting it |
Selecting the MCP Server in GitHub Copilot
To use a specific MCP server in GitHub Copilot Chat, open the chat panel and select the appropriate server from the tools or agent selector. Once the syncjs-server server is active, the AI assistant has full up-to-date awareness of the Syncplify Server! scripting API and can generate accurate event-handler code, identify errors, and answer questions about available functions and their signatures.
NOTE
The SyncJS: Register SyncJS MCP Servers in User Profile command (available in the VS Code Command Palette) can register the MCP servers in your VS Code user profile if they are not picked up automatically by your VS Code version.
