
How to add MCP Language Server to Claude Desktop
Gives MCP-enabled clients semantic code tools: definition, references, rename, diagnostics, and more. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.
Last updated June 14, 2026 ยท 1.5kโ ยท stdio ยท no auth
Claude Desktop config for MCP Language Server
go install github.com/isaacphi/mcp-language-server@latest{
"mcpServers": {
"mcp-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"
}
}
}
}Setup steps
- 1Open Claude Desktop โ Settings โ Developer โ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
- 2Paste the MCP Language Server config below under the top-level "mcpServers" key.
- 3Fill in any placeholder secrets (API keys, paths) in the snippet.
- 4Save the file, then fully quit and reopen Claude Desktop.
- 5Open a chat and confirm MCP Language Server's tools appear under the ๐ tools menu.
Before you start
- Go installed (https://golang.org/doc/install) to install the server via 'go install'
- A language server installed and on PATH (e.g. gopls, rust-analyzer, pyright, typescript-language-server, or clangd)
- The chosen language server must communicate over stdio
What MCP Language Server can do in Claude Desktop
definitionRetrieves the complete source code definition of any symbol (function, type, constant, etc.) from your codebase.
referencesLocates all usages and references of a symbol throughout the codebase.
diagnosticsProvides diagnostic information for a specific file, including warnings and errors.
hoverDisplays documentation, type hints, or other hover information for a given location.
rename_symbolRenames a symbol across a project.
edit_fileAllows 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.
MCP Language Server + Claude Desktop FAQ
Where is the Claude Desktop config file?
Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the MCP Language Server config there under the "mcpServers" key and restart the client.
Is this a language server for MCP?
No. It is an MCP server that runs and exposes an existing LSP language server to LLMs, so MCP clients can use semantic code tools.
Which language servers are supported?
The author has tested gopls (Go), rust-analyzer (Rust), pyright (Python), typescript-language-server (TypeScript), and clangd (C/C++), but it should be compatible with many more. The only requirement is that the language server communicates over stdio.
How do I pass arguments to the underlying language server?
Any arguments placed after '--' in the args array are forwarded to the language server, and environment variables in 'env' are passed on to it as well.