language-server-mcp
by: alexwohletz
language server mcp
📌Overview
Purpose: This framework aims to enhance the code editing experience by providing comprehensive language support and functionality through a Model Context Protocol (MCP) server.
Overview: The language-server-mcp is a TypeScript-based server designed to leverage the Model Context Protocol, facilitating seamless tools for code analysis, completion, and diagnostics. It serves as a model of MCP concepts while targeting primarily TypeScript, with potential for expansion to other languages like Python.
Key Features:
-
Language Support: Offers hover information, code completion suggestions, and diagnostic reporting to improve the coding workflow.
-
MCP Integration: Implements the MCP protocol for effective communication with clients, exposing various language features as MCP tools.
-
Tools: Provides specific functions like
get_hover
,get_completions
, andget_diagnostics
that retrieve relevant information based on the language and document position.
language-server-mcp MCP Server
A Model Context Protocol (MCP) server providing language support for code editing using TypeScript.
Features
Language Support
- Hover information for symbols in code
- Code completion suggestions
- Diagnostic information (errors, warnings)
- Currently tested with TypeScript; theoretical support for Python and potential expansion to other languages.
MCP Integration
- Implements the MCP protocol for client communication
- Exposes language features as MCP tools
Tools
get_hover
: Retrieve hover information for a specific position in a document.get_completions
: Provide completion suggestions for a specific position in a document.get_diagnostics
: Obtain diagnostic information for a document.
Development
Installation
Install dependencies:
npm install
Build the server:
npm run build
For auto-rebuild during development:
npm run watch
Installation Instructions
To use with Claude Desktop, add the server config in the respective configuration file:
{
"mcpServers": {
"language-server-mcp": {
"command": "/path/to/language-server-mcp/build/index.js"
}
}
}
Debugging
Use the MCP Inspector for debugging. It is available as a package script:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.