
VS Claude
STDIOVS Code extension with MCP server for AI assistants to interact with Visual Studio Code
VS Code extension with MCP server for AI assistants to interact with Visual Studio Code
A VS Code extension with an integrated MCP server that allows MCP clients like Claude to interact with Visual Studio Code.
VS Claude provides powerful tools for AI assistants to interact with VS Code, featuring modern webviews, comprehensive code intelligence, and batch operations for optimal performance.
mcp/main.go
for the full tool descriptionsymbols - Find code elements by pattern with support for wildcards and hierarchical queries
references - Find all usages of a symbol at a specific location
definition - Get the definition location of a symbol
diagnostics - Get errors and warnings from the language server
allTypesInFile - Get all types and top-level functions in a file
supertype - Find what a type extends/implements
subtype - Find implementations/subclasses of a type
All code intelligence tools support batch operations for improved performance:
// Single request mcp_vs-claude_symbols({args: {query: "UserService", kinds: ["class"]}}) // Batch requests (executed in parallel) mcp_vs-claude_symbols({args: [ {query: "get*", kinds: ["method"]}, {query: "User*", kinds: ["interface"]}, {query: "process*", path: "/path/to/file.ts"} ]})
git clone https://github.com/your-username/vs-claude.git cd vs-claude npm install npm run build
Cmd+Shift+P
(Mac) or Ctrl+Shift+P
(Windows/Linux).vsix
fileAfter installation:
VS Claude consists of two components:
Commands:
VS Claude: Install MCP
- Install the MCP server with ClaudeVS Claude: Uninstall MCP
- Remove the MCP server from ClaudeVS Claude: Test Query Tool
- Open interactive query tester with all toolsVS Claude: Show Logs
- View real-time extension logs with colored outputMCP Client (Claude) ↔ MCP Server ↔ File System ↔ VS Code Extension
~/.vs-claude/{windowId}.in
~/.vs-claude/{windowId}.out
~/.vs-claude/{windowId}.meta.json
npm run build # Build TypeScript, webviews, and Go binaries npm run build:debug # Build with Go debug symbols (no cross-compilation) npm run check # Format with Biome, lint, and type check all code npm run test # Run e2e tests (builds MCP server, compiles tests, launches VS Code) npm run clean # Remove build artifacts
scripts/build-webviews.js
vs-claude/
├── src/ # TypeScript extension source
│ ├── extension.ts # Main entry point
│ ├── tools/ # Individual tool implementations
│ │ ├── symbols-tool.ts # Symbol search with wildcards
│ │ ├── references-tool.ts # Find all usages
│ │ ├── definition-tool.ts # Go to definition
│ │ ├── diagnostics-tool.ts # Error/warning detection
│ │ ├── all-types-in-file-tool.ts # Extract all types from file
│ │ ├── sub-and-super-type-tool.ts # Type hierarchy navigation
│ │ ├── open-tool.ts # Open files/diffs
│ │ └── types.ts # Shared TypeScript types
│ ├── views/ # Modern webview implementations
│ │ ├── components/ # Lit Web Components
│ │ │ ├── log-entry.ts # Individual log entry component
│ │ │ ├── log-viewer.ts # Log viewer container
│ │ │ └── test-tool.ts # Test tool interface
│ │ ├── log-viewer-webview.ts # Log viewer entry point
│ │ ├── test-tool-webview.ts # Test tool entry point
│ │ ├── webview-base.ts # Shared webview utilities
│ │ ├── styles.css # Tailwind CSS styles
│ │ ├── tailwind.config.js # Tailwind configuration
│ │ └── tsconfig.json # Browser-specific TypeScript config
│ ├── command-handler.ts # Command dispatcher with batch support
│ ├── window-manager.ts # Window IPC management
│ ├── logger.ts # Structured logging system
│ ├── log-viewer-provider.ts # Log viewer webview provider
│ ├── test-tool-provider.ts # Test tool webview provider
│ └── setup.ts # MCP installation logic
├── mcp/ # Go MCP server source
│ └── main.go # MCP server implementation
├── scripts/ # Build and utility scripts
│ ├── build-webviews.js # Webview bundling script
│ └── build-binaries.sh # Cross-platform Go compilation
├── test/ # Comprehensive test suite
│ ├── suite/
│ │ ├── individual-tools.test.ts # Individual tool tests
│ │ ├── query-patterns.test.ts # Pattern matching tests
│ │ ├── open-tool.test.ts # Open tool tests
│ │ └── test-helpers.ts # Shared test utilities
│ ├── test-workspace/ # Multi-language test project
│ │ └── src/ # Sample code in various languages
│ ├── setup-test-workspace.js # Git setup for tests
│ └── runTest.ts # Test runner
├── bin/ # Built binaries (generated)
├── out/ # Compiled TypeScript (generated)
└── CLAUDE.md # Project-specific instructions
The project includes comprehensive end-to-end tests that:
The test/test-workspace
directory contains a multi-language sample project used for testing:
Run tests with:
npm test
The test process:
Note: First test run will be slower as it downloads VS Code and installs language extensions.
claude mcp list
When multiple windows are open, you'll get an error listing available windows. Include the windowId in subsequent calls:
mcp_vs-claude_query({ args: {"type": "symbols", "query": "UserService"}, windowId: "window-123" })
The Java Language Server (used by the Red Hat Java extension) does not support the standard VS Code type hierarchy API. As a result, the supertype
and subtype
tools will not work with Java files. The Java extension implements its own custom type hierarchy using proprietary workspace commands instead of the standard LSP 3.17 type hierarchy protocol.
Contributions are welcome! Please read our contributing guidelines and submit pull requests to our repository.
[License information here]