Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>M31A Agent Bridge for VS CodeNew to Visual Studio Code? Get it now.
M31A Agent Bridge for VS Code

M31A Agent Bridge for VS Code

Eshan Roy

|
1 install
| (0) | Free
Connect VS Code to the M31A CLI with live editor context sync, interactive inline diff reviews, LSP diagnostics, and one-click terminal launch.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

M31A Agent Bridge for VS Code

m31a npm package version m31a total npm downloads m31a monthly npm downloads m31a weekly npm downloads Latest GitHub release CI build status GitHub stars VS Code engine requirement Powered by NVIDIA NIM MIT license

Connect Visual Studio Code to the M31A AI Coding Agent CLI (powered by NVIDIA NIM) with live editor context sync, interactive inline diff reviews, real-time LSP diagnostics, and one-click integrated terminal launch.

Install via VS Code Quick Open (Ctrl+P / Cmd+P):

ext install eshanized.m31a-ide-companion

Why Use M31A Agent Bridge for VS Code?

M31A Agent Bridge for VS Code pairs your editor with the open-source m31a terminal AI coding agent so you keep full terminal speed while getting native IDE ergonomics:

  • Live Editor Context Sync — Streams active file focus, cursor position, text selection (up to 16 KiB), open workspace tabs (up to 10 recent files), and workspace trust status via ide/contextUpdate.
  • Interactive In-Editor Diff Reviews — Preview M31A's proposed edits side by side in native VS Code diff editors (<file> (M31A Proposed Edit)) with editor title actions to Accept ($(check)) or Reject ($(close)).
  • LSP Diagnostics & File Navigation — Exposes getDiagnostics and openFile MCP tools so M31A can read live compiler/linter errors and jump directly to exact line numbers.
  • M31A Impact Enrichment — When connected, M31A's /impact static dependency analyzer automatically enriches impact reports with live VS Code LSP diagnostics.
  • Zero-Config Integrated Terminals — Automatically exports M31A_IDE_SERVER_PORT and M31A_IDE_WORKSPACE_PATH into VS Code integrated terminals so m31a discovers the active editor window immediately.
  • Local-First Authenticated MCP Bridge — Runs a loopback-only (127.0.0.1) Streamable HTTP Model Context Protocol (MCP) server protected by Host header allow-listing, a per-window bearer token, and 0700 per-user discovery files.

Requirements

  • Visual Studio Code ^1.85.0 (or a compatible editor)
  • Node.js >=20.0.0
  • M31A CLI installed from npm (npm install --global m31a or npx m31a)
  • An NVIDIA NIM API key (configured via NVIDIA_API_KEY or /auth)

Quick Start

  1. Install the extension from the Marketplace (ext install eshanized.m31a-ide-companion) or directly from the M31A CLI using /ide install.

  2. Install or run the M31A CLI:

    npm install --global m31a
    # or run without global install:
    npx m31a
    
  3. Open a workspace in VS Code (or a compatible editor such as Cursor, Antigravity, Positron, or Trae).

  4. Launch M31A from the Command Palette (M31A: Run M31A in Terminal) or inside any integrated terminal:

    m31a
    
  5. Check $(sparkle) M31A in the bottom-right status bar, or run M31A: Show Companion Status to inspect the active loopback port and connected workspace path.


Commands

Command ID Description
M31A: Run M31A in Terminal m31a.runInTerminal Opens an integrated terminal and starts m31a with bridge environment variables preconfigured.
M31A: Show Companion Status m31a.showStatus Displays the active 127.0.0.1 bridge port and connected workspace path.
M31A: Accept Diff Changes m31a.diff.accept Accepts the active M31A proposed diff and notifies the CLI bridge ($(check) in diff editor title bar).
M31A: Reject Diff Changes m31a.diff.cancel Rejects and closes the active M31A proposed diff without applying changes ($(close) in diff editor title bar).

MCP Bridge Tools

Once connected, M31A Agent Bridge for VS Code registers the following tools on its local Streamable HTTP MCP server:

Tool Purpose
openDiff Opens a native VS Code side-by-side diff view (m31a-diff) for a proposed edit.
closeDiff Closes an open diff view and returns any pending content.
getDiagnostics Reads current LSP diagnostics (error, warning, info, hint) for a specific file or across the workspace.
openFile Opens a file in VS Code and optionally scrolls to a 1-based line number.

Supported Editors

M31A Agent Bridge for VS Code targets VS Code ^1.85.0 (Node >=20.0.0) and detects host metadata automatically for:

  • Visual Studio Code
  • Antigravity
  • Cursor
  • Positron
  • Trae
  • Other VS Code-compatible forks

Security & Privacy

  • Loopback only: Binds strictly to 127.0.0.1 and rejects HTTP Host headers other than localhost:<port> and 127.0.0.1:<port>.
  • Per-window bearer auth: Generates an authenticated discovery file inside the per-user temporary directory (m31a-ide-<uid> with 0700 permissions).
  • Context filtering: Ignores untitled/non-file buffers and automatically excludes IDE settings files (settings.json) and instruction files (m31a.md / gemini.md) from openFiles snapshots.
  • Workspace Trust aware: Tracks and forwards vscode.workspace.isTrusted state dynamically.

FAQ

How does the extension connect to the M31A CLI?

When a workspace opens, the extension starts a local Streamable HTTP MCP server on 127.0.0.1 and writes a per-user discovery file plus M31A_IDE_SERVER_PORT and M31A_IDE_WORKSPACE_PATH into VS Code integrated terminals. Running m31a inside that terminal connects automatically.

Do I need to install the m31a npm package separately?

Yes. This extension bridges VS Code to the m31a CLI. Install it globally with npm install --global m31a or launch it on demand with npx m31a.

Can I disable or inspect the bridge at any time?

Yes. Run M31A: Show Companion Status in the VS Code Command Palette, or use /ide status, /ide enable, and /ide disable inside the M31A CLI.


Links

  • M31A GitHub Repository
  • m31a on npm
  • M31A Documentation
  • VS Code Companion Guide
  • M31A Impact Guide
  • Issue Tracker
  • MIT License
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft