Skip to content
Christian Presley edited this page Oct 12, 2026 · 8 revisions

zig-bridge-sdk

zig-bridge-sdk is a Zig package of MCP bridges. A bridge connects a client of the earlier MCP revision 2025-11-251 to a server of revision 2026-07-282. For all traffic to the server, the bridge uses the client of zig-sdk3. The first bridge is for Visual Studio Code (VS Code). Milestones M0 to M6 are on main, and the release 0.1.0 has them. Thus the vscode bridge serves stdio and HTTPS upstream servers, and it can also run in the process of a zig-sdk server.

Applies to: zig-bridge-sdk 0.1.2 on main at commit 3cbc34b (the tag v0.1.2), with the milestones M0 to M6. zig-sdk 0.5.1 at commit 52fc1b8 (the tag v0.5.1), Zig 0.16.04, MCP 2025-11-25 toward the client and MCP 2026-07-28 toward the server.

Bridges

Each bridge has a key: the name of the product that it bridges for. The key names the module, the executable and the directory of the bridge. The core module bridge has the parts that all bridges share, and each bridge declares one bridge.Profile. The package also exports the mcp module of zig-sdk, so that an application and the bridges use the same types. The only dependency is zig-sdk 0.5.1, at the commit 52fc1b8 of the tag v0.5.1.

Key Product Module Executable State
vscode VS Code vscode, in bridges/vscode/vscode.zig mcp-bridge-vscode, in bridges/vscode/main.zig Release 0.1.2, milestone M6. The runtime over stdio (M1), the input requests (M2) and the notifications (M3). An HTTPS upstream server with OAuth sign-in (M4), and vscode.serveStdio for zig-sdk servers (M5). A one-time start URL for the browser of the sign-in (M6).

The vscode bridge for Visual Studio Code

VS Code starts mcp-bridge-vscode as a stdio server. The bridge starts the upstream command, or it connects to the upstream server at an HTTPS URL. It answers initialize with the result of server/discover. Then it translates the requests and the results between the two revisions (M1). It sends the input requests of the upstream server to VS Code as elicitation, sampling and roots requests (M2). It sends the list changes, the resource updates and the log messages of the upstream server to VS Code (M3).

For an upstream server at a URL, the bridge signs in at the authorization server of that server with OAuth (M4). The browser gets only a one-time local start URL, and not the authorization URL (M6). The bridge keeps the tokens in the keychain of the host, in encrypted files or in memory. mcp-bridge-vscode logout deletes a stored sign-in.

A zig-sdk server can call vscode.serveStdio in place of the stdio transport of zig-sdk (M5). Then one executable serves the two revisions, and the first request of the client selects the path. The Roadmap gives the details and the state of each milestone.

Build

The project gives no prebuilt binaries. You build the bridge from the source with Zig 0.16.0:

zig build -Doptimize=ReleaseSafe

The executable mcp-bridge-vscode is then in zig-out/bin/. It has these forms:

mcp-bridge-vscode [options] -- <command> [args...]
mcp-bridge-vscode [options] <url>
mcp-bridge-vscode logout [--account <label>] <url>
mcp-bridge-vscode logout --all

The VS Code page gives the options, the configuration of VS Code and the steps for the author of a zig-sdk server.

Pages

  • Roadmap is the plan of record. It lists the milestones M0 to M6, the changes in zig-sdk, the open items and the deferred items.
  • Threat Model maps the security requirements of the bridge to modules and tests.
  • Architecture describes the modules, the path of a request, the lifecycle, the HTTP upstream, the embedded bridge and the error table. It also names the parts of zig-sdk that the bridge uses.
  • Package Model describes the package, bridge.Profile, the mcp module for embedders, the steps to add a bridge and the brand checks.
  • VS Code describes the contract of VS Code that the vscode bridge serves, and the harness that each milestone serves. It also gives the configuration, the sign-in, the token storage and the steps to find the cause of a problem.
  • Translation Rules gives the rules between the two revisions: initialize, the forwarded requests, the results, the progress and the cancellation. It also has the error table, the input requests, the listen stream, the logging and the _meta keys. Other sections give the icons of a remote server and the first line of the embedded bridge.

How the wiki is written

Every page uses the project profile of ASD-STE100 Simplified Technical English5. The repository file docs/style/ste-profile.md describes the profile. The references of each page link to the Bibliography of the zig-sdk wiki or to other stable sources.

Trademarks

Visual Studio Code and VS Code are trademarks of Microsoft Corporation. This project has no affiliation with Microsoft, and Microsoft does not endorse it.

References

  1. MCP-CHANGELOG-2025-11-25: Key changes of revision 2025-11-25.
  2. MCP-SPEC-2026-07-28: Model Context Protocol Specification 2026-07-28.
  3. zig-sdk v0.5.1: The MCP SDK for Zig, at the commit of the tag that the bridge pins.
  4. ZIG-0.16-RELNOTES: Zig 0.16.0 release notes.
  5. STE100: ASD-STE100 Simplified Technical English, Issue 9.

Clone this wiki locally