Enhance Code Navigation and Analysis
MCP server that exposes Language Server Protocol tools-definition, references, diagnostics, hover, rename, and file editing-to AI clients for semantic codebase
Maintainer of this project? Claim this page to edit the listing.
0.1.1Add 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
Provide definition lookup for symbols
Find all references to a symbol
Perform symbol renaming across the project
Generate code diagnostics and suggestions
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-language-server | bash Capabilities
Tools your agent gets
Retrieves the complete source code of the definition for any symbol (function, type, constant, etc.)
Finds all uses and references of a symbol throughout the code base
Provides diagnostic information for a specific file, including warnings and errors
Displays documentation, type hints, or other information on hover for a specified position
Renames a symbol throughout the project
Allows making multiple text edits to a file based on line numbers
Overview
Language Server MCP Server
An MCP server written in Go that wraps Language Server Protocol implementations to expose semantic code navigation tools (definition lookup, references, diagnostics, hover info, rename, and line-based editing) to LLM clients. Use when you want to give an AI assistant structured access to code intelligence-finding where symbols are defined, tracking references across a codebase, surfacing compiler diagnostics, or performing safe renames-rather than relying on text search alone.
What it does
Big job: Give MCP-enabled clients access to semantic tools for navigating codebases.
Small job: Expose LSP capabilities-go-to-definition, find-references, diagnostics, hover documentation, symbol renaming, and line-based file editing-through MCP tools so LLMs can answer questions and make changes grounded in actual code structure.
Install the server and configure it to wrap any stdio-compatible language server:
go install github.com/isaacphi/mcp-language-server@latest
Then point it at your workspace and language server in your MCP client config:
{
"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"
}
}
}
}
The repository includes setup guides for gopls (Go), rust-analyzer (Rust), pyright (Python), typescript-language-server (TypeScript), and clangd (C/C++). The language server must communicate over stdio. Written in Go, uses mcp-go for MCP communication and edited code from gopls for LSP communication.
Source 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
- Install Go: Follow instructions at https://golang.org/doc/install
- Install or update this server:
go install github.com/isaacphi/mcp-language-server@latest - Install a language server: follow one of the guides below
- 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:
PATHneeds to contain the path togoand togopls. Get this withecho $(which go):$(which gopls)GOPATH,GOCACHE, andGOMODCACHEmay 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.