vscode-mcp
vscode-mcp
VS CodeおよびCursor内でClaudeにIDE機能を提供するMCP(Model Context Protocol)サーバーです。Claudeはチャットから直接、ワークスペース内のファイルの読み取り、書き込み、編集、検索、コマンド実行を行うことができます。
ツール
ツール | 説明 |
| ファイルの内容を読み取る(行範囲指定可能) |
| ファイルへの書き込みまたは上書き(親ディレクトリも作成) |
| ファイル内の特定の文字列を置換 |
| ファイルとディレクトリの一覧表示(再帰的指定可能) |
| ディレクトリツリーの作成 |
| ファイルまたはディレクトリの削除 |
| ファイルまたはディレクトリの移動や名前変更 |
| ファイル全体に対するGrep形式の正規表現検索 |
| グロブパターン(例: |
| 任意のシェルコマンドを実行し、出力を取得 |
| プラットフォーム、Nodeバージョン、Gitブランチとステータスを取得 |
| ファイルのメタデータ(サイズ、更新日時、タイプ)を取得 |
Related MCP server: code-context
インストール
npm install
npm run buildCursorでの使用方法
Cursorは以下の場所からMCPサーバーの設定を読み込みます:
グローバル:
~/.cursor/mcp.jsonプロジェクト:
.cursor/mcp.json(プロジェクトルート内)
オプションA — node経由で実行(ビルド後)
CursorのMCP設定に以下を追加します:
{
"mcpServers": {
"vscode-mcp": {
"command": "node",
"args": ["/absolute/path/to/vscode-mcp/dist/index.js"]
}
}
}オプションB — npx経由で実行(手動ビルド不要)
{
"mcpServers": {
"vscode-mcp": {
"command": "npx",
"args": ["--yes", "vscode-mcp"]
}
}
}設定を編集した後、Cursor Settings → Features → MCPを開き、Refreshをクリック(またはCursorを再起動)してください。
VS Code + Copilot Chatでの使用方法(MCPサポート)
VS Codeのsettings.jsonに以下を追加します:
"mcp": {
"servers": {
"vscode-mcp": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/vscode-mcp/dist/index.js"]
}
}
}開発
npm run dev # watch mode (recompiles on save)
npm start # run the built serverヒント
すべてのパスは絶対パス、またはワークスペースルートからの相対パスで指定できます。
任意のツールに
workspace_rootを渡すことで、相対パスの基準ディレクトリを指定できます。run_commandは任意のシェルコマンドを受け付けます。git、npm、リンター、コンパイラなどに使用してください。search_filesはnode_modules、dist、および隠しフォルダを自動的にスキップします。
Available Tools
12 toolscreate_directoryA
Create a directory (and all parent directories).
Inputs: path (required), workspace_root.
delete_pathB
Delete a file or directory.
Inputs: path (required), recursive, workspace_root.
edit_fileC
Replace an exact string in a file. The old_string must appear exactly once.
Inputs: path (required), old_string (required), new_string (required), workspace_root.
find_filesB
Find files by name glob pattern (e.g. '.ts', 'index.').
Inputs: directory (required), pattern (required), max_results, workspace_root.
get_file_infoB
Get metadata about a file or directory (size, modification time, type).
Inputs: path (required), workspace_root.
get_workspace_infoA
Get information about the current workspace: root directory, platform, Node version, git status summary.
Inputs: workspace_root.
list_directoryB
List files and directories at a given path.
Inputs: path (required), recursive, workspace_root.
move_pathB
Move or rename a file or directory.
Inputs: source (required), destination (required), workspace_root.
read_fileB
Read the contents of a file. Optionally specify a line range.
Inputs: path (required), start_line, end_line, workspace_root.
run_commandA
Execute a shell command in the given working directory. Returns stdout, stderr, and exit code.
Inputs: command (required), cwd, timeout_ms.
search_filesB
Search for a regex pattern inside files. Returns matching lines with file and line number.
Inputs: directory (required), pattern (required), file_glob, ignore_case, +2 more.
write_fileA
Write or overwrite a file with new content. Creates parent directories automatically.
Inputs: path (required), content (required), workspace_root.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool targets a distinct file or workspace operation: create, delete, edit, find, get info, list, move, read, run, search, write. No two tools have overlapping purposes.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., create_directory, read_file, write_file). No deviations or mixed conventions.
12 tools is well-scoped for a file system and workspace utility server, covering essential operations without being overwhelming or too sparse.
The tool set covers fundamental file/directory operations and workspace info. Minor gaps exist such as no copy tool (can be done via read+write) and no line-based editing, but core workflows are supported.
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.15306MIT
- AlicenseAqualityDmaintenanceAn MCP server that provides dynamic codebase context to Claude Code through tools like hybrid search, recent changes, and symbol definitions, enhancing AI-assisted coding with local RAG.835 PyPIMIT
- AlicenseNot gradedqualityDmaintenanceMCP server that integrates with VS Code to enable file operations, git diffs, and line highlighting via MCP clients like Claude.43MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that allows Claude Desktop to remotely control Claude Code instances for executing commands and managing files.56 npmGPL 3.0