Skip to main content
Glama

VSCode LSP MCP Server

by beixiyo
MIT License
1

VSCode LSP MCP 🚀

English | 中文

🔍 Overview

VSCode LSP MCP is a Visual Studio Code extension that exposes Language Server Protocol (LSP) features through the Model Context Protocol (MCP). This allows AI assistants and external tools to utilize VSCode's powerful language intelligence capabilities without direct integration.

demo

🌟 Why This Extension?

Large language models like Claude and Cursor struggle to understand your codebase accurately because:

  • They rely on regex patterns to find symbols, leading to false matches
  • They can't analyze import/export relationships properly
  • They don't understand type hierarchies or inheritance
  • They have limited code navigation capabilities

This extension bridges that gap, providing AI tools with the same code intelligence that VSCode uses internally!

⚙️ Features

  • 🔄 LSP Bridge: Converts LSP features into MCP tools
  • 🔌 Multi-Instance Support: Automatically handles port conflicts for multiple VSCode windows
  • 🧠 Rich Code Context: Provides accurate symbol information through LSP

🛠️ Exposed MCP Tools

ToolDescription
get_hoverGet hover information for symbols
get_definitionFind symbol definitions
get_completionsGet intelligent code completions
get_referencesFind all references to a symbol
rename_symbolRename symbols across files

📋 Configuration

KeyDescriptionTypeDefault
lsp-mcp.enabledEnable or disable the LSP MCP server.booleantrue
lsp-mcp.portPort for the LSP MCP server.number9527
lsp-mcp.maxRetriesMaximum number of port retry attempts when the default port is occupied.number10

🔗 Integration with AI Tools

Cursor

{ "mcpServers": { "lsp": { "url": "http://127.0.0.1:9527/mcp" } } }

Roo Code

{ "mcpServers": { "lsp": { "type": "streamable-http", "url": "http://127.0.0.1:9527/mcp", "disabled": false } } }

💻 Development

  • Clone the repository
  • Run pnpm install
  • Run pnpm run update to generate metadata
  • Press F5 to start debugging
-
security - not tested
A
license - permissive license
-
quality - not tested

An MCP server that exposes Language Server Protocol features to external clients, allowing access to hover information, definitions, completions, references, and rename functionalities.

  1. 🔍 Overview
    1. 🌟 Why This Extension?
  2. ⚙️ Features
    1. 🛠️ Exposed MCP Tools
      1. 📋 Configuration
        1. 🔗 Integration with AI Tools
          1. Cursor
          2. Roo Code
        2. 💻 Development

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A beginner-friendly Model Context Protocol (MCP) server that helps users understand MCP concepts, provides interactive examples, and lists available MCP servers. This server is designed to be a helpful companion for developers working with MCP. Also comes with a huge list of servers you can install.
            Last updated -
            3
            251
            61
            JavaScript
            Apache 2.0
          • -
            security
            A
            license
            -
            quality
            MCP Server simplifies the implementation of the Model Context Protocol by providing a user-friendly API to create custom tools and manage server workflows efficiently.
            Last updated -
            0
            4
            TypeScript
            MIT License
          • -
            security
            A
            license
            -
            quality
            MCP Server provides a simpler API to interact with the Model Context Protocol by allowing users to define custom tools and services to streamline workflows and processes.
            Last updated -
            2
            3
            TypeScript
            MIT License
          • -
            security
            F
            license
            -
            quality
            An MCP server that enables language models to access code intelligence features like completions, definitions, and references across multiple programming languages through the Language Server Protocol.
            Last updated -
            Python

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/beixiyo/vsc-lsp-mcp'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server