Airsc is free for everyone. If it helps you, support it with $2–$20.

Support
MCP serverSafeCode review & qualitySome setup

mcp-language-server

isaacphi · isaacphi/mcp-language-server

This MCP server enables AI agents to access semantic code tools like definition lookup, reference finding, renaming, and diagnostics for easier codebase navigation.

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

1.6k stars149License: BSD-3-ClauseUpdated 8 months ago0 opens

Preview

▍

What you can do with it

  • Find all references to a variable or function in a codebase.
  • Get the definition of an unfamiliar function an agent encounters.
  • Identify and fix code diagnostics or errors reported by the language server.

Safety check

Safe

No risky patterns found in the files we scanned.

Automated scan of the repo files. Always review code you run.

From the README

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.

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)

<strong>Install gopls</strong>: <code>go install golang.org/x/tools/gopls@latest</code>
<strong>Configure your MCP client</strong>: This will be different but similar for each client. For Claude Desktop, add the following to <code>~/Library/Application\ Support/Claude/claude_desktop_config.json</code>

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

Rust (rust-analyzer)

<strong>Install rust-analyzer</strong>: <code>rustup component add rust-analyzer</code>
<strong>Configure your MCP client</strong>: This will be different but similar for each client. For Claude Desktop, add the following to <code>~/Library/Application\ Support/Claude/claude_desktop_config.json</code>

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

Python (pyright)

<strong>Install pyright</strong>: <code>npm install -g pyright</code>
<strong>Configure your MCP client</strong>: This will be different but similar for each client. For Claude Desktop, add the following to <code>~/Library/Application\ Support/Claude/claude_desktop_config.json</code>

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

Typescript (typescript-language-server)

<strong>Install typescript-language-server</strong>: <code>npm install -g typescript typescript-language-server</code>
<strong>Configure your MCP client</strong>: This will be different but similar for each client. For Claude Desktop, add the following to <code>~/Library/Application\ Support/Claude/claude_desktop_config.json</code>

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

C/C++ (clangd)

<strong>Install clangd</strong>: Download prebuilt binaries from the official LLVM releases page or install via your system's package manager (e.g., <code>apt install clangd</code>, <code>brew install clangd</code>).
<strong>Configure your MCP client</strong>: This will be different but similar for each client. For Claude Desktop, add the following to <code>~/Library/Application\\ Support/Claude/claude_desktop_config.json</code>

{ "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" ] } } } Note: Replace /path/to/your/clangd_binary with the actual path to your clangd executable. --compile-commands-dir should point to the directory containing your compile_commands.json file (e.g., ./build, ./cmake-build-debug). Ensure compile_commands.json is generated for your project for clangd to work effectively.

Other

I have only tested this repo with the servers above but it should be compatible with many more. Note:
<ul>
  <li>The language server must communicate over stdio.</li>
  <li>Any aruments after <code>--</code> are sent as arguments to the language server.</li>
  <li>Any env variables are passed on to the language server.</li>
</ul>

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 e
View source on GitHub