mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnostics.
Overview
what is MCP Language Server?
MCP Language Server is a Model Context Protocol (MCP) server that runs a language server, providing tools for effective communication with it, especially in large projects.
how to use MCP Language Server?
To use the MCP Language Server, install Go, fetch the server, install a compatible language server for your codebase, and configure your MCP-enabled client with the appropriate settings.
key features of MCP Language Server?
- Retrieves complete source code definitions of symbols.
- Locates all usages and references of a symbol throughout the codebase.
- Provides diagnostic information for specific files, including warnings and errors.
- Supports code lens hints for additional context and actions.
- Allows programmatic text edits to files.
use cases of MCP Language Server?
- Enhancing code navigation and understanding in large projects.
- Facilitating refactoring and code maintenance tasks.
- Improving collaboration in multi-file codebases.
FAQ from MCP Language Server?
- What language servers are compatible with MCP Language Server?
It has been tested with pyright (Python), tsserver (TypeScript), gopls (Go), and rust-analyzer (Rust), but should work with many more.
- Is there a specific setup required?
Yes, you need to install Go, a language server for your codebase, and configure your MCP-enabled client accordingly.
- What is the current status of the MCP Language Server?
The project is currently in pre-beta quality.
Server Config
{
"mcpServers": {
"language-server": {
"command": "go",
"args": [
"run",
"github.com/isaacphi/mcp-language-server@latest",
"--workspace",
"/path/to/codebase/",
"--lsp",
"language-server-executable"
],
"env": {
"LOG_LEVEL": "INFO"
}
}
}
}