MCP Language Server
@isaacphi
关于 MCP Language Server
mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnostics.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"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"
}
}
}
}工具
6Retrieves the complete source code definition of any symbol (function, type, constant, etc.) from your codebase.
Locates all usages and references of a symbol throughout the codebase.
Provides diagnostic information for a specific file, including warnings and errors.
Display documentation, type hints, or other hover information for a given location.
Rename a symbol across a project.
Allows making multiple text edits to a file based on line numbers. Provides a more reliable and context-economical way to edit files compared to search and replace based edit tools.
概览
What is MCP Language Server?
MCP Language Server is an MCP server that runs and exposes a language server (LSP) to LLMs, enabling semantic code navigation such as definitions, references, rename, and diagnostics.
How to use MCP Language Server?
Install via go install github.com/isaacphi/mcp-language-server@latest, install a compatible language server (e.g., gopls, rust-analyzer, pyright), then configure your MCP client (e.g., Claude Desktop) with the binary path, --workspace and --lsp arguments, and any necessary environment variables.
Key features of MCP Language Server
- Definition: retrieves complete source code definition of any symbol.
- References: locates all usages and references of a symbol.
- Diagnostics: provides diagnostic warnings and errors for a file.
- Hover: displays documentation and type hints for a location.
- Rename symbol: renames a symbol across the entire project.
- Edit file: makes multiple text edits to a file by line numbers.
Use cases of MCP Language Server
- Enabling LLMs to navigate and understand codebases semantically.
- Automatically renaming symbols across a project.
- Retrieving definitions and references for code comprehension.
- Applying precise file edits via line-based text editing.
- Getting diagnostics for error detection and correction.
FAQ from MCP Language Server
What language servers are supported?
Go (gopls), Rust (rust-analyzer), Python (pyright), TypeScript (typescript-language-server), C/C++ (clangd), and any LSP server that communicates over stdio.
How do I install MCP Language Server?
Install Go, then run go install github.com/isaacphi/mcp-language-server@latest, then install your desired language server separately.
How do I configure MCP Language Server for Claude Desktop?
Add an entry to claude_desktop_config.json with the command, args including --workspace and --lsp, and any required environment variables.
Does MCP Language Server require any environment variables?
Yes, for some clients like Claude Desktop you may need to set PATH, GOPATH, GOCACHE, and GOMODCACHE to ensure the Go toolchain and language server are found.
Is MCP Language Server production-ready?
The README states it is beta software; users are encouraged to report issues.
其他 分类下的更多 MCP 服务器
Servers
modelcontextprotocolModel Context Protocol Servers
Awesome-MCP-ZH
yzflyMCP 资源精选, MCP指南,Claude MCP,MCP Servers, MCP Clients
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web
🪟 Windows-MCP
CursorTouchMCP Server for Computer Use in Windows
Nginx UI
0xJackyYet another WebUI for Nginx
评论