Skip to content
MCP Shelf

MCP Language Server

View on GitHub

Puts a real language server behind your assistant: definitions, references, diagnostics and rename.

  • Needs your setup first
  • ★ 1.6K GitHub stars
  • 67 downloads a week
  • Last commit 1 Mar 2026

What is MCP Language Server?

MCP Language Server is a Go program by Phil Isaac that runs a language server such as gopls, rust-analyzer or pyright and gives an assistant definitions, references, diagnostics, hover and rename.

Phil Isaac's server starts a language server of your choice, such as gopls, rust-analyzer, pyright or clangd, against one project and passes its answers to the model. Instead of grepping for a name, the assistant can read the exact definition of a symbol, list every reference to it, see the compiler's warnings and errors for a file, read hover documentation and rename a symbol everywhere at once.

It works with any language server that talks over stdio, and anything after -- in the config is passed straight to it. The author calls it beta software, and the repository has seen little activity since March 2026.

Made by
Phil Isaac (isaacphi) and contributors
Licence
BSD-3-Clause
GitHub stars
1.6K
Downloads
67 a week
Last commit
1 Mar 2026
Tools
6
Runs on
Your computer
Setup checked
27 Oct 2026
Page updated
27 Oct 2026

Our check: It needs something our Linux test machine does not have (an account, a desktop app, a Mac or a running service), so on 27 Oct 2026 we read its tools from the source code instead of running this config. The shared database gave "npx mcp-language-server", an npm package this project does not publish. It is a Go program installed with go install.

MCP Shelf take

MCP Language Server needs something our Linux test machine does not have (an account, an app or a service), so on 27 Oct 2026 we read its source and counted 6 tools. None of them is read-only, so keep "ask before each tool call" on. Other directories point at a package with the same name that belongs to someone else; the config on this page installs the real one. It sits 17th of 21 in its category on our shelf by GitHub stars (1.6K, with 67 downloads a week).
MCP Shelf tests: numbers from our own runs, not the README · tested on 27 Oct 2026

What can MCP Language Server read and change?

It can read

  • The source files in the workspace, through the language server

It can change

  • Files in the workspace, through rename_symbol and edit_file

Safer setup: Point --workspace at a clean git checkout so any edit or rename can be reviewed and reverted.

What's in the pod

What tools does MCP Language Server have?

We found 6 tools in its source code on 27 Oct 2026. 0 only read. The rest can change things, so keep your app's "ask before each tool call" setting on for them.

How we tested it: Tool list read from the Go source. It needs a language server and a project to start against.

Changes things6 tools · Can create, edit, send or delete.

ToolWhat it is for
definitionReturns the full source of the definition of a function, type or constant, by name.
diagnosticsReturns the language server's errors and warnings for a file.
edit_fileApplies several line-based edits to a file in one call.
hoverShows the type information and docs for the symbol at a line and column.
referencesLists every place in the project where a symbol is used.
rename_symbolRenames the symbol at a position and updates every reference to it.

Grouped and described by us. The README on GitHub lists the inputs each tool takes.

How do I install MCP Language Server?

Install steps from the MCP Language Server README

The project's own instructions, copied from its README on GitHub on 27 Oct 2026 under its BSD-3-Clause licence. They are the source of truth; the ready-made configs further down are built from them. The rest of the README is in the README tab.

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.

What you need first

  • Go, to install it
  • A language server for your language, such as gopls or pyright

Steps

  1. Run "go install github.com/isaacphi/mcp-language-server@latest".
  2. Install a language server, for example "go install golang.org/x/tools/gopls@latest" or "npm install -g pyright".
  3. Add the config below with your project path. For pyright use "--lsp", "pyright-langserver", "--", "--stdio".

Add MCP Language Server to your app

Pick your app for a ready-to-paste snippet and where it goes, built from the steps above.

Where it goes: Your terminal, in the project folder

Claude Code
claude mcp add mcp-language-server -- mcp-language-server --workspace /path/to/your/project --lsp gopls

Run this in the project folder after go install has put mcp-language-server on your PATH. For Rust, swap gopls for rust-analyzer; for Python, use pyright-langserver followed by -- --stdio.

Desktop clients may not see your shell PATH. If the language server is not found, add PATH (and for Go, GOPATH and GOCACHE) to env, or give full paths.

Checked against the project's own install docs on 27 Oct 2026: isaacphi/mcp-language-server README.

New to this? See the setup guides for Claude Code, Cursor, Claude Desktop and ChatGPT.

MCP Language Server not working? Common fixes

The language server is not found
Desktop clients do not inherit your shell PATH. Add a PATH entry to env with the folders of go and gopls (or your server), or use full paths.
Go projects report module errors
Set GOPATH, GOCACHE and GOMODCACHE in env to the values on your machine.
pyright or the TypeScript server exits straight away
They need --stdio. Add "--", "--stdio" after the --lsp value.
clangd finds no symbols
Generate compile_commands.json for your project and pass --compile-commands-dir to clangd after --.

How do I configure MCP Language Server?

Names are exactly as the project spells them. Required ones are marked.

SettingWhat it does
--workspaceCommand line flag · requiredThe project folder the language server works on.--workspace /Users/you/dev/yourproject/
--lspCommand line flag · requiredThe language server to start: gopls, rust-analyzer, pyright-langserver, typescript-language-server, clangd or another stdio server.--lsp gopls
-- <args>Command line flagEverything after -- is passed to the language server, such as --stdio for pyright.-- --stdio
LOG_LEVELEnvironment variableSet to DEBUG to log everything, including the messages to and from the language server.DEBUG

MCP Language Server FAQ

How do I install MCP Language Server?

Install Go, run go install github.com/isaacphi/mcp-language-server@latest, then install a language server for your code, such as gopls, rust-analyzer, pyright or clangd. The config passes your project folder with --workspace and the language server with --lsp.

How do I add MCP Language Server to Claude Code?

From your project folder run claude mcp add mcp-language-server -- mcp-language-server --workspace followed by the project path and --lsp gopls, or the language server you use instead.

Which languages does MCP Language Server support?

The author tested Go with gopls, Rust with rust-analyzer, Python with pyright, TypeScript with typescript-language-server and C or C++ with clangd. Any language server that talks over stdio should work.

Can I use several languages at once?

Each instance runs one language server against one workspace. For a mixed project, add one entry per language, each with its own name and --lsp value.

Why does pyright or the TypeScript server exit straight away?

Both need the --stdio flag. Anything after a double dash in the args goes straight to the language server, so end the args with -- and --stdio.

Can MCP Language Server change my code?

Yes. rename_symbol renames a symbol across the project and edit_file applies line edits. Point it at a git checkout so you can review and undo any change.

Does it work with ChatGPT?

No. It runs on your computer next to your code, and ChatGPT only connects to remote servers by URL. Use Claude Code, Claude Desktop, Cursor, VS Code or Windsurf.

Is MCP Language Server free and maintained?

It is free under the BSD-3-Clause licence. The author describes it as beta, and the repository has had little activity since March 2026.

MCP Language Server README

This is the project's own README from isaacphi/mcp-language-server, written by Phil Isaac (isaacphi) and contributors, and shared under its BSD-3-Clause licence. We copied it on 27 Oct 2026, so the version on GitHub may be newer.

MCP Language Server

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.

Demo

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.

Contributing

Please keep PRs small and open Issues first for anything substantial. AI slop O.K. as long as it is tested, passes checks, and doesn't smell too bad.

Setup

Clone the repo:

git clone https://github.com/isaacphi/mcp-language-server.git
cd mcp-language-server

A justfile is included for convenience:

just -l
Available recipes:
    build    # Build
    check    # Run code audit checks
    fmt      # Format code
    generate # Generate LSP types and methods
    help     # Help
    install  # Install locally
    snapshot # Update snapshot tests
    test     # Run tests

Configure your Claude Desktop (or similar) to use the local binary:

{
  "mcpServers": {
    "language-server": {
      "command": "/full/path/to/your/clone/mcp-language-server/mcp-language-server",
      "args": [
        "--workspace",
        "/path/to/workspace",
        "--lsp",
        "language-server-executable"
      ],
      "env": {
        "LOG_LEVEL": "DEBUG"
      }
    }
  }
}

Rebuild after making changes.

Logging

Setting the LOG_LEVEL environment variable to DEBUG enables verbose logging to stderr for all components including messages to and from the language server and the language server's logs.

LSP interaction
  • internal/lsp/methods.go contains generated code to make calls to the connected language server.
  • internal/protocol/tsprotocol.go contains generated code for LSP types. I borrowed this from gopls's source code. Thank you for your service.
  • LSP allows language servers to return different types for the same methods. Go doesn't like this so there are some ugly workarounds in internal/protocol/interfaces.go.
Local Development and Snapshot Tests

There is a snapshot test suite that makes it a lot easier to try out changes to tools. These run actual language servers on mock workspaces and capture output and logs.

You will need the language servers installed locally to run them. There are tests for go, rust, python, and typescript.

integrationtests/
├── tests/        # Tests are in this folder
├── snapshots/    # Snapshots of tool outputs
├── test-output/  # Gitignored folder showing the final state of each workspace and logs after each test run
└── workspaces/   # Mock workspaces that the tools run on

To update snapshots, run UPDATE_SNAPSHOTS=true go test ./integrationtests/...

Two peas, one chat

Chat with AI about MCP Language Server

Opens a chat primed with MCP Language Server’s README and setup docs from this page, or add it in Cursor to use its tools.

The Cursor button opens Cursor and asks before it adds the server. Fill in any keys it needs in Cursor’s MCP settings.

Peas in a pod

What are the alternatives to MCP Language Server?

How MCP Language Server lines up against its neighbours on the shelf. See every developer tools server.

  • MCP Language ServerThis pea

    Puts a real language server behind your assistant: definitions, references, diagnostics and rename.

    Tools
    6
    Runs on
    Your computer
    Licence
    BSD-3-Clause
    Stars
    1.6K
  • Nx MCP

    Your Nx monorepo's projects, tasks, generators and CI results, for your assistant.

    Tools
    13
    Runs on
    Your computer
    Licence
    MIT
    Stars
    1.4K
  • Jupyter MCP Server

    Lets an assistant edit and run cells in a live Jupyter notebook and read the results.

    Tools
    18
    Runs on
    Your computer
    Licence
    BSD
    Stars
    1.3K
  • Burp Suite MCP

    Lets an assistant send requests, read proxy history and use Repeater in Burp Suite.

    Tools
    27
    Runs on
    Your computer
    Licence
    GPL-3.0
    Stars
    1.3K
  • Ref MCP

    Docs search for coding agents that returns only the part of the page that matters.

    Tools
    2
    Runs on
    Your computer or hosted
    Licence
    MIT
    Stars
    1.2K
  • Desktop Commander

    A terminal, file search and surgical file edits for your assistant.

    Tools
    25
    Runs on
    Your computer
    Licence
    MIT
    Stars
    10.1K
Full docs on GitHubisaacphi/mcp-language-server

Something wrong on this page? Tell us.