Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Arc - Terminal Bridge for AI AgentsNew to Visual Studio Code? Get it now.
Arc - Terminal Bridge for AI Agents

Arc - Terminal Bridge for AI Agents

Renzo

|
6 installs
| (0) | Free
Control VS Code terminals from AI coding agents (Claude Code, Codex, etc.) via MCP. Full output capture, shell integration, and pattern matching.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Arc - Terminal Bridge for AI Agents

Arc connects AI coding agents to VS Code terminals via the Model Context Protocol (MCP). It gives agents like Claude Code, Codex, and others the ability to create, execute, and monitor terminal sessions with full output capture.

Features

  • Full Output Capture — Execute commands and get the complete stdout/stderr output back, not just fire-and-forget
  • Shell Integration — Leverages VS Code's shell integration for reliable exit codes and streaming output
  • 11 MCP Tools — Create, execute, send, focus, kill, list, observe, and monitor terminals
  • TUI Auto-Detection — Automatically handles interactive apps (Codex, Claude, Gemini) with smart Enter key injection
  • Pattern Matching — Set up regex watchers on terminals and get notifications when patterns match
  • Zero Dependencies — Uses Node's built-in http module for the internal bridge server

Architecture

AI Agent ←stdio→ MCP Server ←HTTP:3850→ VS Code Extension ←API→ Terminals

Arc consists of two components bundled together:

  1. VS Code Extension (extension.js) — Manages terminals and runs an HTTP server on port 3850
  2. MCP Server (mcp-server.mjs) — Translates MCP tool calls into HTTP requests to the extension

MCP Tools

Tool Description
arc_terminal_create Create a new terminal with ID, name, working directory
arc_terminal_execute Run a command with full output capture and exit code
arc_terminal_send Send text to a terminal (for TUI apps and interactive use)
arc_terminal_focus Bring a terminal tab to the front
arc_terminal_kill Close and dispose a terminal
arc_terminal_list List all terminals (managed, unmanaged, or all)
arc_terminal_get_output Retrieve the last N lines from a terminal's output buffer
arc_terminal_observe Watch for regex patterns in terminal output
arc_terminal_exists Check if a terminal ID exists
arc_terminal_health Verify the extension is running
arc_execution_status Check status of a running or completed execution

Setup with Claude Code

  1. Install the Arc extension from the VS Code Marketplace
  2. Register the MCP server with Claude Code:
claude mcp add --transport stdio --scope user arc -- \
  node ~/.vscode/extensions/mercurial.arc-0.3.0/mcp-server.mjs
  1. Verify it's working:
claude mcp list

Arc tools will appear as arc_terminal_* in Claude Code's tool list.

Usage Examples

Execute a command and capture output

The AI agent calls arc_terminal_execute:

{
  "id": "build",
  "command": "npm run build"
}

Returns the full output, exit code, and duration.

Send to a TUI app

For interactive agents like Codex or Gemini:

{
  "id": "codex",
  "command": "fix the bug in auth.js",
  "autoEnter": true
}

Watch for patterns

{
  "id": "build",
  "patterns": [
    { "regex": "ERROR", "name": "error" },
    { "regex": "Build complete", "name": "done" }
  ]
}

Requirements

  • VS Code 1.96.0 or later
  • Shell integration must be enabled in VS Code settings:
    "terminal.integrated.shellIntegration.enabled": true
    
  • Node.js 18+ (for the MCP server's fetch API)

Extension Commands

Command Description
Arc: List Managed Terminals Show all Arc-managed terminals
Arc: Start HTTP Server Manually start the bridge server
Arc: Stop HTTP Server Stop the bridge server
Arc: Create New Terminal Create a terminal via input dialog

How It Works

When VS Code starts, Arc activates and launches an HTTP server on 127.0.0.1:3850. The MCP server (mcp-server.mjs) runs as a stdio process that Claude Code communicates with directly. MCP tool calls are translated into HTTP requests to the extension, which uses the VS Code Terminal API to manage terminals.

Shell integration enables the key differentiator: full output capture with exit codes. Without shell integration, Arc falls back to sendText (fire-and-forget mode).

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft