Skip to content
MCP Language Server

MCP Language Server

Released
BSD-3-Clause

Summary

Runs a language server such as gopls, rust-analyzer, pyright or clangd and exposes it to agents as MCP tools: go to definition, find references, diagnostics, hover and project-wide rename.

Features

  • Go to definition and find all references via a real language server
  • File diagnostics and hover documentation
  • Project-wide symbol rename
  • Multi-edit line-based file editing tool
  • Documented setups for gopls, rust-analyzer, pyright, typescript-language-server and clangd

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it, filling in the environment variables with your own values.
  3. Restart the agent — the "MCP Language Server" tools will be available.
{
  "mcpServers": {
    "mcp-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"
      }
    }
  }
}

Description

MCP Language Server gives an agent the same semantic code navigation an editor has. Rather than grepping for a symbol and guessing which match is the real one, the agent asks a real language server: it wraps any LSP server that communicates over stdio, starts it against a workspace you name, and translates its answers into MCP tools.

Tools. definition returns the complete source of a symbol's definition — function, type or constant. references finds every usage across the codebase. diagnostics reports a file's errors and warnings, hover returns documentation and type information at a position, and rename_symbol renames across the whole project. An edit_file tool applies multiple line-based edits in one call, which the author argues is more reliable and context-economical than search-and-replace editing.

Languages. The README documents setups for Go (gopls), Rust (rust-analyzer), Python (pyright), TypeScript (typescript-language-server) and C/C++ (clangd, pointed at a compile_commands.json). Others should work as long as they speak stdio: arguments after -- are passed to the language server, and environment variables are forwarded to it — which matters for Claude Desktop, where PATH and Go's cache variables may need setting explicitly.

Install with go install github.com/isaacphi/mcp-language-server@latest. Written in Go on mcp-go, using code adapted from gopls for LSP communication; BSD-3-Clause licensed. The author describes it as beta software.

MCP: Serena

by Oraios AI

Featured

Semantic code toolkit for coding agents — symbol-level search, editing and refactoring backed by language servers or the JetBrains platform.

MCP: CockroachDB MCP Server

by Cockroach Labs

Cockroach Labs' official MCP server exposes a CockroachDB cluster to agents as typed tools — schema inspection, cluster metadata, EXPLAIN and SELECT — with writes and DDL locked off unless you explicitly turn them on.

MCP: Codanna

by Codanna

Local code intelligence MCP server that returns symbol context, call graphs and impact analysis in a single call — 15 languages, indexed on your own machine.

Browse all MCP servers →