MCP Connector

Enhance Code Navigation and Analysis

Language Server MCP Server exposes LSP tools like definition, references, and rename to LLMs for any supported language.

Works with githubgo

91
Spark score
out of 100
Updated 6 months ago
Source checked Sep 7, 2026
Version 0.1.1
Models
universal

Add to Favorites

Why it matters

Empower developers to navigate and understand complex codebases with advanced semantic analysis. This MCP server integrates with language servers to provide intelligent code assistance, improving development efficiency and code quality.

Outcomes

What it gets done

01

Provide definition lookup for symbols

02

Find all references to a symbol

03

Perform symbol renaming across the project

04

Generate code diagnostics and suggestions

Source

Get it from source

Spark does not host a copy of it.

Open source

Reports

Agent outcome reports

No reports yet

Capabilities

Tools your agent gets

definition

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

references

Finds all uses and references of a symbol throughout the code base

diagnostics

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

hover

Displays documentation, type hints, or other information on hover for a specified position

rename_symbol

Renames a symbol throughout the project

edit_file

Allows making multiple text edits to a file based on line numbers

Overview

Language Server MCP Server

Language Server MCP Server wraps a real Language Server Protocol server, such as gopls or pyright, exposing definition, references, rename, and diagnostics tools to LLMs. Use it when an LLM needs IDE-grade semantic code navigation in a real codebase instead of grep-based guessing.

What it does

Language Server MCP Server is an MCP server that runs and exposes a Language Server Protocol (LSP) server to LLMs, giving MCP-enabled clients semantic code-navigation tools, get definition, find references, rename, and diagnostics, instead of grepping through source files. It's explicitly the reverse of a "language server for MCP": it's an MCP wrapper around an existing LSP server for your language.

When to use - and when NOT to

Use it when you want an LLM to navigate a real codebase the way an IDE does: jumping to a symbol's definition, finding every usage of a function, checking hover documentation and type hints, renaming a symbol across a project, or reading a file's diagnostics. It requires Go to build the server itself, plus a language server for whatever language you're working in, gopls for Go, rust-analyzer for Rust, pyright for Python, and others, each installed and configured separately, with the workspace path and LSP command passed as flags. It's a semantic navigation layer, not a full IDE replacement, and it depends entirely on the quality of the underlying language server for the language in question.

Capabilities

  • definition: retrieves the complete source code definition of any symbol, such as a function, type, or constant, from the 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: makes multiple text edits to a file based on line numbers, described as a more reliable and context-economical alternative to search-and-replace editing

How to install

Install Go, then install the server:

go install github.com/isaacphi/mcp-language-server@latest

Install a language server for your language, for example gopls for Go, rust-analyzer for Rust, or pyright for Python, then configure your MCP client to run mcp-language-server with --workspace and --lsp flags pointing at your project and chosen language server, for example:

{
  "mcpServers": {
    "language-server": {
      "command": "mcp-language-server",
      "args": ["--workspace", "/Users/you/dev/yourproject/", "--lsp", "gopls"]
    }
  }
}

Some setups, like Go via Claude Desktop, additionally need PATH, GOPATH, GOCACHE, and GOMODCACHE environment variables set so the wrapped language server can be found and run correctly.

Who it's for

Developers using an LLM to work in a real, non-trivial codebase who want IDE-grade semantic navigation, definitions, references, renames, diagnostics, instead of relying on grep or the model's own guesses about where a symbol lives.

Source README

MCP Language Server

Go Tests
Go Report Card
GoDoc
Go Version

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 https://golang.org/doc/install
  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",
      "args": [
        "--workspace",
        "/Users/you/dev/yourproject/",
        "--lsp",
        "/path/to/your/clangd_binary",
        "--",
        "--compile-commands-dir=/path/to/yourproject/build_or_compile_commands_dir"
      ]
    }
  }
}
<p><strong>Note</strong>:</p>
<ul>
  <li>Replace <code>/path/to/your/clangd_binary</code> with the actual path to your clangd executable.</li>
  <li><code>--compile-commands-dir</code> should point to the directory containing your <code>compile_commands.json</code> file (e.g., <code>./build</code>, <code>./cmake-build-debug</code>).</li>
  <li>Ensure <code>compile_commands.json</code> is generated for your project for clangd to work effectively.</li>
</ul>
Other

I have only tested this repo with the servers above but it should be compatible with many more. Note:

  • The language server must communicate over stdio.
  • Any aruments after -- are sent as arguments to the language server.
  • Any env variables are passed on to the language server.

Tools

  • 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: Display documentation, type hints, or other hover information for a given location.
  • rename_symbol: Rename 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.

About

This codebase makes use of edited code from gopls to handle LSP communication. See ATTRIBUTION for details. Everything here is covered by a permissive BSD style license.

mcp-go is used for MCP communication. Thank you for your service.

This is beta software. Please let me know by creating an issue if you run into any problems or have suggestions of any kind.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.