Submit

LSP MCP Server

@Tritlo

a year ago
developer-tools
An MCP server that lets you interact with LSP servers
Overview

what is LSP MCP Server?

LSP MCP Server is an MCP (Model Context Protocol) server designed to facilitate interaction with LSP (Language Server Protocol) interfaces, enabling LLMs (Large Language Models) to query LSP Hover and Completion providers for enhanced code suggestions.

how to use LSP MCP Server?

To use the LSP MCP Server, clone the repository, install the dependencies, and run the server by providing the path to the LSP executable along with any necessary arguments. Ensure to start the LSP server using the start_lsp tool before utilizing other functionalities.

key features of LSP MCP Server?

  • get_info_on_location: Retrieve hover information at a specific file location.
  • get_completions: Obtain completion suggestions at a specific file location.
  • get_code_actions: Get code actions for a specified range in a file.
  • start_lsp: Initialize the LSP server with a designated root directory.
  • restart_lsp_server: Restart the LSP server without restarting the MCP server.
  • Detailed logging for debugging and auditing.
  • Simple command-line interface.

use cases of LSP MCP Server?

  1. Enhancing code completion suggestions in IDEs.
  2. Providing hover information for better code understanding.
  3. Facilitating code actions for refactoring and improvements.

FAQ from LSP MCP Server?

  • What are the prerequisites for using LSP MCP Server?

You need Node.js (v16 or later) and npm installed. For the demo server, GHC (8.10 or later) and Cabal (3.0 or later) are required.

  • How do I enable logging?

You can enable logging by setting the LSP_MCP_LOG environment variable before starting the server.

  • Can I restart the LSP server without stopping the MCP server?

Yes! You can use the restart_lsp_server tool to restart the LSP server independently.

© 2025 MCP.so. All rights reserved.

Build with ShipAny.