vscode-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@vscode-mcprun npm install in my-project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
VS Code MCP Extension — Implementation Summary
What Was Built
A VS Code extension that exposes VS Code terminals, IDE features, and direct shell execution to AI agents via the Model Context Protocol (MCP). The extension runs entirely in the VS Code UI process (TypeScript) and connects to MCP clients through a hub/satellite WebSocket mesh.
Related MCP server: Terminal MCP
Architecture
┌────────────────────────────────────────────────────────────┐
│ MCP Client (agent) │
│ - connects to hub via MCP protocol │
└──────────────────────────┬─────────────────────────────────┘
│
┌──────────────────────────▼─────────────────────────────────┐
│ Hub (one VS Code window acts as hub) │
│ - exposes TOOLS list + routes tool calls │
│ - WebSocket server for satellites │
└──────────────────────────┬─────────────────────────────────┘
│ WebSocket (register/execute/result)
┌────────────┴────────────┐
│ │
┌─────────────▼──────────┐ ┌───────────▼──────────────┐
│ Satellite VS Code #1 │ │ Satellite VS Code #2 │
│ - ServerlessServer │ │ - ServerlessServer │
│ - session_id="proj-a" │ │ - session_id="proj-b" │
└────────────────────────┘ └──────────────────────────┘Components
1. Hub Server (hubServer.ts)
MCP server that exposes the full tool list to the agent
WebSocket server for satellite registration and tool-call routing
Routes each tool call to the satellite matching the requested
session_idHandles timeouts, reconnects, and hub-lost notifications
2. Satellite / Serverless Server (serverlessServer.ts)
Runs in every VS Code window (including the hub itself)
TOOLSarray — the complete MCP tool schemainvokeTool()— dispatches tool calls to the right handlerdirectExecute()— runs shell commands directly viachild_process.spawn(no terminal tab)Connects to the hub via WebSocket as a satellite
3. Terminal Managers
terminalManager.ts— shell-integration engine (real TTY, exit codes,cd/env persistence, busy detection)ptyTerminalManager.ts— node-pty fallback engine when shell integration is unavailable
Tools Exposed
All tools take session_id (the VS Code workspace identifier, e.g. llm [SSH: VDI-LS]).
Terminal tools
terminal_list_sessions— list connected VS Code windowsterminal_create— create a named terminal (unique name:prefix,prefix_1, ...)terminal_list— list terminals created viaterminal_createterminal_run— execute a command in a VS Code terminal, capture outputterminal_wait— wait for a running command to finish, get output + exit codeterminal_send_text— send input to a terminal (answer prompts, send\x03/\x04)terminal_read_output— read raw buffered terminal outputterminal_clear_buffer— clear a terminal's output buffer
Direct execution
execute— run a shell command directly (NOT via VS Code terminal) and capture output
# Run a command directly (no terminal)
execute(command="echo hello && echo oops 1>&2")
# -> stdout: "hello", stderr: "oops", exit code: 0
# Pipe stdin
execute(command="cat -n", stdin="line1\nline2")
# -> stdout: "1 line1\n2 line2", exit code: 0
# Limit output size (default is ~49 KB)
execute(command="cat bigfile.log", max_output_bytes=10000)
# -> stdout: truncated at 10000 bytes ... [output truncated at 10000 bytes (~10 KB)]execute parameters:
Param | Type | Required | Description |
| string | yes | Shell command to execute (run via shell) |
| string | no | String piped to the process stdin, then stream closed |
| string | no | Working directory (defaults to workspace folder root) |
| number | no | Hard timeout (default: |
| number | no | Max combined stdout+stderr size before truncation (default: |
| object | no | Extra env vars merged on top of process.env |
| string | yes | Workspace identifier |
execute output: stdout, then a --- stderr --- section (if any), then [exit code: N]. On truncation: [output truncated at N bytes (~N KB) — use terminal_run to see more]. On timeout: [STILL RUNNING — timed out after Ns, process killed, no exit code.]
IDE tools
get_diagnostics— errors/warnings/hints from open files or a specific fileget_document_symbols— symbol outline of a fileget_references— find all references of a symbolrename_symbol— rename a symbol across the workspacerun_command— execute any VS Code command by IDopen_file— open a file in the editor (visual action only)format_document— format a file and saveorganize_imports— remove unused + sort imports, savefix_all— apply all auto-fixable diagnostics, savesave_all— save all open filesfind_in_files— open workspace search panelget_hover_info— type info/docs for a symbol
Debug tools
debug_breakpoints— add/remove/list/clear breakpointsdebug_start— start a debug sessiondebug_stop— stop a debug sessiondebug_state— snapshot of threads, call stacks, scopes, variablesdebug_control— continue/pause/step/restart/evaluatedebug_console_output— read debug console output
Terminal Engine
The extension uses shell integration by default (real TTY, exit codes, cd/env persistence, busy detection). If shell integration is unavailable (e.g. ash/Alpine shells), it falls back to a node-pty engine. terminal_list reports each terminal's engine ([shell-integration] vs [no shell-integration]).
Configuration
Settings (all under vscode-mcp.*):
host/port— hub server addressmode—auto(probe server, use client mode if reachable else serverless) orclient-onlyterminalEngine—autoorforce-fallbackoutputBufferLines— max lines of terminal output to buffersatelliteTimeoutMs— timeout for waiting on a satelliteterminalRunTimeoutMs— default hard wait forterminal_run(default 300000)terminalWaitTimeoutMs— default max block forterminal_wait(default 300000)shellReadDrainMs— drain time for shell-integration read streamshellStartBindMs— max wait for shell start event rebindterminalCreateWarmupMs— warmup wait afterterminal_createmaxOutputBytes— default max output size forexecute(default 50000 ≈ 49 KB)
Build
cd vscode-mcp/extension
npm install
npm run compile # tsc -p ./License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceProvides cross-platform terminal access through MCP, enabling AI assistants to create and manage interactive terminal sessions, execute commands, and capture visual snapshots on Windows, Linux, and macOS.1MIT
- AlicenseAqualityDmaintenanceEnables management of visible, interactive terminal sessions across platforms (macOS, Windows, Linux, WSL). Supports creating, executing commands, capturing output, and managing multiple terminal windows simultaneously.51MIT
- FlicenseAqualityDmaintenanceA lightweight MCP server that provides AI assistants with access to a system's terminal through a secure terminal tool. It enables users to execute shell commands and receive stdout, stderr, and exit codes directly within an MCP-compatible client.1
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to control VSCode workspaces, including file operations, terminal commands, search, and workspace management.
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
Shared long-term memory vault for AI agents with 20 MCP tools.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/prog76/mcp_vscode'
If you have feedback or need assistance with the MCP directory API, please join our Discord server