
juehang/vscode-mcp-server
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
AIコーディングのためにVS Code編集機能をLLMに公開するためのMCPサーバー
概要
Visual Studio Codeの拡張機能(マーケットプレイスで利用可能)で、Claudeや他のMCPクライアントが直接VS Codeでコーディングできるようにします!Serenaにインスパイアされましたが、VS Codeの組み込み機能を利用しています。既存のコーディングエージェント(Claude Code)をVS Code固有の機能(シンボル検索、ドキュメントアウトライン)で拡張するのに最適で、既存のツールを重複させる必要がありません。この拡張機能はSSE APIではなくStreamable HTTP APIを使用していることに注意してください。 この拡張はシェルコマンドの実行を可能にします。つまり、潜在的なセキュリティリスクがあるため、慎重に使い、使用しているMCPクライアントを信頼し、ポートが何かにさらされていないことを確認してください。認証があれば役立ちますが、MCPの認証仕様はまだ変動中であるため、現時点では実装されていません。 https://github.com/user-attachments/assets/20b87dfb-fc39-4710-a910-b9481dde1e90 1.
概要(AI 翻訳)
Visual Studio Codeの拡張機能(マーケットプレイスで利用可能)で、Claudeや他のMCPクライアントが直接VS Codeでコーディングできるようにします!Serenaにインスパイアされましたが、VS Codeの組み込み機能を利用しています。既存のコーディングエージェント(Claude Code)をVS Code固有の機能(シンボル検索、ドキュメントアウトライン)で拡張するのに最適で、既存のツールを重複させる必要がありません。この拡張機能はSSE APIではなくStreamable HTTP APIを使用していることに注意してください。
この拡張はシェルコマンドの実行を可能にします。つまり、潜在的なセキュリティリスクがあるため、慎重に使い、使用しているMCPクライアントを信頼し、ポートが何かにさらされていないことを確認してください。認証があれば役立ちますが、MCPの認証仕様はまだ変動中であるため、現時点では実装されていません。
PRは歓迎します!
デモビデオ
https://github.com/user-attachments/assets/20b87dfb-fc39-4710-a910-b9481dde1e90
設置
- マーケットプレイスから拡張機能をインストールするか、このリポジトリをクローンし、
npm installとnpm run compileを実行して構築します。
Claude Desktop Configuration
Claude Desktopはこの拡張機能をMCPサーバーとして使用するように設定可能です。
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
VS Code MCP Server
A Visual Studio Code extension (available on the Marketplace) that allows Claude and other MCP clients to code directly in VS Code! Inspired by Serena, but using VS Code’s built-in capabilities. Perfect for extending existing coding agents like Claude Code with VS Code-specific capabilities (symbol search, document outlines) without duplicating tools they already have. Note that this extension uses the streamable HTTP API, not the SSE API.
This extension can allow for execution of shell commands. This means that there is a potential security risk, so use with caution, and ensure that you trust the MCP client that you are using and that the port is not exposed to anything. Authentication would help, but as the MCP authentication spec is still in flux, this has not been implemented for now.
PRs are welcome!
Demo Video
https://github.com/user-attachments/assets/20b87dfb-fc39-4710-a910-b9481dde1e90
Installation
- Install the extension from the Marketplace or clone this repository and run
npm installandnpm run compileto build it.
Claude Desktop Configuration
Claude Desktop can be configured to use this extension as an MCP server. To do this, your claude_desktop_config.json file should look like this:
{
"mcpServers": {
"vscode-mcp-server": {
"command": "npx",
"args": ["mcp-remote@next", "http://localhost:3000/mcp"]
}
}
}
I also like to use this extension in a Claude project, as it allows me to specify additional instructions for Claude. I find the following prompt to work well:
You are working on an existing codebase, which you can access using your tools. These code tools interact with a VS Code workspace.
WORKFLOW ESSENTIALS:
1. Always start exploration with list_files_code on root directory (.) first
2. CRITICAL: Run get_diagnostics_code after EVERY set of code changes before completing tasks
3. For small edits (≤10 lines): use replace_lines_code with exact original content
4. For large changes, new files, or uncertain content: use create_file_code with overwrite=true
EXPLORATION STRATEGY:
- Start: list_files_code with path='.' (never recursive on root)
- Understand structure: read key files like package.json, README, main entry points
- Find symbols: use search_symbols_code for functions/classes, get_document_symbols_code for file overviews
- Before editing: read_file_code the target file to understand current content
EDITING BEST PRACTICES:
- Small modifications: replace_lines_code (requires exact original content match)
- If replace_lines_code fails: read_file_code the target lines, then retry with correct content
- Large changes: create_file_code with overwrite=true is more reliable
- After any changes: get_diagnostics_code to check for errors
インストール
npx mcp-remote@next http://localhost:3000/mcp