VSCode LSP MCP Server
Enterprise-grade Language Server Protocol integration for Claude Code
Professionally maintained by Trade Me | Production-ready | Easily extensible
Bridge the power of VS Code's language intelligence with Claude Code through the Model Context Protocol (MCP). This extension exposes Language Server Protocol (LSP) capabilities as MCP tools, enabling Claude Code to understand and navigate your codebase with the same precision as VS Code.
🎯 Why This Extension?
- 🏢 Enterprise Backing: Developed and maintained by Trade Me, not a hobby project
- 🔧 Production Ready: Comprehensive test coverage (21+ tests), CI/CD pipeline, semantic versioning
- 🚀 Easily Extensible: Modular architecture makes adding new LSP capabilities straightforward
- 🛡️ Robust: Graceful error handling, defensive coding, works with any language server
- 📦 Zero Configuration: Works out of the box with one-click installation for Claude Code
- 🌍 Multi-Language: Supports any language with a VS Code extension (TypeScript, Python, Go, Rust, C#, Java, etc.)
✨ Features
Intelligent Code Navigation
🔍 Smart Symbol Search
- Find symbols across your entire workspace with exact-match priority
- Search by name, type, or context
- Works with classes, functions, variables, interfaces, and more
📍 Precise Location Finding
- Jump to definitions, declarations, type definitions, and implementations
- Find all references and usages of any symbol
- Navigate complex codebases with ease
✏️ Safe Refactoring
- Rename symbols across your entire workspace
- Automatic file saving with pre-flight safety checks
- Prevents data loss from unsaved edits
📄 Document Analysis
- Extract all symbols from any file
- Understand code structure at a glance
- Works with your existing language servers
🚀 Quick Start
Installation
Install from the VS Code Marketplace or Open VSX Registry:
code --install-extension trademe.vscode-lsp-mcp
Setup with Claude Code
The extension includes a one-click installer for Claude Code:
- Open VS Code Command Palette (
Cmd/Ctrl + Shift + P)
- Run: "LSP MCP: Install for Claude Code"
- Restart Claude Code
That's it! Claude Code now has access to your VS Code language intelligence.
Claude Code gains access to these powerful LSP capabilities:
| Tool |
Description |
Use Case |
| workspace_symbols |
Search symbols across workspace |
"Find all classes named Calculator" |
| document_symbols |
Extract symbols from a file |
"Show me all functions in this file" |
| find_symbol_locations |
Find definitions, references, implementations |
"Where is this function defined?" |
| rename_symbol |
Safely rename across workspace |
"Rename this variable to userId" |
find_symbol_locations
The most powerful tool - consolidates multiple LSP operations:
- Definitions: Where a symbol is implemented
- Declarations: Where a symbol is declared (headers, interfaces)
- Type Definitions: The type of a symbol
- Implementations: All implementations of an interface/abstract class
- References: Every usage of a symbol
Use boolean flags to get exactly what you need in a single call.
💡 Usage Examples
Claude Code can now understand your codebase like never before:
👤 "Find all implementations of the PaymentProcessor interface"
🤖 Claude uses find_symbol_locations with includeImplementations=true
👤 "Rename the calculateTotal function to computeSum across the entire project"
🤖 Claude uses rename_symbol, checks for unsaved files, applies changes, saves files
👤 "Show me everywhere this API endpoint is called"
🤖 Claude uses find_symbol_locations with includeReferences=true
⚙️ Configuration
Autostart (Recommended)
Enable automatic server startup for your workspace:
# Via Command Palette
LSP MCP: Enable Autostart for This Workspace
# Or add to .vscode/settings.json
{
"vscode-lsp-mcp.autostart": true
}
Server Port
The default port is 37140. If needed, change it in VS Code settings:
{
"vscode-lsp-mcp.serverPort": 37140
}
The extension automatically finds the next available port if the configured port is in use.
CLI Control
Control the server from the command line:
# macOS/Linux
open "vscode://trademe.vscode-lsp-mcp/start"
# Windows
start "vscode://trademe.vscode-lsp-mcp/start"
Available commands: start, stop, enableAutostart, disableAutostart
🏗️ Architecture & Extensibility
Built for Extension
This isn't just an extension - it's a platform. The modular architecture makes it easy to add new LSP capabilities:
- Tool Registry Pattern: Tools self-register on import
- Type-Safe Interfaces: Clear contracts via TypeScript
- Comprehensive Documentation: Every component is documented
- Test Coverage: 100% tool coverage with integration tests
Want to add a new LSP capability? See CONTRIBUTING.md for the simple 4-step process.
Production Quality
- ✅ Automated CI/CD: GitLab pipeline with test, package, and publish stages
- ✅ Semantic Versioning: Tag-based releases (v0.3.0, v0.4.0, etc.)
- ✅ Comprehensive Testing: 21+ integration tests across TypeScript and C#
- ✅ Error Resilience: Graceful handling of LSP provider failures
- ✅ Security: Pre-flight checks, validation, defensive coding throughout
Organizational Support
Maintained by Trade Me - New Zealand's largest online marketplace
- Active development and maintenance
- Enterprise-grade quality standards
- Long-term commitment to the project
- Professional code review and testing
This is not a weekend project that will be abandoned. We use this extension in production.
🌍 Language Support
Works with any language that has a VS Code extension:
- ✅ TypeScript/JavaScript (built-in)
- ✅ Python (ms-python.python)
- ✅ C# (ms-dotnettools.csharp)
- ✅ Go (golang.go)
- ✅ Rust (rust-lang.rust-analyzer)
- ✅ Java (redhat.java)
- ✅ And hundreds more...
The extension leverages your existing language servers - no additional setup required.
📊 What Users Are Saying
"Finally, Claude Code can navigate my codebase as well as I can in VS Code. Game changer for refactoring."
— Development Team, Trade Me
"The fact that it's backed by an organization and not a hobby project gives me confidence to use it in production."
— Enterprise Developer
🤝 Contributing
We welcome contributions! See CONTRIBUTING.md for:
- Development setup
- Architecture overview
- How to add new tools
- Testing guidelines
- Release process
📝 Changelog
See CHANGELOG.md for detailed release notes.
Latest Release: v0.3.0
- Consolidated symbol location tools (4 → 1)
- Enhanced error handling and robustness
- Complete CI/CD pipeline
- Comprehensive documentation
🐛 Troubleshooting
Server Not Connecting
- Check the VS Code notification for the actual port (may differ from 37140)
- Verify Claude Code's MCP configuration matches:
http://localhost:<port>
- Ensure VS Code is running with the extension active
- Try: "LSP MCP: Install for Claude Code" to reconfigure
No Symbols Found
Ensure the appropriate language extension is installed and active:
- TypeScript: Built-in
- C#: Install ms-dotnettools.csharp + ms-dotnettools.csdevkit
- Python: Install ms-python.python
- Other languages: Install the corresponding VS Code extension
The language server needs a moment to index your workspace after opening.
Extension Not Loading
Check the Output panel (View → Output → "Extension Host") for errors. Most issues are resolved by:
- Reloading VS Code (
Developer: Reload Window)
- Reinstalling the extension
- Checking for extension conflicts
Still stuck? Open an issue with details.
📄 License
MIT License - See LICENSE for details
🔗 Links
Made with ❤️ by Trade Me
Bridging the gap between AI and your codebase