MCP Directory

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

  1. 1Open Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the MCP Language Server config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 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

definition

Retrieves the complete source code definition of any symbol (function, type, constant, etc.) from your codebase.

references

Locates all usages and references of a symbol throughout the codebase.

diagnostics

Provides diagnostic information for a specific file, including warnings and errors.

hover

Displays documentation, type hints, or other hover information for a given location.

rename_symbol

Renames a symbol across a project.

edit_file

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.

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.

View repo Full MCP Language Server page