
juehang/vscode-mcp-server
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
MCP-сервер для предоставления функций редактирования VS кода в LLM для AI-кодирования
Обзор
Расширение Visual Studio Code (доступно на Marketplace), которое позволяет Claude и другим клиентам MCP писать код напрямую в VS Code! Вдохновлённо Serena, но с использованием встроенных возможностей VS Code. Идеально подходит для расширения существующих программных агентов, таких как Claude Code, с возможностями, специфичными для VS Code (поиск символов, контуры документов), без дублирования уже имеющихся инструментов. Обратите внимание, что это расширение использует потоковый HTTP API, а не SSE API. Это расширение позволяет выполнять команды shell. Это означает, что существует потенциальный риск безопасности, поэтому используйте его с осторожностью и убедитесь, что доверяете используемому MCP-клиенту и порт не подвержен воздействию. Аутентификация могла бы помочь, но поскольку спецификация MCP аутентификация всё ещё находится в процессе, она пока не реализована. https://github.com/user-attachments/assets/20b87dfb-fc39-4710-a910-b9481dde1e90 1.
Обзор (машинный перевод)
Расширение Visual Studio Code (доступно на Marketplace), которое позволяет Claude и другим клиентам MCP писать код напрямую в VS Code! Вдохновлённо Serena, но с использованием встроенных возможностей VS Code. Идеально подходит для расширения существующих программных агентов, таких как Claude Code, с возможностями, специфичными для VS Code (поиск символов, контуры документов), без дублирования уже имеющихся инструментов. Обратите внимание, что это расширение использует потоковый HTTP API, а не SSE API.
Это расширение позволяет выполнять команды shell. Это означает, что существует потенциальный риск безопасности, поэтому используйте его с осторожностью и убедитесь, что доверяете используемому MCP-клиенту и порт не подвержен воздействию. Аутентификация могла бы помочь, но поскольку спецификация MCP аутентификация всё ещё находится в процессе, она пока не реализована.
Личные рекорды приветствуются!
Демо-видео
https://github.com/user-attachments/assets/20b87dfb-fc39-4710-a910-b9481dde1e90
Установка
- Установите расширение с Маркетплейса или клонируйте этот репозиторий и запустите
npm installиnpm run compileдля его сборки.
Claude Desktop Configuration
Claude Desktop можно настроить так, чтобы использовать это расширение в качестве MCP-сервера.
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
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