MCP.so
Sign In

MCP Language Server

@isaacphi

About MCP Language Server

mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnostics.

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "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"
      }
    }
  }
}

Tools

6

Retrieves 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.

Overview

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.

Frequently asked questions

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.

Comments

More Other MCP servers