🏎️ 🏠 - Navigate codebases with language server tools: go to definition, find references, rename and…
MCP Language Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
This is an MCP server that runs and exposes a language server to LLMs. Not a language server for MCP, whatever that would be.
Demo
mcp-language-server helps MCP enabled clients navigate codebases more easily by giving them access semantic tools like get definition, references, rename, and diagnostics.
Setup
1. **Install Go**: Follow instructions at
2. **Install or update this server**: go install github.com/isaacphi/mcp-language-server@latest
3. **Install a language server**: _follow one of the guides below_
4. **Configure your MCP client**: _follow one of the guides below_
Go (gopls)
Install gopls : go install golang.org/x/tools/gopls@latest
Configure your MCP client : This will be different but similar for each client. For Claude Desktop, add the following to ~/Library/Application\ Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"language-server": {
"command": "mcp-language-server",
"args": ["--workspace", "/Users/you/dev/yourproject/", "--lsp", "gopls"],
"env": {
"PATH": "/opt/homebrew/bin:/Users/you/go/bin",
"GOPATH": "/users/you/go",
"GOCACHE": "/users/you/Library/Caches/go-build",
"GOMODCACHE": "/Users/you/go/pkg/mod"
}
}
}
}
Note : Not all clients will need these environment variables. For Claude Desktop you will need to update the environment variables above based on your machine and username:
PATH needs to contain the path to go and to gopls . Get this with echo $(which go):$(which gopls)
GOPATH , GOCACHE , and GOMODCACHE may be different on your machine. These are the defaults.
Rust (rust-analyzer)
Install rust-analyzer : rustup component add rust-analyzer
Configure your MCP client : This will be different but similar for each client. For Claude Desktop, add the following to ~/Library/Application\ Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"language-server": {
"command": "mcp-language-server",
"args": [
"--workspace",
"/Users/you/dev/yourproject/",
"--lsp",
"rust-analyzer"
]
}
}
}
Python (pyright)
Install pyright : npm install -g pyright
Configure your MCP client : This will be different but similar for each client. For Claude Desktop, add the following to ~/Library/Application\ Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"language-server": {
"command": "mcp-language-server",
"args": [
"--workspace",
"/Users/you/dev/yourproject/",
"--lsp",
"pyright-langserver",
"--",
"--stdio"
]
}
}
}
Typescript (typescript-language-server)
Install typescript-language-server : npm install -g typescript typescript-language-server
Configure your MCP client : This will be different but similar for each client. For Claude Desktop, add the following to ~/Library/Application\ Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"language-server": {
"command": "mcp-language-server",
"args": [
"--workspace",
"/Users/you/dev/yourproject/",
"--lsp",
"typescript-language-server",
"--",
"--stdio"
]
}
}
}
C/C++ (clangd)
Install clangd : Download prebuilt binaries from the official LLVM releases page or install via your system's package manager (e.g., apt install clangd , brew install clangd ).
Configure your MCP client : This will be different but similar for each client. For Claude Desktop, add the following to ~/Library/Application\\ Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"language-server": {
"command": "mcp-language-server",