{"id":30083913,"url":"https://github.com/tjx666/vscode-mcp","last_synced_at":"2025-08-08T23:04:19.857Z","repository":{"id":302909620,"uuid":"1013541801","full_name":"tjx666/vscode-mcp","owner":"tjx666","description":"MCP server for Cloud Code/VSCode/Cursor/Windsurf to use editor self functionality. ⚡ Get real-time LSP diagnostics, type information, and code navigation for AI coding agents without waiting for slow tsc/eslint checks.","archived":false,"fork":false,"pushed_at":"2025-07-27T16:03:01.000Z","size":415,"stargazers_count":22,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-03T15:54:15.906Z","etag":null,"topics":["agent","ai","claude","cursor","eslint","language-server-protocol","lint","llm","lsp","mcp","mcp-server","stylelint","tsc","typescript","vscode","vscode-extension","windsurf"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tjx666.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-04T04:38:41.000Z","updated_at":"2025-08-01T10:45:52.000Z","dependencies_parsed_at":"2025-07-22T09:36:22.890Z","dependency_job_id":null,"html_url":"https://github.com/tjx666/vscode-mcp","commit_stats":null,"previous_names":["tjx666/vscode-mcp"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/tjx666/vscode-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjx666%2Fvscode-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjx666%2Fvscode-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjx666%2Fvscode-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjx666%2Fvscode-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tjx666","download_url":"https://codeload.github.com/tjx666/vscode-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjx666%2Fvscode-mcp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269502566,"owners_count":24427789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","ai","claude","cursor","eslint","language-server-protocol","lint","llm","lsp","mcp","mcp-server","stylelint","tsc","typescript","vscode","vscode-extension","windsurf"],"created_at":"2025-08-08T23:01:25.883Z","updated_at":"2025-08-08T23:04:19.848Z","avatar_url":"https://github.com/tjx666.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VSCode MCP\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"packages/vscode-mcp-bridge/assets/logo.png\" alt=\"VSCode MCP\" width=\"200\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eConnect VSCode with MCP (Model Context Protocol) for enhanced AI assistant capabilities\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#design-motivation\"\u003eDesign Motivation\u003c/a\u003e •\n  \u003ca href=\"#available-tools\"\u003eAvailable Tools\u003c/a\u003e •\n  \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e •\n  \u003ca href=\"#architecture\"\u003eArchitecture\u003c/a\u003e •\n  \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\n[![MCP Badge](https://lobehub.com/badge/mcp/tjx666-vscode-mcp)](https://lobehub.com/mcp/tjx666-vscode-mcp) ![CI](https://github.com/tjx666/vscode-mcp/actions/workflows/vscode-extension-ci.yml/badge.svg) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com) [![Github Open Issues](https://img.shields.io/github/issues/tjx666/vscode-mcp)](https://github.com/tjx666/vscode-mcp/issues) [![LICENSE](https://img.shields.io/badge/license-Anti%20996-blue.svg?style=flat-square)](https://github.com/996icu/996.ICU/blob/master/LICENSE)\n\n## Overview\n\nVSCode MCP is a comprehensive monorepo solution that enables MCP (Model Context Protocol) clients to access rich VSCode context information in real-time. This project bridges the gap between AI assistants and your development environment, providing accurate code analysis, diagnostics, and intelligent code navigation.\n\n## Design Motivation\n\n**VSCode MCP Bridge primarily serves AI IDEs (like Cursor) and AI coding agents**, helping them develop and analyze code more efficiently.\n\nTraditional AI coding agents often need to execute time-consuming commands when validating code modifications:\n\n- `tsc --noEmit` - TypeScript type checking\n- `eslint .` - Code style checking\n- `npm run build` - Project building\n\nThese commands run slowly in large projects, severely impacting AI development efficiency. VSCode MCP Bridge provides real-time LSP (Language Server Protocol) information, allowing AI agents to:\n\n- **Get fast diagnostics** (`get-diagnostics`) - Replace time-consuming type checking and lint commands\n- **Access real-time type information** (`get-hover`) - Get accurate type definitions without compilation\n- **Navigate code efficiently** (`get-definition`, `get-references`) - Understand code structure and dependencies\n- **Call IDE AI agents** (`call-agent`) - Integrate with built-in AI assistants like Cursor Composer, GitHub Copilot, and others\n\n### Core Advantages\n\n1. **Real-time**: Leverage VSCode's LSP for real-time code state without executing slow commands\n2. **Accuracy**: Precise analysis based on language servers, more reliable than static analysis\n3. **Efficiency**: Significantly reduce AI coding agent wait times\n4. **Integration**: Deep integration with VSCode ecosystem, supporting multiple languages and extensions\n5. **AI Collaboration**: Enable AI agents to work together by calling IDE-native AI assistants (Cursor Composer, GitHub Copilot, etc.)\n\n## Available Tools\n\nVSCode MCP provides the following tools through the MCP protocol:\n\n| Tool                   | Description                                      | Parameters                                                                                    |\n| ---------------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------- |\n| **call_agent**         | Call IDE's AI agent with prompts and context     | `prompt`, `files?`, `images?`, `model?`, `mode?`, `ide_type?`                                 |\n| **execute_command**    | Execute VSCode commands with arguments           | `command`, `args?`                                                                            |\n| **get_commands**       | Get all available VSCode commands in workspace   | `include_internal?`, `filter?`, `category?`, `limit?`                                         |\n| **get_definition**     | Get symbol definition locations                  | `uri`, `line`, `character`                                                                    |\n| **get_diagnostics**    | Get diagnostic information with Git integration  | `uris` (array, empty = all git modified files)                                                |\n| **get_hovers**         | Get hover information for multiple positions     | `positions` (array), `includeAllHovers?`                                                      |\n| **get_references**     | Get symbol reference locations                   | `uri`, `line`, `character`, `includeDeclaration?`                                             |\n| **get_signature_help** | Get function signature help                      | `uri`, `line`, `character`                                                                    |\n| **health_check**       | Test connection and get extension status         | None                                                                                          |\n| **highlight_code**     | Open file and highlight specific code sections   | `uri`, `ranges` (array with line numbers, messages, types, colors), `showEditor?`, `timeout?` |\n| **open_diff**          | Open diff editor to compare files or text        | `before?`, `after?`, `beforeText?`, `afterText?`, `beforeLabel?`, `afterLabel?`, `language?`  |\n| **open_files**         | Open multiple files with optional editor display | `files` (array with `uri` and `showEditor?`)                                                  |\n| **rename_symbol**      | Rename symbols across all files in workspace     | `uri`, `line`, `character`, `newName`                                                         |\n| **request_input**      | Request simple text input from user              | `prompt`, `placeholder?`, `title?`, `password?`, `validateInput?`                             |\n\n\u003e **⚠️ Security Warning**: The `execute_command` tool can execute arbitrary VSCode commands and potentially trigger dangerous operations. Use with extreme caution and only with trusted AI models.\n\n### AI Agent Integration\n\nThe `call_agent` tool enables seamless integration between external AI assistants and IDE-native AI agents. This creates a powerful collaborative AI ecosystem where different AI agents can work together on complex coding tasks.\n\n**Supported IDEs:**\n\n- **Cursor**: Integrates with Cursor Composer for advanced code generation\n- **VSCode**: Supports GitHub Copilot, Cline, Continue, and other popular extensions\n- **Windsurf**: Integrates with Windsurf's native AI capabilities\n- **Trae**: Supports Trae's AI assistant features\n\n**Supported AI Agents:**\n\n- **Cursor Composer**: Advanced code generation and refactoring\n- **GitHub Copilot**: Code completion and chat assistance\n- **Cline**: Interactive coding assistant with file management\n- **Continue**: Open-source coding assistant\n- **Roocode \u0026 Kilocode**: Specialized coding tools\n\n**Key Features:**\n\n- **Auto-detection**: Automatically detects your IDE and available AI extensions\n- **Flexible Input**: Supports text prompts, file attachments, and image inputs\n- **Smart Routing**: Chooses the best available AI agent based on capability and priority\n- **Cross-platform**: Works across different operating systems and IDE configurations\n\nAll tools require the `workspace_path` parameter to target specific VSCode instances.\n\n## Installation\n\n\u003e **🚨 IMPORTANT**: Before installing the MCP server, you must first install the VSCode MCP Bridge extension in your VSCode instance. The extension is required for the MCP server to communicate with VSCode.\n\n### Step 1: Install VSCode Extension\n\nInstall the VSCode MCP Bridge extension using ID: `YuTengjing.vscode-mcp-bridge`\n\n[![Install VSCode Extension](https://img.shields.io/badge/VSCode%20Marketplace-Install%20Extension-007ACC?style=for-the-badge\u0026logo=visualstudiocode)](https://marketplace.visualstudio.com/items?itemName=YuTengjing.vscode-mcp-bridge)\n\nOr search for \"VSCode MCP Bridge\" in the VSCode Extensions marketplace.\n\n### Step 2: Install MCP Server\n\n#### Install in Cursor ✅ Tested\n\n##### ⚠️ Gemini 2.5 Pro Compatibility Note\n\nThe `execute_command` tool is currently not compatible with Gemini 2.5 Pro in Cursor due to potential security restrictions. If you plan to use Gemini 2.5 Pro, it is **highly recommended** to disable this tool to prevent any issues.\n\nYou can disable it by adding a command-line argument to the MCP server configuration in Cursor's settings.\n\n1. Go to `Cursor Settings` -\u003e `Tools \u0026 Integrations`.\n2. Find your `vscode-mcp` server configuration and click `Edit`.\n3. In the `args` array, add the following argument: `\"--disable-tools=execute_command\"`\n4. Your final config should look similar to this:\n\n```json\n{\n  \"mcpServers\": {\n    \"vscode-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"@vscode-mcp/vscode-mcp-server@latest\", \"--disable-tools=execute_command\"]\n    }\n  }\n}\n```\n\nThis will prevent the `execute_command` tool from being registered with the server, ensuring compatibility with Gemini 2.5 Pro.\n\n##### Click the button to install\n\n[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/install-mcp?name=vscode-mcp\u0026config=eyJjb21tYW5kIjoibnB4IEB2c2NvZGUtbWNwL3ZzY29kZS1tY3Atc2VydmVyQGxhdGVzdCJ9)\n\n##### Or install manually\n\nGo to `Cursor Settings` -\u003e `Tools \u0026 Integrations` -\u003e `New MCP Server`. Name to your liking, use `command` type with the command `npx @vscode-mcp/vscode-mcp-server@latest`. You can also verify config or add command line arguments via clicking `Edit`.\n\n```json\n{\n  \"mcpServers\": {\n    \"vscode-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"@vscode-mcp/vscode-mcp-server@latest\"]\n    }\n  }\n}\n```\n\n## Architecture\n\nVSCode MCP follows a modular architecture with three main components communicating through Unix sockets:\n\n```mermaid\ngraph TB\n    subgraph \"MCP Client\"\n        Client[AI Assistant\u003cbr/\u003eCursor/Claude/etc]\n    end\n\n    subgraph \"vscode-mcp-server\"\n        Server[MCP Server\u003cbr/\u003eProtocol Implementation]\n    end\n\n    subgraph \"vscode-mcp-ipc\"\n        IPC[IPC Layer\u003cbr/\u003eType-safe Communication]\n        Socket[Unix Socket\u003cbr/\u003eCross-platform]\n    end\n\n    subgraph \"VSCode Instance\"\n        Extension[VSCode Extension\u003cbr/\u003evscode-mcp-bridge]\n        LSP[Language Server Protocol]\n        API[VSCode API]\n    end\n\n    Client \u003c--\u003e|JSON-RPC\u003cbr/\u003estdio| Server\n    Server \u003c--\u003e|TypeScript\u003cbr/\u003eFunction Calls| IPC\n    IPC \u003c--\u003e|JSON\u003cbr/\u003eUnix Socket| Socket\n    Socket \u003c--\u003e|Local Connection| Extension\n    Extension \u003c--\u003e|Extension API| API\n    Extension \u003c--\u003e|Diagnostics\u003cbr/\u003eNavigation| LSP\n\n    classDef client fill:#e1f5fe\n    classDef server fill:#f3e5f5\n    classDef ipc fill:#e8f5e8\n    classDef vscode fill:#fff3e0\n\n    class Client client\n    class Server server\n    class IPC,Socket ipc\n    class Extension,LSP,API vscode\n```\n\n### Communication Flow\n\n1. **MCP Client** sends requests via JSON-RPC over stdio\n2. **MCP Server** translates requests to TypeScript function calls\n3. **IPC Layer** handles type-safe communication and validation\n4. **Unix Socket** provides fast, local-only communication\n5. **VSCode Extension** executes operations using VSCode APIs\n6. **LSP Integration** provides real-time code analysis and navigation\n\n### Multi-Workspace Support\n\nEach VSCode workspace gets its own socket connection:\n\n- `/Users/user/frontend` → `/tmp/vscode-mcp-a1b2c3d4.sock`\n- `/Users/user/backend` → `/tmp/vscode-mcp-e5f6g7h8.sock`\n\n### How It Works\n\nOnce installed and configured, VSCode MCP works seamlessly with MCP-compatible clients:\n\n1. **VSCode Extension**: Runs in your VSCode instance and provides access to LSP data\n2. **MCP Server**: Translates MCP protocol calls to VSCode extension requests\n3. **Socket Communication**: Uses Unix sockets for fast, local-only communication\n4. **AI Integration**: MCP clients can access real-time code context through standard tools\n\nThe system operates transparently - MCP clients use standard tool calls, and VSCode MCP handles all the complexity of communicating with VSCode's APIs.\n\nAll tools require the `workspace_path` parameter to target specific VSCode instances. Each VSCode workspace gets its own socket connection for multi-window support.\n\n## License\n\nThis project is licensed under the [Anti 996](https://github.com/996icu/996.ICU/blob/master/LICENSE) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjx666%2Fvscode-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftjx666%2Fvscode-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjx666%2Fvscode-mcp/lists"}