SDKs and platforms

How do I add Offline Protocol to VS Code?

Open the Offline Protocol listing in the GitHub MCP Registry and choose Install MCP server. It installs the local MCP server from the Offline Protocol CLI, which needs Node.js 18 or later and no account. You can also add the same server to .vscode/mcp.json. GitHub Copilot then uses its tools in agent mode to plan your app's architecture, pick compatible packages, follow the integration guide and scaffold a starter project.

TL;DR

Install Offline Protocol in VS Code from its GitHub MCP Registry listing, or add the local server to .vscode/mcp.json. Copilot's agent mode then gets 18 tools to plan an app, pick packages and scaffold it, with no Offline Protocol account. You then run the result on your devices.

Learning objectives

After reading this article you will be able to:

  • Install the Offline Protocol MCP server in VS Code from the GitHub MCP Registry or mcp.json
  • Check that Copilot's agent mode is calling the Offline Protocol tools
  • Know what Copilot can build with the tools and the next steps on your devices

GitHub MCP Registry install for VS Code

The quickest route is the Offline Protocol listing in the GitHub MCP Registry, published by the Offline-Protocol organization. Choose Install MCP server there. The listing describes the server as a way to “find Offline Protocol SDK packages, read integration guides, plan and scaffold local apps”, and every configuration it gives runs the local server from the published CLI:

npx -y @offline-protocol/cli@0.2.9 mcp serve

You can reach the same registry from inside VS Code. GitHub’s documentation describes the steps: open the Extensions view, type @mcp followed by the server name, select the server and choose Install, then confirm that you trust the server so VS Code can start it. Running MCP: List Servers from the Command Palette should then show it as a configured server. GitHub notes that the registry is in public preview and may change.

Before you install, check two prerequisites. GitHub’s documentation lists VS Code 1.99 or later and access to Copilot, and the local server needs Node.js 18 or later with npx. It needs no Offline Protocol login or API key. The first run downloads the pinned CLI from npm.

If your organization or enterprise is on Copilot Business or Copilot Enterprise, its MCP servers in Copilot policy must be enabled. GitHub says that policy is off by default.

VS Code MCP configuration by command or mcp.json

If you prefer the command line, the registry listing also gives this command for VS Code with GitHub Copilot:

code --add-mcp '{"name":"offline-protocol","type":"stdio","command":"npx","args":["-y","@offline-protocol/cli@0.2.9","mcp","serve"]}'

To share the server with everyone who opens a project, the Offline Protocol docs give this .vscode/mcp.json:

{
  "servers": {
    "offline-protocol": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@offline-protocol/cli@0.2.9",
        "mcp",
        "serve"
      ]
    }
  }
}

VS Code’s own guide now offers newer configuration destinations and labels .vscode/mcp.json as deprecated in its guided flow, while keeping it available for compatibility. It also notes that VS Code’s format uses a top-level servers object, while the portable files used by other clients use mcpServers, so don’t paste an entry between them unchanged.

Hosted Offline Protocol MCP in VS Code

VS Code can also connect to the hosted endpoint, which runs without a local install and offers the read-only tools; scaffolding runs in local mode. It takes an app API key and its matching App ID; organization keys are rejected. This configuration makes VS Code prompt for the key once and store it, so the key stays out of the file:

{
  "inputs": [
    {
      "type": "promptString",
      "id": "offline-api-key",
      "description": "Offline Protocol app API key",
      "password": true
    }
  ],
  "servers": {
    "offline-protocol": {
      "type": "http",
      "url": "https://mcp.offlineprotocol.com/mcp",
      "headers": {
        "Authorization": "Bearer ${input:offline-api-key}",
        "x-app-id": "app_your_application_id"
      }
    }
  }
}

Hosted mode offers the 15 read-only tools. Configure one mode under the offline-protocol name, not both.

Copilot agent mode with Offline Protocol tools

GitHub Copilot uses these tools in agent mode. With the local server connected, Copilot can plan the architecture of an app, pick compatible packages, read the integration guide for a workflow and scaffold a starter project in your workspace.

The local server provides 18 tools. Fifteen are read-only and cover package, workflow, guide and template lookup, package resolution, architecture planning and scaffold preview, for example generate_architecture, resolve_packages, get_skill and preview_scaffold. Three build your project and run in local mode:

  • scaffold_project creates a new project.
  • integrate_packages adds packages to an existing one.
  • init_project configures an existing project for Offline Protocol.

These tools write files and run package-manager commands with your permissions. VS Code shows tool approval requests as the agent works; its guide says to approve only actions you understand. To limit which tools Copilot can use in a session, open Chat: Open Customizations and then Tools.

To confirm the connection, VS Code’s guide suggests a low-impact request first. Expand the tool call in the conversation and check that it came from offline-protocol and returned real output. The ready workflows local-handoff, backend-delivery and nearby-service each scaffold a React Native app, and How do I start an Offline Protocol project with the CLI? shows the same scaffolds run from a terminal.

A first Offline Protocol request in Copilot

Give Copilot a concrete integration to work on. The Offline Protocol docs suggest:

Add an encrypted local handoff to this React Native app. Explain the device requirements, choose compatible packages, and show how the receiving app will persist the handoff.

Include your target device models and OS, the installed SDK version and the workflow you want. The live agent setup prompt is the canonical setup instruction, so point Copilot at its URL rather than an old copy.

Next steps after Copilot scaffolds the app

Once Copilot has planned and scaffolded the integration, the next steps happen on your machine and your devices:

  • Test on the target devices. The docs ask you to compile the changed application and test on the devices, where radio delivery is confirmed.
  • Review generated changes with the rest of your code before you commit them.
  • Keep keys out of the workspace. Local mode needs none, and the hosted configuration above prompts for the key.

The same server works in Claude, Cursor, and ChatGPT and Codex. For the differences between its local, hosted and public modes, read What is the Offline Protocol MCP server?

Frequently asked questions

Does the GitHub MCP Registry install need an Offline Protocol account?

No. The listing installs the local MCP server, which needs no login or API key. An account is only needed for the keyed hosted endpoint.

Which VS Code version do I need?

GitHub's documentation lists VS Code 1.99 or later and access to GitHub Copilot. The local server also needs Node.js 18 or later with npx on the machine.

My organization uses Copilot Business. Why can't I add the server?

GitHub's documentation says members of an organization or enterprise on Copilot Business or Copilot Enterprise need the MCP servers in Copilot policy enabled, and that policy is off by default. Ask an administrator to turn it on.

Can Copilot write the starter project for me?

Yes, with the local server. Its scaffold_project, integrate_packages and init_project tools write files and run package-manager commands, after you approve them. The hosted endpoint offers the 15 read-only tools for lookup and planning.

Where does messaging between devices happen?

In your app, through the Offline Protocol mesh SDK. Copilot uses the MCP server to plan and scaffold that integration, and you run the app on your phones to see messages move.

Sources

Build it with Offline Protocol

The coding agents page has the VS Code configuration for local and hosted mode, and a first request to try once Copilot can see the tools.

Read use Offline Protocol from your coding agent