Vscode Terminal MCP
What it does
Execute commands in visible VSCode terminal tabs with output capture and session reuse.
- Connects パソコンで動く
- Account or key No key needed
- Category 開発者ツール
インストール
使っているAIアプリを選んで、設定をコピーしてください。
チェック 2/3 合格 · あなたのパソコンで動きます
まず:どの AI を使っていますか?
使っているアプリを選ぶと、下に手順が表示されます。
Claude につなげますが、先に準備が必要です
先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
パソコン版 Claude アプリの設定ファイルを開く
SettingsDeveloperEdit Config
この設定を貼り付けて保存
コマンドを確認中 · 確認が通るとコピーボタンが出ます
Claude を終了してもう一度開く
試してみる
Vscode Terminal MCP を使って、私に何ができるか教えて、1 つやってみせて✓ Claude が Vscode Terminal MCP を使っていると言うか、回答に Vscode Terminal MCP のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
ChatGPT はまだ Vscode Terminal MCP につなげません
Vscode Terminal MCP はパソコンに入れて使うものですが、ChatGPT は Web 上で動くサーバーにしかつなげません
代わりにできること
A · Vscode Terminal MCP につなげるアプリを使う
- 先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
- 先にパソコンへ Node.js を入れてください(1 回だけ)
- 先にパソコンへ Node.js を入れてください(1 回だけ)
- 先にパソコンへ Node.js を入れてください(1 回だけ)
B · 開発者ツール の中で ChatGPT につなげる別のサーバー
同じカテゴリでよく使われているものから、キーなしでアドレスだけでつなげるものを選びました
- Sentry✓ ChatGPT
- Compiler Explorer✓ ChatGPT
- GitDiagram✓ ChatGPT
Claude Code につなげますが、先に準備が必要です
先にパソコンへ Node.js を入れてください(1 回だけ)
ターミナルを開く
Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く
このコマンドを貼り付けて Enter
コマンドを確認中 · 確認が通るとコピーボタンが出ます
Claude Code で /mcp と入力
Vscode Terminal MCP が一覧にあり、接続済みと表示されれば OK です
試してみる
Vscode Terminal MCP を使って、私に何ができるか教えて、1 つやってみせて✓ Claude Code が Vscode Terminal MCP を使っていると言うか、回答に Vscode Terminal MCP のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
Cursor につなげますが、先に準備が必要です
先にパソコンへ Node.js を入れてください(1 回だけ)
このボタンで Cursor を開く
コマンドを確認中 · 確認が通るとコピーボタンが出ます
Cursor の AI チャットを Agent モードで開く
試してみる
Vscode Terminal MCP を使って、私に何ができるか教えて、1 つやってみせて✓ Cursor が Vscode Terminal MCP を使っていると言うか、回答に Vscode Terminal MCP のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
VS Code につなげますが、先に準備が必要です
先にパソコンへ Node.js を入れてください(1 回だけ)
このボタンで VS Code を開く
コマンドを確認中 · 確認が通るとコピーボタンが出ます
VS Code の AI チャットを Agent モードで開く
試してみる
Vscode Terminal MCP を使って、私に何ができるか教えて、1 つやってみせて✓ VS Code が Vscode Terminal MCP を使っていると言うか、回答に Vscode Terminal MCP のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
Windsurf、Zed、Gemini CLI など MCP を使える他のアプリは追加方法がそれぞれ違います。アプリ一覧で確認してください
JSON 設定は下の「開発者向け」にあります
開発者向け:ターミナルのコマンドと JSON 設定
パソコンにインストール
Claude Code
コマンドを確認中 · 確認が通るとコピーボタンが出ます
Claude Desktop (claude_desktop_config.json)
コマンドを確認中 · 確認が通るとコピーボタンが出ます
Cursor (~/.cursor/mcp.json)
コマンドを確認中 · 確認が通るとコピーボタンが出ます
VS Code (mcp.json)
コマンドを確認中 · 確認が通るとコピーボタンが出ます
この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
ひと目でわかる
使えるアプリ
このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。
パソコン上で動かせるアプリ
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
できること
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
基本チェックi
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月13日にチェック
- ✓ 合格
作者とリポジトリが一致
レジストリ名は、リポジトリを所有するGitHubアカウント sirlordt で確認済みです
- ! 注意
今もメンテナンスされている
コードの最終更新:8 か月前(6か月以上前)
- ✓ 合格
ライセンスがある
MITを使用
- – 対象外
エンドポイントが応答する
これはパソコンで動くため、インターネット上のエンドポイントはありません
- – 対象外
OAuthでサインイン
パソコンで動き、代わりにローカルの設定を使います
- … 未チェック
ツールの説明に隠れた指示がない
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
話し合い
質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。
ユーザーレビュー
まだレビューはありません
開発者ツールのほかのサーバーとの比較i
- このカテゴリのほかの5829件のうち77%よりスターが多い
- このカテゴリのほかの5829件のうち6%より最近レジストリに公開
- 基本チェックの結果が、このカテゴリのほかの5829件のうち44%と同じかそれ以上
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
よくある質問
Vscode Terminal MCPは安全ですか?
当てはまる基本チェック3項目のうち2項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
どんなキーやコードが必要ですか?
レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。
パソコンで動きますか、それともクラウドですか?
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
今もメンテナンスされていますか?
GitHubリポジトリの最終更新は8 か月前、最新バージョン(0.1.0)がレジストリに届いたのは8 か月前です。
どのアプリで使えますか?
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。
同じカテゴリのほかの候補
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
GitHub
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Serena MCP: the IDE for your agent
A powerful toolkit for coding, providing semantic retrieval and editing capabilities.
作者のREADME
READMEを開く
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
vscode-terminal-mcp
MCP server that executes commands in visible VSCode terminal tabs with full output capture. Unlike inline execution, every command runs in a real terminal you can see, scroll, and interact with.
Key Features
- Visible Terminals: Commands run in real VSCode terminal tabs, not hidden processes. You see everything in real time.
- Session Reuse: The
runtool automatically reuses idle sessions, creating new terminals only when needed. - Long-Running Support: Fire-and-forget execution with
waitForCompletion: false, then poll output incrementally withread. - Subagent Isolation: Tag sessions with
agentIdto keep parallel agent workloads separated.
Requirements
- VS Code 1.93+ (for Shell Integration API)
- Node.js 20+
Getting Started
Claude Code
claude mcp add BashTerm -- npx vscode-terminal-mcp@latest
VS Code / Copilot
Add to your .vscode/mcp.json:
{
"servers": { "BashTerm": { "type": "stdio", "command": "npx", "args": ["vscode-terminal-mcp@latest"] } } }
Cursor
Add to your .cursor/mcp.json:
{
"mcpServers": { "BashTerm": { "command": "npx", "args": ["-y", "vscode-terminal-mcp@latest"] } } }
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": { "BashTerm": { "command": "npx", "args": ["-y", "vscode-terminal-mcp@latest"] } } }
Your First Prompt
After installation, try asking:
Run
ls -lain the terminal
You should see a new terminal tab open in VSCode with the command output.
Screenshots
Running a command with run
Permission dialog for exec
Exec result with clean output
Tools
Quick Execution
| Tool | Description |
|---|---|
run | Create (or reuse) a terminal and execute a command in one step. Returns clean output with exit code. |
Session Management
| Tool | Description |
|---|---|
create | Create a new visible terminal session. Returns a sessionId. |
exec | Execute a command in an existing session and capture output. |
read | Read output from a session with pagination. Supports incremental reads and tail mode (offset: -N). |
input | Send text to an interactive terminal (prompts, REPLs, confirmations). |
list | List active sessions. Optionally filter by agentId. |
close | Close a terminal session and its VSCode tab. |
Usage Patterns
Simple Command
The run tool handles everything — creates a terminal if needed, executes, and returns clean output:
> Run npm test
$ npm test
PASS src/utils.test.ts (3 tests) PASS src/index.test.ts (5 tests)
[exit: 0 | 1243ms | session-abc123]
Long-Running Process
For builds, deployments, or any command that takes a while:
> Start `npm run build` without waiting, then check progress
The agent will:
- Call
runwithwaitForCompletion: false— returns immediately - Call
readwithoffset: -10to check the last 10 lines - Repeat until the process completes
Interactive Commands
For commands that need user input:
> Run npm init and answer the prompts
The agent will:
- Call
runwithnpm init - Call
readto see the prompt - Call
inputto send the answer
Parallel Agents
Subagents can work in isolated terminals using agentId:
> Have one agent run tests while another runs the linter
Each subagent gets its own terminal tagged with its agentId, preventing output from mixing.
Configuration
The extension reads configuration from VSCode settings under terminalMcp.*:
| Setting | Type | Default | Description |
|---|---|---|---|
terminalMcp.maxSessions | number | 10 | Maximum concurrent terminal sessions |
terminalMcp.commandTimeout | number | 30000 | Default command timeout in ms |
terminalMcp.maxOutputLines | number | 5000 | Max lines kept in output buffer per session |
terminalMcp.idleTimeout | number | 1800000 | Close idle sessions after this many ms (0 = disabled) |
terminalMcp.blockedCommands | string[] | ["rm -rf /"] | Commands that will be rejected |
Recommended: Set as Preferred Tool
LLM agents like Claude Code have a built-in Bash tool that executes commands inline within the chat. The output is embedded in the conversation and hard to read, especially for commands with verbose output. We recommend telling the agent to prefer this MCP over its built-in Bash tool.
Add the following to your project's CLAUDE.md (or equivalent instructions file):
## Terminal Execution
Prefer the BashTerm MCP tools (run, exec, read, etc.) over the built-in Bash tool for executing commands. BashTerm runs commands in visible VSCode terminal tabs where the user can see output in real time. Only fall back to the built-in Bash tool for simple, non-interactive operations like reading environment variables.
For commands that may take longer than 30 seconds or produce large amounts of output (builds, test suites, deployments, installs), use the pull mode pattern:
- Call
runwithwaitForCompletion: falseto launch the command without blocking. - Call
readwithoffset: -10to check the last 10 lines of output. - Repeat step 2 until you see the command has finished (look for exit messages, prompts, or "Done").
- Report the final result to the user.
This prevents conversation timeouts and lets the user watch progress in the terminal in real time.
Why this matters:
| Built-in Bash | BashTerm MCP | |
|---|---|---|
| Output visibility | Embedded in chat, hard to scroll | Visible in VSCode terminal tab |
| Real-time feedback | User sees nothing until command finishes | User watches output live |
| Long-running commands | Blocks the conversation until timeout | Fire-and-forget + polling |
| Session state | Each command is isolated | Persistent sessions with history |
| Interactive commands | Not supported | Send input to prompts/REPLs |
Development: Updating the Extension
VSCode aggressively caches extensions in memory. When developing locally, code --install-extension and even "Developer: Reload Window" may not reload your changes. Use this workflow:
Quick update (no restart needed)
After modifying source files, build and copy directly into the installed extension directory:
cd /path/to/vscode-terminal-mcp
npm run build cp dist/extension.js ~/.vscode/extensions/sirlordt.vscode-terminal-mcp- /dist/extension.js
Then run "Developer: Reload Window" (Ctrl+Shift+P).
Full reinstall (when quick update doesn't work)
If VSCode still uses old code:
# 1. Uninstall and remove all copies
code --uninstall-extension sirlordt.vscode-terminal-mcp rm -rf ~/.vscode/extensions/sirlordt.vscode-terminal-mcp-*
2. Check for ghost entries with old publisher names
Look in ~/.vscode/extensions/extensions.json for stale entries
Remove any entries with old publisher IDs (e.g., "terminal-mcp.vscode-terminal-mcp")
3. Close VSCode completely (not just reload)
4. Rebuild and install
npm run build npx vsce package --allow-missing-repository code --install-extension vscode-terminal-mcp- .vsix --force
5. Open VSCode
Verify the correct version is loaded
# Check which extension directories exist
ls ~/.vscode/extensions/ | grep terminal
Verify your changes are in the installed extension
grep "YOUR_UNIQUE_STRING" ~/.vscode/extensions/sirlordt.vscode-terminal-mcp-*/dist/extension.js
Compare checksums
md5sum dist/extension.js ~/.vscode/extensions/sirlordt.vscode-terminal-mcp-*/dist/extension.js
Large Output Handling
When read returns output that exceeds the MCP client's token limit, the system automatically saves the full output to a temporary JSON file and returns the file path in the error message.
To extract the relevant content:
# Get the last 50 lines (most relevant for status)
tail -50 /path/to/saved/file.txt
Or parse the JSON to extract the text content
python3 -c "import json; data=json.load(open('/path/to/file.txt')); print(data0[-2000:])"
The file format is JSON: [{"type": "text", "text": "..."}]
This commonly happens with commands that produce heavy TUI output (progress bars, ANSI escape codes). Use smaller offset values (e.g., offset: -20 instead of offset: -100) to reduce the captured output size.
How It Works
- The VSCode extension activates and starts an IPC server on a Unix socket
- The MCP entry point (
mcp-entry.js) is spawned by the MCP client and bridges JSON-RPC stdio with the IPC socket - Commands execute in real VSCode terminals using the Shell Integration API for reliable output capture and exit code detection
- Output is stored in circular buffers with pagination support for efficient reading
Latest Changes (0.1.6)
- Screenshots in README for marketplace
- Clean output format for all tools — no more raw JSON
- Fixed
waitForCompletion: falsenot working - Disabled idle reaper — user closes sessions manually
- Unique IPC socket per workspace (multi-instance support)
- Custom terminal tab names with date format
- Large output handling documentation
See CHANGELOG.md for full history.
License
MIT