MCP Language Server MCP Server

This is an [MCP](https://modelcontextprotocol.io/introduction) server that runs and exposes a [language

Local serverstdioPython

What is the MCP Language Server MCP server?

MCP Language Server becomes available to MCP clients through the mcp language server mcp 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.

What MCP Language Server does

This is an MCP server that runs and exposes a language server to LLMs. Not a language server for MCP, whatever that would be.

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.

Tools it exposes

Once connected, the assistant can call these 8 tools directly:

  • 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
  • Setup — A justfile is included for convenience:
  • 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

Installing the mcp language server mcp server

The server is distributed via npm as pyright, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Configuration

The server reads 4 environment variables: GOPATH, GOCACHE, GOMODCACHE, LOG_LEVEL. Keep credentials in your client's env block or a secrets manager rather than committing them.

Where it fits

Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. MCP Language Server sits in that group, and the shape of its toolset — definition, references, diagnostics among others — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • With 8 tools exposed, expect a noticeable bump in prompt size — disable it in projects that never use MCP Language Server.
  • Maintained by isaacphi, written in Python.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the mcp language server mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
definitionRetrieves the complete source code definition of any symbol (function, type, constant, etc.) from your codebase.
referencesLocates all usages and references of a symbol throughout the codebase.
diagnosticsProvides diagnostic information for a specific file, including warnings and errors.
hoverDisplay documentation, type hints, or other hover information for a given location.
rename_symbolRename a symbol across a project.
edit_fileAllows 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.
SetupA [justfile](https://just.systems/man/en/) is included for convenience:
LoggingSetting 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.

How to install the MCP Language Server MCP server

{
  "mcpServers": {
    "language-server": {
      "command": "npx",
      "args": ["-y", "pyright"],
      "env": {
        "GOPATH": "your-value",
        "GOCACHE": "your-value",
        "GOMODCACHE": "your-value",
        "LOG_LEVEL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
GOPATHFilesystem location the server is allowed to use.Optional
GOCACHEConfiguration value read at startup.Optional
GOMODCACHEConfiguration value read at startup.Optional
LOG_LEVELConfiguration value read at startup.Optional

Example prompts to try

  • Use MCP Language Server to definition.
  • Use MCP Language Server to references.
  • Use MCP Language Server to diagnostics.

Frequently asked questions

It connects MCP Language Server to MCP-compatible AI assistants such as Claude and Cursor, exposing 8 tools (definition, references, diagnostics, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with MCP Language Server directly.