The eshanized.m31a-ide-companion extension connects VS Code to the M31A CLI. Its source is in packages/vscode-ide-companion/.
Capabilities
- Local authenticated MCP bridge — a loopback Streamable HTTP MCP server on
127.0.0.1, secured by host allow-listing and a per-window bearer token. A strict-permission discovery file is written to the per-user IDE connection directory. - Integrated terminal environment — injects
M31A_IDE_SERVER_PORTandM31A_IDE_WORKSPACE_PATHinto VS Code integrated terminals. - Open-file and selection context — streams
ide/contextUpdatenotifications with recently focused files, cursor and selection state, and workspace trust status. - In-editor diff reviews — exposes
openDiffandcloseDiffMCP tools so that M31A edits can be reviewed, accepted, or rejected inside VS Code.
Commands
| VS Code command | ID |
|---|---|
| M31A: Run M31A in Terminal | m31a.runInTerminal |
| M31A: Show Companion Status | m31a.showStatus |
| M31A: Accept Diff Changes | m31a.diff.accept |
| M31A: Reject Diff Changes | m31a.diff.cancel |
From the CLI
Use /ide with status, install, enable, or disable. Settings live under ide.enabled and ide.hasSeenNudge.
Installation
A local VSIX installer is provided in the repository. Install the generated .vsix through VS Code's "Install from VSIX" command, then run M31A: Show Companion Status to confirm discovery.
Security notes
The bridge binds only to loopback and uses a per-window token. Do not copy the token into shared shell profiles or logs.
Next steps
See MCP for the protocol details and ACP for the alternative stdio integration.